In: Statistics and Probability
Suppose that my favorite colors are RED and PURPLE, and I hate all other colors of Skittles. Find a 95% confidence interval for the difference in proportion of Skittles packages whose dominant color is a FAVORITE COLOR and the proportion of Skittles packages whose dominant color is a HATED COLOR.
Package | Red | Orange | Yellow | Green | Purple | Total | Dominant Color |
1 | 15 | 15 | 16 | 12 | 14 | 72 | Y |
2 | 13 | 6 | 11 | 16 | 15 | 61 | G |
3 | 9 | 9 | 10 | 18 | 15 | 61 | G |
4 | 7 | 9 | 8 | 18 | 15 | 57 | G |
5 | 13 | 9 | 14 | 10 | 7 | 53 | Y |
6 | 15 | 20 | 8 | 10 | 9 | 62 | O |
7 | 12 | 11 | 11 | 16 | 8 | 58 | G |
8 | 14 | 14 | 15 | 5 | 12 | 60 | Y |
9 | 14 | 14 | 15 | 5 | 12 | 60 | Y |
10 | 16 | 10 | 13 | 10 | 10 | 59 | R |
11 | 14 | 11 | 12 | 13 | 9 | 59 | R |
12 | 10 | 11 | 16 | 8 | 15 | 60 | Y |
13 | 7 | 15 | 12 | 12 | 13 | 59 | O |
14 | 7 | 15 | 12 | 12 | 13 | 59 | O |
15 | 18 | 10 | 10 | 9 | 13 | 60 | R |
16 | 10 | 9 | 12 | 15 | 9 | 55 | G |
17 | 8 | 13 | 11 | 6 | 21 | 59 | P |
18 | 12 | 14 | 12 | 10 | 11 | 59 | O |
19 | 12 | 8 | 11 | 15 | 12 | 58 | G |
20 | 14 | 5 | 13 | 14 | 13 | 59 | R |
21 | 16 | 10 | 11 | 15 | 10 | 62 | R |
22 | 10 | 9 | 9 | 9 | 21 | 58 | P |
23 | 15 | 6 | 12 | 12 | 12 | 57 | R |
24 | 10 | 12 | 17 | 9 | 8 | 56 | Y |
25 | 16 | 7 | 16 | 10 | 11 | 60 | R |
26 | 12 | 10 | 12 | 8 | 16 | 58 | P |
27 | 7 | 13 | 5 | 11 | 15 | 51 | P |
28 | 8 | 11 | 18 | 12 | 11 | 60 | Y |
29 | 14 | 9 | 10 | 11 | 13 | 57 | R |
30 | 12 | 12 | 12 | 7 | 14 | 57 | P |
31 | 16 | 7 | 10 | 7 | 13 | 53 | R |
32 | 13 | 14 | 13 | 7 | 12 | 59 | O |
33 | 10 | 9 | 9 | 9 | 21 | 58 | P |
34 | 13 | 7 | 14 | 14 | 10 | 58 | Y |
sample #1 -----> fav color
first sample size, n1=
34
number of successes, sample 1 = x1=
15
proportion success of sample 1 , p̂1=
x1/n1= 0.4412
sample #2 -----> hated color
second sample size, n2 =
34
number of successes, sample 2 = x2 =
19
proportion success of sample 1 , p̂ 2= x2/n2 =
0.559
difference in sample proportions, p̂1 - p̂2 =
0.4412 - 0.5588 =
-0.1176
level of significance, α = 0.05
Z critical value = Z α/2 =
1.960 [excel function: =normsinv(α/2)
Std error , SE = SQRT(p̂1 * (1 - p̂1)/n1 + p̂2 *
(1-p̂2)/n2) = 0.1204
margin of error , E = Z*SE = 1.960
* 0.1204 = 0.2360
confidence interval is
lower limit = (p̂1 - p̂2) - E = -0.118
- 0.2360 = -0.3537
upper limit = (p̂1 - p̂2) + E = -0.118
+ 0.2360 = 0.1184
so, confidence interval is (
-0.3537 < p1 - p2 <
0.1184 )
..............