Null hypothesis
Download
Report
Transcript Null hypothesis
The Chi square hypothesis test
• Chi squared is a means of Hypothesis testing: χ2
• Chi-squared= = Σ _(O-E)2
E
The Chi Squared test can
help make an impartial
judgment about data.
Example: Form a hypothesis and test it
• Hypothesis: “That quarter is loaded!”
• Test: Toss the coin ten times, and count the
number of heads.
Compare results to expectations using chi-squared
test!
Steps in Chi-Square analysis
•
•
•
•
1. Form a null hypothesis (H0)
2. Calculate Chi-square
3. Determine degrees of freedom
4. Decide on minimum acceptable confidence
level (usually 95%)
• 5. Obtain P-value
• 6. Evaluate null hypothesis (reject/ fail to
reject)
Steps in chi-square analysis
• 1. Form a Null hypothesis: Ho =“ The coin isn’t
loaded, and any differences between my
results and what I expect are just due to luck.”
• A null hypothesis is a hypothesis set up to be
nullified. It is created in order to support an
alternative hypothesis (“my friend is a scam
artist with a loaded coin!”)
Experimental results
Heads
Number of 8
results
What do you think?
Tails
2
Step 2: Calculate Chi Squared
Σ= sigma= “sum of”
Σ(O-E)2/E=sum of (Observed –
Expected)2/expected = (8 heads - 5
heads)2 + (2 tails- 5 tails)2/ 5 heads
= (9/5) + (9/5) = 3.6
• Chi-squared can tell
you the likelihood
your results are just
due to chance
• What do we expect,
according to the
null hypothesis?
• What did we
observe?
• (8-5)2/5 + (2-5)2/5 =
18/5 = 3.6= χ2
Step 3: Determine degrees of
freedom
• df = number of possible outcomes-1
• For us: outcome 1: “heads”,
outcome 2: “tails”
• Therefore 2 possible outcomes – 1= 1= df
Step 4: Decide upon a minimum
acceptable level of confidence
• How much confidence
must we have in our
answer?
• P = .05: 95% confidence
• P = .01: 99% confidence
Degrees of freedom =
number of boxes – 1
(we have 2 boxes,
therefore 1 df)
df
P = 0.05
P = 0.01
P=
0.001
1
3.84
6.64
10.83
2
5.99
9.21
13.82
3
7.82
11.35
16.27
4
9.49
13.28
18.47
5
11.07
15.09
20.52
In the boxes: chisquared values
We must have a
χ2 value greater
than this to
reject at 95%
confidence
Step 5: Evaluate null hypotheis
• So, is the coin loaded?
• Since we require a
greater than 95%
confidence in order to
reject our null
hypothesis (χ2> 3.84),
we cannot reasonably
claim the coin is loaded.
• Fail to reject Ho!
Your homework
• Determine using chi square if the genes in
problem 4 of last week’s quiz are linked.
• What is our null hypothesis?
• What are our observed values?
• What are our expected values?
• What is our value of chi-squared?
• How many possible outcomes are there?
• Degrees of freedom?
• P-value?
• Reject or fail to reject Ho?
Another question: Quiz “Problem
6½”
• In a farm in Brno, Czech Republic, Gregor
Mendel was doing the same cross, and got the
following results:
• Parental: 470 + 455
• Recombinant: 35 + 40
You think Gregor Mendel is a sketchy character
who doesn’t do his crosses correctly. Did he
make a mistake? Did you? Compare his
results with yours using chi-square.
Applying the Chi-squared test to your
drosophila experiment
•
•
•
•
•
Is your gene sex-linked?
Autosomal?
Dominant?
Recessive?
Make a hypothesis:
Aldox is dominant!
• Make your cross
• Count the offspring
• What results would you
expect if your hypothesis
were true?