Lenhart Torres MAT308 Chi Square Test Wk 11
pdf
keyboard_arrow_up
School
Wilmington University *
*We aren’t endorsed by this school
Course
308
Subject
Industrial Engineering
Date
Dec 6, 2023
Type
Pages
4
Uploaded by DrFlamingoPerson642
Chi
Square
Test
(GOF
and
Independence)
walicia
ot
lxges
Chi
Square
Modeling
Using
M
&
M’s
Candies
Introduction:
Have
you
ever
wondered
why
the
package
of
M&Ms
you
just
bought
never
seems
to
have
enough
of
your
favorite
color?
Or,
why
is
it
that
you
always
seem
to
get the
package
of
mostly
brown
M&Ms?
What’s
going
on
at
the
Mars
Company?
s
the
number
of
the
different
colors
of
M&Ms
in
a
package
really
different
from
one
package
to
the
next,
or
does
the
Mars
Company
do
something
to
insure
that
each
package
gets
the
correct
number
of
each
color
of
M&M?
You’ve
probably
stayed
up
nights
pondering
this!
One
way
that
we
could
determine
if
the
Mars
Co.
is
true
to
its
word
is
to
sample
a
package
of
M&Ms
and
do
a
type
of statistical
test
known
as
a
“goodness
of
fit”
test.
These
type
of
statistical
tests
allow
us
to
determine
if
any
differences
between
our
observed
measurements
(counts
of
colors
from
our
M&M
sample)
and
our
expected
(what
the
Mars
Co.
claims)
are
simply
due
to
chance
sample
error
or
some
other
reason
(i.e.
the
Mars
Co.’s
sorters
aren’t
really
doing
a
very
good
job
of
putting
the
correct
number
of
M&M’s
in
each
package).
The
goodness
of
fit
test
we
will
be
doing
today
is
called
a
Chi
Square
Analysis.
This
test
is
generally
used
when
we
are
dealing
with
discrete
data
(i.e.
count
data,
or
non
continuous
data).
We
will
be
calculating
a
statistic
called
a
Chi
square
or
X’
We
will
be
using
a
table
to
determine
a
probability
of
getting
a
particular
X°
value.
Remember,
our
probability
values
tell
us
what
the
chances
are
that
the
differences
in
our
data
are
due
simply
to
chance
alone
(sample
error).
The
Chi
Square
test
(X?)
is
often
used
in
science
to
test
if
data
you
observe
from
an
experiment
is
the
same
as
the
data
that
you
would
predict
from
the
experiment.
This
investigation
will
help
you
to
use
the
Chi
Square
test
by
allowing
you
to
practice
it
with
a
population
of
familiar
objects,
M&M
candies.
Objectives:
After
this
investigation
you
should
be
able
to:
e
write
a
null
hypothesis
that
pertains
to
the
investigation;
e
determine
the
degrees
of
freedom
(df)
for
an
investigation;
e
calculate
the
X?
value
for
a
given
set
of
data;
e
use
the
critical
values
table
to
determine
if
the
calculated
value
is
equal
to
or
less
than
the
critical
value;
e
determine
if
the
Chi
Square
value
exceeds
the
critical
value
and
if
the
null
hypothesis
is
accepted
or
rejected.
Chi
Square
Test
(GOF
and
Independence)
M&M
DATA
(Individual)
What
Colors
Come
In
Your
Bag?
Here
are
the
percentages
given
by
M&M
on
their
website
for
each
color.
e
Brown=12%
e
Green=15%
e
Red=12%
e
Orange
=23%
e
Yellow
=15%
e
Blue
=23%
1)
Open
2
bags
of
M&Ms.
(If
you
do
not
have
2
bags
of
M&M’s
email
me
and
|
will
send
you
a
set
of
data.)
2)
Separate
the
M&Ms
into
color
categories
and
count
the
number
of
each
color.
3)
Record
your
M&M
color
totals
in
the
data
table.
Table
1
Brown
Red
Yellow
Green
Orange
Blue
31
5T
4T3
T
19
\/
—
Total
Number
of
M&W’s
'
5
4)
Calculate
the
expected
number
of
M&Ms
in
your
package
by
multiplying
the
total
number
of
M&Ms
in
the
package
by
the
color
percent
listed
on
page
1
of
the
activity.
For
example,
if
your
package
contains
500
M&Ms
and
you
want
to
find
the
expected
number
of
red
M&Ms
you
will
need
to
multiply
500
by
20%
(500
x
0.20).
Record
your
calculations
in
the
data
table.
5)
Calculate
the
difference
between
the
observed
and
expected
numbers
for
each
M&M
color.
Record
your
calculations
in
the
data
table.
6)
Square
the
difference
between
the
observed
and
expected.
Record
your
calculations
in
the
data
table.
7)
Divide
the
square
of
the
difference
by
the
expected.
Record
your
calculations
in
the
data
table.
8)
Total
all
the
answers
from
step
7
to
determine
the
chi-square
(A?)
value.
Record
the
chi-square
(A?)
in
the
data
table.
Chi
Square
Test
(GOF
and
Independence)
Table
2
Colors
obs(z;ved
4)
EX(Ftr)mt‘:}d
2)'0°8
Ohiicrel
7
{2_-9)_2
Brown
(3
Q.Q,
(4.'—'\
LH.)-QG
é*&fi(o
Red
5
louli
-
1.0
Q.56
N3XY
Yellow
y
X
oS
==
.QS
[.0C
|9
.
‘K%;
Green
|
4
%.d5
4
¢
Jd
EE
O
Orange
|l
2.8
|[=1.0S
Y
orv
e
S
Blue
|
©
Q¢S
=3.(S
|
D
Analysis
Questions:
1.
What
are
the
null
and
alternative
Hypothesis?
e
The
Peicentagrs
by
Mars
Co.
owe
correet
T
percantages
by
Mas
Co.
are
not
Cored
8)
X
Now
you
must
determine
the
probability
that
the
difference
between
the
observed
and
expected
values
(as
summarized
by
the
calculated
value
of
chi
square)
occurred
simply
by
chance.
To
do
this
you
will
need
to
compare
the
calculated
value
of
chi-square
with
the
appropriate
value
from
the
Chi
Square
Distribution
Table
on
the
next
page.
Examine
the
table.
Note
the
term
“degrees
of
freedom.”
For
this
statistical
test
the
degrees
of
freedom
is
equal
to
the
number
of
classes
(color
categories)
minus
one.
Complete
the
following
to
determine
the
degrees
of
freedom
for
the
M&M
analysis:
#
of
color
categories
degrees
of
freedom
L
-1
5
The
reason
why
it
is
important
to
consider
degrees
of
freedom
is
that
the
value
of
the
chi-square
statistic
is
calculated
as
the
sum
of
the
squared
differences
for
all
classes.
The
natural
increase
in
the
value
of
chi-square
with
an
increase
in
classes
must
be
taken
into
account.
Scan
across
the
row
corresponding
to
5
degrees
of
freedom.
Values
of
the
chi-square
are
given
for
several
different
probabilities
ranging
from
0.95
on
the
left
to
0.001
on
the
right.
Note
that
the
chi-square
increases
as
the
probability
increases.
Notice
that
a
chi-square
value
of
1.63
would
be
expected
by
chance
in
95%
(0.95)
of
the
cases,
whereas
one
of
12.59
would
be
expected
in
5%
(0.05)
of
the
cases.
Use
the
chi-square
value
calculated
and
recorded
on
the
data
table
to
determine
the
probability
for
the
M&M
analysis.
If
the
exact
chi
square
value
is
not
listed
in
the
table
estimate
the
probability.
Record
your
answer
below.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Chi
Square
Test
(GOF
and
Independence)
CHI-SQUARE
DISTRIBUTION
TABLE
<
Accept
Hypothesis
Reject
Hypothesis
Probability
(p)
Degrees
of
0.95
{0.90/0.80(0.70|0.50|
0.30
|
0.20
|
0.10
J
0.05
|
0.01
|
0.001
Freedom
1
0.004
({0.02(0.06(0.15/0.46|
1.07
|
1.64
|
2.71
|
3.84
|
6.64
|
10.83
2
0.10
|0.21/0.45(0.71(1.39|
2.41
|
3.22
|
4.60
|
5.99
|
9.21
|
13.82
3
0.35
|0.581.01(1.42|2.37|
3.66
|
464
|
6.25
|
7.82
|
11.34|
16.27
-
0.71
|
1.06|1.65(2.20|3.36|
4.88
|
599
|
7.78
|
9.49
|
13.38
|
18.47
5
1.14
11.61(2.34|3.00/4.35|
6.06
|
7.29
|
9.24
]
11.07
|
15.09
|
20.52
6
1.63
|
2.20(3.07|3.83|5.35(
7.23
|
8.56
|
10.64]12.59
|
16.81
|
22.46
7
4
2.17
|
2.83|3.82(4.67|6.35|
838
|
9.80
|
12.02]14.07
|
18.48
|
24.32
8
2.73
|
3.49|4,59(5.53|7.34|
9,52
|11.03|13.36]15.51
|
20.09
|
26.12
9
3.32
|4.17
|
5.38(6.39|8.34|
10.66|
12.24
|
14.68]
16.92
|
21.67
|
27.88
10
3.94
(4.86|6.18(7.27|9.34|11.78
|
13.44
|
15.99]1
18.31
|
23.21
|
29.59
2,
Draw
your
Chi
Square
Curve
and
put
in
the
critical
value
(p
=
0.05).
—
Fegection
“—S‘
on
'V\,\/\’WWV-’V\/—Q/
/
|
.
0O
11.07
3.
What
is
the
A?
value
for
your
data?
‘Q-)
o
r:l'
%
Q
A\
4.
Is
your
null
hypothesis
accepted
or
rejected?
Explain
why
or
why
not.
Becose
Hhe
dreh
stabiskic
(Q786)
excesdS
T
(‘,(\\'\ca(
valoe
(1L
0‘1\
+he
fesk
Satistic
value
S
laige
enoyn
1o
determing
$0
(ject
o
nol
\(\\\@W{\m\%