ANSWER BOTH A AND B I. The data file airfares.txt on the book web site gives the
ID: 3043715 • Letter: A
Question
ANSWER BOTH A AND B
I. The data file airfares.txt on the book web site gives the one-way airfare (in US dol- on modeling airfare as a function of distance. The first model fit to the data was Fare = ° + Distance + e lars) and distance in miles) from city A to 17 other cities in the US. Interest centers (3.7) (a) Based on the output for mode 3.7) a business analyst concluded the The regression coefficient of the predictor variable, Distance is highly statistically signif cant and the model explains 99.4% of the variability in the Ynariable. Fare. Thus model (1) is a highly effective model for both understanding the effects of Distance on Fare and for predicting future values of Fare given the value of the predictor variable, Distance 104 3 Diagnostics and Transformations for Simple Linear Regression 400 300 00 200 100 500 1500 500 1500 Figure 341 Output from model (3.7) Provide a detailed critique of this conclusion. (b) Does the ordinary straight line regression model (3.7) seem to fit the data well? If not, carefully describe how the model can be improved. Given below and in Figure 3.41 is some output from fitting model (3.7) Output from R Call: In(formula Fare -Distance Coefficients Estimate Std. Error t value Pr(zItD Intercept) 48.971770 Distance 4.405493 0.004421 11.12 1.22c-08** 49.69 0.219687 signi f . codes: 0' '0.001.**, 0.01 . * , 0.05.-' 0.1 ''1 Residual standard crror : 10.41 on 15 degrees of freedom Multiple R-Squared:0.994. Adjusted R-squared: 0.9936 F-statistic: 2469 on 1 and 15 DF, p-value:Explanation / Answer
SolutioNA:
Based on the output from R
The regression eq is
fare=48.971770+0.219687(Distance)
slope=0.219687
yintercept=48.971770
Form R sq=0.994
=0.994*100=99.4%
99.4% varaiation in fare is explained by model.
very good model .
SInce p values of intercept and slope are 1.22*10^-8,<2e^-16
p<0.05
Both intercept and distance are statistically significant
F=2469
p=2.2*10^-16***
p<0.05
REGRESSION MODEL IS SIGNIFICANT
DISTANCE CAN BE USED TO PREDICT FARE
Solutionb:
from scatterplot of distaance versus fare we can say that there exists a strong positive relationship between distance and fare
As distance increases fare increases and vice versa.
But we observe a non random inverted U suggesting a better fit for non linear model.
Residual plot shows a non random pattern
Transform the variable distance .
Apply log transformation to distance
Remove outliers and build a model.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.