Title | M&M statistics - Lab report 0 |
---|---|
Author | Nikhila Sampath |
Course | Quantitative Analysis Lab |
Institution | University of Illinois at Urbana-Champaign |
Pages | 16 |
File Size | 270.1 KB |
File Type | |
Total Downloads | 96 |
Total Views | 145 |
Lab report 0...
Title: M&M statistics Day and Date: Sept 5 2019, Thursday Course: Chem 223 Name: Nikhila Sampath Partner: Harrison Park Section: AB 5 TA: Sanja Pudar
Sampath 1
Abstract The purpose of this lab was to practice performing statistical analysis on data sets in order to determine if they are similar to each other. This was accomplished by using the F-Test to compare standard deviations and the T-Test to compare means. This was done after ensuring that the data sets had no outliers using Grubbs test. It was determined that though the standard deviation of the red M&Ms was different from that of the blue, green and brown M&Ms there was no significant difference between the mean mass of each color. It was concluded that each color M&M weighed the same.
Introduction The purpose of this lab was to practice performing statistical analysis on data sets in order to be able to compare them. This was done using three tests- namely Grubbs test, F-Test and T-Test. Grubbs test, also known as maximum normed residual test, is used to detect a single outlier in a data set. Gcalculated is determined based on the below mentioned formula and compared to Gtable which is determined based on the number of data points. Gcalculated =
| Questionable value − X | S
(1)
If Gcalculated > Gtable , the data point can be rejected. However if the data is suspected to have more than one outlier, it is better to use the Tietjen-Moore test or the generalized extreme studentized deviate test1 . The F-Test is used to determine if there is a significant difference in the standard deviation of two sets of data. Fcalculated is determined based on the formula
Sampath 2
Fcalculated =
S12 S22
(2)
where S1 > S2. It is then compared to Ftable which is determined based on the degrees of freedom which is given by DOF = n -1
(3)
If Fcalculated > Ftable , the standard deviations are significantly different. This test can be a two-tailed test or a one-tailed test. The two-tailed version tests against the alternative that the variances are not equal. The one-tailed version only tests in one direction, that is the variance from the first population is either greater than or less than (but not both) the second population variance2 . The T-Test is used to determine if the mean of two sets of data are significantly different. It is mostly used when the data sets would follow a normal distribution and may have unknown variances. A t-test is used as a hypothesis testing tool, which allows testing of an assumption applicable to a population3 . If the standard deviations are not significantly different, Tcalculated is given by T calculated =
| X 1 −X 2 |
√
S 12 (n1 −1) + S 22 (n2 −1) n1 + n2 −2
(4)
It is then compared to Ttable which depends on the degrees of freedom which is given by DOF = n1 + n2 - 2
(5)
If the standard deviations are significantly different, Tcalculated is given by T calculated =
| X 1 −X 2 |
√
S1 2 + S2 2 n1 + n2
It is then compared to Ttable which depends on the degrees of freedom which is given by
(6)
Sampath 3
DOF =
2
2
( S1 + S2 )2 n1 n2
2 ( S1 ) 2 n1 n1 −1
+
2 ( S2 ) 2 n2 n2 −1
(7)
If Tcalculated > Ttable , the means are significantly different. Based on lab 1, it was predicted that the mass of each bag of M&Ms as well as the mass of each color varied.
Procedure A bag of M&Ms was obtained. The analytical balance was tared without anything on it. Once the reading steadied at zero, the bag was placed on the balance and mass was recorded. Then the bag was removed from the balance and a weigh boat was placed instead. The balance was then tared again with the weigh boat on it. Once the reading steadied at zero, the bag of M&Ms was opened and its contents emptied onto the weigh boat while the wrapper was preserved. The mass of the M&Ms without the wrapper was recorded and the weigh boat was taken off the balance. The balance was tared again without anything on it. Once the reading steadied at zero, the wrapper was placed on the balance and its mass was recorded. After this, the wrapper was taken off the balance and gloves were worn. The M&Ms were then sorted into different weigh boats based on their color. The total number of M&Ms in each color was counted and this number was recorded. Five random M&Ms of each color were chosen. The balance was tared without anything on it and once the reading steadied at zero, the mass of each of the five was measured individually. After that, the mass of all five of them together was measured. This process was repeated for each color. After this, the M&Ms and weigh boats were discarded.
Sampath 4
Data and observations TABLE 1- Data for Yellow M&Ms Total count
10
Mass of #1
0.7933 g
Mass of #2
0.8867 g
Mass of #3
0.8450 g
Mass of #4
0.8432 g
Mass of #5
0.8923 g
Together
4.2607 g
Sum
4.2605 g
Difference
0.0002 g
Mean
0.8521 g
Std Dev
0.04000
Gtable
1.672
Gcalculated for mass #1
1.471
Gcalculated for mass #2
0.8650
Gcalculated for mass #3
0.1775
Gcalculated for mass #4
0.2225
Gcalculated for mass #5
1.005
Sampath 5
TABLE 2- Data for Blue M&Ms Total count
9
Mass of #1
0.8445 g
Mass of #2
0.8943 g
Mass of #3
0.8340 g
Mass of #4
0.8633 g
Mass of #5
0.8214 g
Together
4.2577 g
Sum
4.2575 g
Difference
0.0002 g
Mean
0.8515 g
Std Dev
0.02843
Gtable
1.672
Gcalculated for mass #1
0.2462
Gcalculated for mass #2
1.506
Gcalculated for mass #3
0.6156
Gcalculated for mass #4
0.4151
Gcalculated for mass #5
1.059
Sampath 6
TABLE 3- Data for Red M&Ms Total count
5
Mass of #1
0.8445 g
Mass of #2
0.8461 g
Mass of #3
0.7892 g
Mass of #4
0.8968 g
Mass of #5
1.0096 g
Together
4.3862 g
Sum
4.3862 g
Difference
0g
Mean
0.8772 g
Std Dev
0.08321
Gtable
1.672
Gcalculated for mass #1
0.3935
Gcalculated for mass #2
0.3742
Gcalculated for mass #3
1.058
Gcalculated for mass #4
0.2351
Gcalculated for mass #5
1.591
Sampath 7
TABLE 4- Data for Orange M&Ms Total count
14
Mass of #1
0.8387 g
Mass of #2
0.9154 g
Mass of #3
0.7987 g
Mass of #4
0.8404 g
Mass of #5
0.8275 g
Together
4.2201 g
Sum
4.2207 g
Difference
-0.0006 g
Mean
0.8441 g
Std Dev
0.04320
Gtable
1.672
Gcalculated for mass #1
0.1259
Gcalculated for mass #2
1.650
Gcalculated for mass #3
1.052
Gcalculated for mass #4
0.08658
Gcalculated for mass #5
0.3852
Sampath 8
TABLE 5- Data for Green M&Ms Total count
6
Mass of #1
0.8316 g
Mass of #2
0.8622 g
Mass of #3
0.8534 g
Mass of #4
0.9050 g
Mass of #5
0.8312 g
Together
4.2838 g
Sum
4.2834 g
Difference
0.0004 g
Mean
0.8567 g
Std Dev
0.03022
Gtable
1.672
Gcalculated for mass #1
0.8298
Gcalculated for mass #2
0.1826
Gcalculated for mass #3
0.1085
Gcalculated for mass #4
1.599
Gcalculated for mass #5
0.8430
Sampath 9
TABLE 6- Data for Brown M&Ms Total count
11
Mass of #1
0.8110 g
Mass of #2
0.8701 g
Mass of #3
0.8290 g
Mass of #4
0.8599 g
Mass of #5
0.8849 g
Together
4.2551 g
Sum
4.2549 g
Difference
0.0002 g
Mean
0.8510 g
Std Dev
0.03032
Gtable
1.672
Gcalculated for mass #1
1.319
Gcalculated for mass #2
0.6306
Gcalculated for mass #3
0.7249
Gcalculated for mass #4
0.2942
Gcalculated for mass #5
1.119
Sampath 10
Table 7- Results for F-Test Color combo
S1
S2
Fcalculated
Ftable
Result
Yellow & Blue
0.04000
0.02843
1.980
6.39
SIMILAR
Yellow & Red
0.08321
0.04000
4.327
6.39
SIMILAR
Yellow & Orange
0.04320
0.04000
1.166
6.39
SIMILAR
Yellow & Green
0.04000
0.03023
1.751
6.39
SIMILAR
Yellow & Brown
0.04000
0.03032
1.740
6.39
SIMILAR
Blue & Red
0.08321
0.02843
8.568
6.39
DIFFERENT
Blue & Orange
0.04320
0.02843
2.309
6.39
SIMILAR
Blue & Green
0.03022
0.02843
1.131
6.39
SIMILAR
Blue & Brown
0.03032
0.02843
1.138
6.39
SIMILAR
Red & Orange
0.08321
0.04320
3.711
6.39
SIMILAR
Red & Green
0.08321
0.03023
7.579
6.39
DIFFERENT
Red & Brown
0.08321
0.03032
7.531
6.39
DIFFERENT
Orange & Green
0.04320
0.03023
2.042
6.39
SIMILAR
Orange & Brown
0.04320
0.03032
2.030
6.39
SIMILAR
Green & Brown
0.03032
0.03023
1.006
6.39
SIMILAR
Sampath 11
Table 8- Results for T-Test Color combo
Result of F-Test
Tcalculated
Ttable
Result of T-Test
Yellow & Blue
SIMILAR
0.03470
2.306
SIMILAR
Yellow & Red
SIMILAR
0.06528
2.306
SIMILAR
Yellow & Orange
SIMILAR
0.04163
2.306
SIMILAR
Yellow & Green
SIMILAR
0.03545
2.306
SIMILAR
Yellow & Brown
SIMILAR
0.03549
2.306
SIMILAR
Blue & Red
DIFFERENT
0.6546
2.571
SIMILAR
Blue & Orange
SIMILAR
0.03656
2.306
SIMILAR
Blue & Green
SIMILAR
0.02934
2.306
SIMILAR
Blue & Brown
SIMILAR
0.02939
2.306
SIMILAR
Red & Orange
SIMILAR
0.06629
2.306
SIMILAR
Red & Green
DIFFERENT
0.5193
2.571
SIMILAR
Red & Brown
DIFFERENT
0.6630
2.571
SIMILAR
Orange & Green
SIMILAR
0.03728
2.306
SIMILAR
Orange & Brown
SIMILAR
0.03732
2.306
SIMILAR
Green & Brown
SIMILAR
0.03027
2.306
SIMILAR
Sampath 12
TABLE 9- General data about M&Ms Self
Group #1
Group #2
Group #3
Group #4
Mass of one bag of M&M
48.1932 g
47.8400 g
48.8400 g
50.7629 g
50.0440 g
Mass of all M&Ms together
47.1422 g
46.8000 g
47.7772 g
49.7019 g
48.9833 g
Number of M&Ms
55
54
56
59
58
Average mass of one M&M
0.8571 g
0.8667 g
0.8532 g
0.8424 g
0.8445 g
Mass of wrapper
1.0163 g
1.0400 g
1.0628 g
1.0481 g
1.0508 g
TABLE 10- Statistical analysis on Table 9 Mean
49.1360 g
Standard Deviation
1.238
Gtable
1.672
Gcalculated for self
0.7618
Gcalculated for group 1
1.047
Gcalculated for group 2
0.2392
Gcalculated for group 3
1.314
Gcalculated for group 4
0.7336
Calculations Mean= X=
M ass 1 + M ass 2 + M ass 3 + M ass 4+M ass 5 + 0.8432 + 0.8923 4.2605 = 0.7933 + 0.8867 + 0.8450 = 5 5 5
= 0.8521 g
Standard Deviation = S =
√
n
∑(xi−X )2 i=1
n−1
= 0.04000
Sampath 13
Gcalculated =
| Questionable value − X | S
=
| 0.7933 − 0.8521 | 0.04000
= 1.471
Gtable = 1.672 ( n = 5) Since Gcalculated < Gtable , the value is not an outlier.
Fcalculated =
S12 S22
( S1 > S2) =
0.04000 0.02843
= 1.980
Degree of Freedom for S1 = n1 -1 = 5 - 1 = 4 Ftable = 6.39 ( n1 = n1 = 5 ) Since Fcalculated < Ftable , the standard deviations are similar. If Fcalculated > Ftable , the standard deviations are different.
If standard deviations are similar, T calculated =
| X 1 −X 2 |
√
S 1 2(n1 −1) + S 2 2(n2 −1) n1 + n2 −2
=
| 0.8521 − 0.8515 |
√
((0.04000 2)×4) + ((0.028432 )×4) 8
=
0.03470 Degrees of Freedom = n1 + n2 - 2 = 8 Ttable (n1 = n2 = 5) = 2.306
If standard deviations are different, T calculated = Degrees of Freedom =
2 S22 2 ( S1 + n2 ) n1 S12 2 S22 ( n1 ) ( n2 ) 2 n1 −1 + n2 −1
=
| X 1 −X 2 | 2 2 S1 + S2 n1 + n2
√
2 0.028422 2 ( 0.0832 + 5 ) 5 0.028422 2 0.08322 2 ( ) ( ) 5 5 + 4 4
=
| 0.8772 − 0.8515 |
√
0.0832 2 + 0.02842 2 5+5
= 0.6546
= 4.921 ≈ 5
Ttable (n1 = n2 = 5) = 2.571 Since Tcalculated < Ttable , the means are similar. If Tcalculated > Ttable , the means are different.
Sampath 14
Discussion In Lab 1, it was speculated that the mean mass for each color was different and that the different color M&Ms had different masses. However, the data from Table 8 disproves this. Though the standard deviation of the red M&Ms was different from that of the blue, green and brown M&Ms (see Table 7), there was no significant difference between the mean mass of each color. In light of this new evidence, it can be said that all colors of M&Ms weigh the same. Each of the 5 mass readings obtained for each color was tested and it was determined that there were no outliers. Based on the count of each color per bag, it was noticed that the color distribution was being controlled. When asked about this, an M&M representative claimed that the number of M&Ms produced in each color was the same and the number of M&Ms of each color were chosen based on weight to ensure that each bag weighed the same. Though the truthfulness of this explanation was initially doubted, it was later determined that this can be considered a plausible explanation since as seen from Table 10, the mass of each bag was similar as the standard deviation was 1.238 and none of the data points could be considered an outlier. Another potential reason for the controlled color distribution could be that it was economical to reduce the number of M&Ms of certain colors to save on food dye costs. It could also be possible that certain colors were found to be more aesthetically attractive than others.
Conclusion In this lab, the various sets of data obtained in lab 1 was statistically analyzed using the F-Test, T-Test and Grubbs Test. It was determined that there were no outliers in the data using Grubbs Test, indicating that the data obtained was precise. Though there were some differences
Sampath 15
in standard deviations of the mass of each color observed while performing the F-Test, the T-Test indicated that the mean mass of each color was the same, disproving the hypothesis that the mass of each color differed.
Reference 1. Itl.nist.gov. (2019). 1.3.5.17.1. Grubbs' Test for Outliers. [online] Available at: https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h1.htm [Accessed 4 Oct. 2019]. 2. People.richland.edu. (2019). Stats: F-Test . [online] Available at: https://people.richland.edu/james/lecture/m170/ch13-f.html [Accessed 4 Oct. 2019]. 3. Investopedia. (2019). T-Test Definition . [online] Available at: https://www.investopedia.com/terms/t/t-test.asp [Accessed 4 Oct. 2019]....