In: Advanced Math
The Seaberg Library is interested in the relationship between the inches of rain in a month and the number of patrons visiting the library in a month. They collect data for seven months below.
Inches of Rain/Month |
# Patrons/Month |
2 | 150 |
4 | 155 |
7 | 300 |
12 | 400 |
22 | 450 |
10 | 400 |
13 | 410 |
a) State your null formally and in lay terms for a simple regression (10)
b) Calculate r and the regression line (y = a + bx) and reject/accept at a=.05. You must state the estimated regression line even if Ho is accepted. (10)
c) Explain your findings in lay terms using r-square, r, b as appropriate (20)
d) Calculate a 95% confidence interval for the slope IF NECESSARY and if not explain WHY NOT. Provide the formal interval and explain in layterms. (5)
IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE TTHERE TO HELP YOU
ANSWER:
EXPLANATION:
Answer -a and b)
We shall consider rainfall as the explanatory variable and the number of patron visits as the response variable because the rainfall is not dependent on any factor in the observation.
Now let us perform the hypothesis testing of the regression equation
The solution to this problem takes four steps: (1) state the hypotheses, (2) formulate an analysis plan, (3) analyze sample data, and (4) interpret results. We work through those steps below:
Ho: The slope of the regression line is equal to zero.
Ha: The slope of the regression line is not equal to zero.
If the relationship between home size and electric bill is significant, the slope will not equal zero.We get the slope (b1) and the standard error (SE) from the regression output.
The SE is given by the formula
SE of regression slope = sb1 = sqrt [ Σ(yi – ŷi)2 / (n – 2) ] / sqrt [ Σ(xi – x)2 ].
Lets calculate it
Rainfall(in)-(X) | #patrons/Month-(Y) | Y -predicted=16.54x+158.16 | (Y-Y-predicted) ^2 | (X-Xmean)^2 | |
2 | 150 | 191.24 | 1700.74 | 64 | |
4 | 155 | 224.32 | 4805.26 | 36 | |
7 | 300 | 273.94 | 679.12 | 9 | |
12 | 400 | 356.64 | 1880.09 | 4 | |
22 | 450 | 522.04 | 5189.76 | 144 | |
10 | 400 | 323.56 | 5843.07 | 0 | |
13 | 410 | 373.18 | 1355.71 | 9 | |
Mean | 10 | 323.5714 | 323.56 | 3064.82 | 38 |
Sum | 70 | 2265 | 2264.92 | 21453.76 | 266 |
SE | =Sqrt(21453.76/266*(7-2)) | ||||
4.01 |
b1 = 16.54 SE = 4.01
We compute the degrees of freedom and the t statistic test statistic, using the following equations.
DF = n - 2 = 7 - 2 = 5
t = b1/SE = 16.54/4.01 = 4.125
where DF is the degrees of freedom, n is the number of observations in the sample, b1 is the slope of the regression line, and SE is the standard error of the slope.
Based on the t statistic test statistic and the degrees of freedom, we determine the P-value. The P-value is the probability that a t statistic having 7 degrees of freedom is more extreme than 4.125. Since this is a two-tailed test, "more extreme" means greater than 4.125 or less than -4.125.Now we shall calculate the correlation coefficient (r)
This indicates that there is a strong correlation between the two variables (since 0.879>0.800) and this relation is positive meaning that as rainfall increases the number of patrons/ month will also increase.
c). We have already explained the value of r and its interpretation .
r square =r*r =0.879*0.879
=0.772
The r squared means the degreeo f variation in the response variable values that can be explained by the regression equation .Thus here ,77.2% of all variations in Y can be explained by the regresison equation derived above.
The slope is 16.54. It means that for every unit change in rainfall, there will be 16.54 number of patron change per month.
The sign of the slope is positive indicating that the relationship is linear and direct.
d).The last part of the question !
finding the confidence interval of the slope of the regression equation
The confidence interval is calculated as per the forumla
Here we have a =0.05, n=7,k=1 and SE (slope) =4.01 , Slope =16.54
at 0.05 for n=7and k (predictor variable) =1, the critical t value is 2.57
Thus keeping values we get
CI (slope) =
or CI (slope) =(6,232,26.848) This is the range of the confidence interval of the slope at 95 % confidence.
HOPE IT HELPS YOU
RATE THUMBSUP IT HELPS ME ALOT
THANKS