In: Statistics and Probability
THANKSGIVING SPECIAL!!! For this applied assignment we will be looking at the number of turkeys and bottles of wine sold each November, comparing the American northeast (i.e., our sample) to the total American averages (i.e., the population).
Every Thanksgiving, an average of 960,000 turkeys and 90,000 bottles of wine are sold per state. Importantly, the population variance/standard deviation is not known. Below is the number of turkeys and bottles of wine sold in each of the ten northeast states.
State |
# of Turkeys |
# Bottles of Wine |
Maine |
199,700 |
45,900 |
Vermont |
93,800 |
25,500 |
New Hampshire |
200,200 |
60,000 |
Massachusetts |
1,020,100 |
294,250 |
Rhode Island |
200,000 |
74,000 |
Connecticut |
525,100 |
111,250 |
New York |
2,962,500 |
780,600 |
Pennsylvania |
1,920,200 |
480,000 |
New Jersey |
1,341,600 |
355,400 |
Delaware |
142,500 |
105,500 |
In order to solve this question we use R software.
R codes and output:
> d=read.table('data.csv',header=T,sep=',')
> head(d)
State Turkeys Wine
1 Maine 199700 45900
2 Vermont 93800 25500
3 New Hampshire 200200 60000
4 Massachusetts 1020100 294250
5 Rhode Island 200000 74000
6 Connecticut 525100 111250
> attach(d)
> t.test(Turkeys)
One Sample t-test
data: Turkeys
t = 2.8299, df = 9, p-value = 0.01973
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
172642.1 1548497.9
sample estimates:
mean of x
860570
> t.test(Wine)
One Sample t-test
data: Wine
t = 3.0001, df = 9, p-value = 0.01495
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
57372.82 409107.18
sample estimates:
mean of x
233240
> cor.test(Turkeys,Wine,alternative='greater')
Pearson's product-moment correlation
data: Turkeys and Wine
t = 26.575, df = 8, p-value = 2.161e-09
alternative hypothesis: true correlation is greater than 0
95 percent confidence interval:
0.9806611 1.0000000
sample estimates:
cor
0.9943839
> fit=lm(Wine~Turkeys)
> summary(fit)
Call:
lm(formula = Wine ~ Turkeys)
Residuals:
Min 1Q Median 3Q Max
-36710 -17709 -2745 11939 54802
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.447e+04 1.200e+04 1.206 0.262
Turkeys 2.542e-01 9.566e-03 26.575 4.32e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 27600 on 8 degrees of freedom
Multiple R-squared: 0.9888, Adjusted R-squared: 0.9874
F-statistic: 706.2 on 1 and 8 DF, p-value: 4.323e-09
Que.1
95% confidence interval for number of turkeys sold is (172642.1 , 1548497.9).
95% confidence interval for number of wine bottle sold is (0.9755 , 0.9987)
Que.2
Hypothesis:
Que.3
Strength : There is high degree positive correlation between number of turkeys sold and number of wine bottle sold.
Que.4
Correlation coefficient = r = 0.9943839
Test statistic, t = 26.575, df = 8, p-value = 2.161e-09
Critical value = 0.632
Since p-value is less than 0.05, hence we reject null hypothesis and conclude that as number of turkeys sold then number of wine bottle sold are increased.