You are on page 1of 5

Annie Wallace

Carly Hatfield, Max Goldfarb

Block 4

Testing a Null Hypothesis with M&Ms Using a Chi Square


Introduction
This experiment tests the null hypothesis using a bag of M&Ms and
a Chi Square. Before beginning the lab, the null hypothesis must be
identified, which states that any difference between the observed and
expected data is due to chance. To prove or disprove a null hypothesis, a
Chi Square is implemented, using the formula
x2= (O-E)2/E.
The null hypothesis is always the same for any Chi Square. The formula
makes it possible to compare the actual outcome of an experiment to the
expected outcome of an experiment. In an experiment, it is possible to
receive results different from what was expected. However, it can often be
unclear whether these results were random and by chance, or if the expected
outcome is incorrect. This could potentially mean that the traits tested in the
experiment do not actually exhibit dominance. Luckily, the Chi Square
formula and analysis make it possible to test whether these outcomes
differed from the expected by chance or because the null hypothesis is
rejected. Once the Chi Square formula is implemented, it can easily be found
whether the null hypothesis is accepted or rejected. In other words, the
answer to the equation can display whether the differing results were by
chance or because the expected data is incorrect. Once the results are
determine, by simply comparing the Chi Square (x2) answer to the critical
number on the chart below, the null hypothesis can be accepted or rejected.

The purpose of this investigation is to put the Chi-Square formula to


use and to be able to prove or disprove the null hypothesis for a bag of
Problem
Will the Chi-Square results from the M&Ms vary from the expected data
due to chance or because what is expected is incorrect?
Hypothesis
Any difference between the given data is by chance.

Materials

1 20oz bag on chocolate M&Ms


Calculator
Paper towel

Procedure

Wash your hands with soap and water.


Gather materials from list above.
Pour bag of M&Ms onto your paper towel.
Separate all of the M&Ms into groups with their respective colors.
Record your counts in the first row of Data Table 1 on the next page.
Use the previous table on the handout with M&M percentages to
calculate the expected number of each color of candy.
Record the numbers you calculate in the second row of the data
table.
Complete the rest of the calculations of Data Table 1 to find the Chi

Results
Data Table
1
Observed
(O)
Expected
(E)
Difference
(O-E)
Difference
Squared
(O-E)2
(O-E)2/E
x2= (OE)2/E
Data Table
2
Observed
(O)
Expected
(E)
Difference
(O-E)
Difference

Brown Blue
46

92

Orang
e
72

Green

Red

Yellow

Total

97

27

48

382

50

92

76

61

50

53

382

-4

-4

36

-23

-5

---

16

16

1296

529

25

---

.32
---

0
---

.21
---

21.25
---

10.58
---

.47
---

--32.83

Brow
n
315

Blue

Green

Red

Yellow

Total

532

Orang
e
474

408

281

276

2286

297

549

457

366

297

320

2286

18

-17

17

42

-16

-44

---

324

289

289

1764

256

1936

---

Squared
(O-E)2
(O-E)2/E
x2=(OE)2/E

1.09
---

.526
---

.632
---

4.82
---

.862
---

6.05
---

--13.98

Error Analysis
Discussion and Conclusion
Laboratory Questions
1. With all of this in mind, based on your individual sample, should you
accept or reject the null hypothesis?
a. Based on our results, the null hypothesis is rejected. This is
because the P value was lower than x2, which is the answer to
the Chi Square formula. This shows that our results were not
due to chance.
2. If you rejected you null hypothesis, what might be some
explanations for your outcome?
a. The comparison data could be incorrect or the machine in the
Duringfactory
this lab,
could
the have
null hypothesis
calculated that
numbers
was created
of the different
was disproved.
colors
The hypothesis
incorrectly.
was that any difference between the given data is by
chance. This was proven to be incorrect due to the results of the ChiSquare
3. Based
formula.
on the
Although
class data,
the hypothesis
should youstated
acceptthat
or reject
the difference
the null in
data results
hypothesis?
were by
Why?
chance, because of the answer to the formula in
relationship
a. We
to the
should
critical
reject
number
the hypothesis
on the Chi-Square
because table,
the answer
it became
to the
apparent that
Chithe
Square
expected
equation
results
is greater
were actually
than the
incorrect.
critical number
Becauseon
of the
this, the hypothesis
data table.
was rejected.
The
only
potential
error
this data
lab was
measurements
that were
In the
first
part of the
labinwith
justthe
from
one bag of M&Ms,
the
performed
inrejected
the strayed
M&M
factory.
Itfrom
is possible
thatonthe
machine
miscounted
observed
4. If you
results
the
null
vastly
hypothesis
the based
expected
the
results.
classThe
data,
answer
what to
and
added
one color
M&Ms
in
each
bag, which
could have
the Chi-Square
mighttoo
be many
formula
some of
explanations
versus
theofP
for
value
yourhad
outcome?
a difference
of about
20,
messed
up
the
and caused
the
null
hypothesis
to be
rejected.
which
led
a.the
It is
todata
possible
rejection
that
of the
thenull
machine
hypothesis.
malfunctioned
When
counting
and
added
the M&Ms
an
in the bag, there
incorrect
was number
a large difference
of M&Ms to
between
each bag.
the numbers of each
color. Once the numbers were plugged into the equation, it became clear
that
5.the
What
variation
is the purpose
in what was
of collecting
recorded data
and expected
from the entire
from the
group?
chocolate
companya.
was
The
not
purpose
by chance.
of collecting
Becausedata
there
from
wasthe
such
entire
a large
class
variation,
is to be it
displayed that
able
it was
to gauge
not by
how
chance,
accurate
but the
rather
percentage
the expected
of M&M
data
colors
was is.
incorrect. ByWe
examining
can compare
the graph
the data
made
that
forone
Trial
class
One,received
it was clear
with that
the the
expected versus
data observed
of the other
results,
class for
in order
the red
to and
see if
green
our null
in particular,
hypothesis
were varied. For the second trial of the lab, using the data from all groups,
there was still a possibility that the null hypothesis could be accepted.
Even though it was rejected for the first trial, the overall results of several
bags could have possibly overridden the data of a smaller number of
M&Ms. This possibility, however, did not occur. By observing the data
table for Trial Two, the numbers of the expected in comparison to the
observed were somewhat similar, and did not vary as in Trial One.
However, once the Chi-Square formula was put to use, the results once
again disproved the null hypothesis. The results were much closer to the P
value given, but because the formula answer was higher than the critical
value, it was still rejected. Because both the first and second trial rejected
the null hypothesis, it can be clearly seen that the difference between the
observed and expected data was not by chance. This means that the data
given by the M&Ms Company was incorrect. Although there was a chance
that the bag of M&Ms from the first trial was packaged incorrectly, it

You might also like