hypothesis testing. want to know something about a population take a sample from that population...
TRANSCRIPT
![Page 1: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/1.jpg)
Hypothesis testing
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
![Page 2: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/2.jpg)
Hypothesis testing
• Want to know something about a population
• Take a sample from that population• Measure the sample• What would you expect the sample to
look like under the null hypothesis?• Compare the actual sample to this
expectation
![Page 3: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/3.jpg)
population
sample
Y = 2675.4
![Page 4: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/4.jpg)
Hypothesis testing
• Hypotheses are about populations
• Tested with data from samples
• Usually assume that sampling is random
![Page 5: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/5.jpg)
Types of hypotheses
• Null hypothesis - a specific statement about a population parameter made for the purposes of argument
• Alternate hypothesis - includes other possible values for the population parameter besides the value states in the null hypothesis
![Page 6: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/6.jpg)
The null hypothesis is usually the simplest
statement, whereas the alternative hypothesis
is usually the statement of greatest
interest.
![Page 7: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/7.jpg)
A good null hypothesis would be interesting if proven wrong.
![Page 8: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/8.jpg)
A null hypothesis is specific; an alternate hypothesis is not.
![Page 9: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/9.jpg)
Hypothesis testing: exampleCan sheep recognize each other?
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
![Page 10: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/10.jpg)
The experiment and the results
• Sheep were trained to get a reward near a certain other sheep’s picture
• Then placed in a Y-shaped maze
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
You must choose…
![Page 11: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/11.jpg)
Stating the hypotheses
H0: Sheep go to each face with equal probability (p = 0.5).
HA: Sheep choose one face over the other (p ≠ 0.5).
![Page 12: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/12.jpg)
Estimating the value
• 16 of 20 is a proportion of p = 0.8
• This is a discrepancy of 0.3 from the proportion proposed by the null hypothesis, p =0.5
![Page 13: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/13.jpg)
Null distribution
• The null distribution is the sampling distribution of outcomes for a test statistic under the assumption that the null hypothesis is true
![Page 14: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/14.jpg)
Proportion of correct choices
Probability
0 0.000001
1 0.00002
2 0.00018
3 0.0011
4 0.0046
5 0.015
6 0.037
7 0.074
8 0.12
9 0.16
10 0.18
11 0.16
12 0.12
13 0.074
14 0.037
15 0.015
16 0.0046
17 0.0011
18 0.00018
19 0.00002
20 0.000001
![Page 15: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/15.jpg)
• Test statistic = a quantity calculated from the data that is used to evaluate how compatable the data are with the expectation under the null hypothesis
![Page 16: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/16.jpg)
The null distribution of p
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Number of correct choices
Frequency
Test statistic = 16
![Page 17: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/17.jpg)
The null distribution of p
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Number of correct choices
Frequency
Values at least as extreme as the test statistic
![Page 18: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/18.jpg)
• P-value - the probability of obtaining the data* if the null hypothesis were true
*as great or greater difference from the null hypothesis
![Page 19: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/19.jpg)
![Page 20: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/20.jpg)
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Number of correct choices
Frequency
P = 0.012
P-value
![Page 21: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/21.jpg)
P-value calculation
P
=2*(Pr[16]+Pr[17]+Pr[18]+Pr[19]+Pr[20])
=2*(0.005+0.001+0.0002+0.00002+0.000001)
= 0.012
![Page 22: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/22.jpg)
How to find P-values
• Get test statistic
• Compare with null distribution from:– Simulation– Parametric tests– Non-parametric tests– Re-sampling
![Page 23: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/23.jpg)
Statistical significance
The significance level, α, i s a probability used as a criterion
for rejecti ng the nul l hypothesi .s If th e P-valu e for a test is
less than or equal t o α, the n the null hypothesi s is rejecte .d
![Page 24: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/24.jpg)
α is often 0.05
![Page 25: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/25.jpg)
Significance for the sheep example
• P = 0.012
• P < α, so we can reject the null hypothesis
![Page 26: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/26.jpg)
Larger samples give more information
• A larger sample will tend to give and estimate with a smaller confidence interval
• A larger sample will give more power to reject a false null hypothesis
![Page 27: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/27.jpg)
Hypothesis testing: another exampleThe genetics of symmetry in flowers
Heteranthera - Mud plantain
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
![Page 28: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/28.jpg)
Stigma and anthers are asymmetric in different genotypes
![Page 29: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/29.jpg)
Can the pattern of inheritance be explained by a single locus
with simple dominance? Model predicts a 3:1 ratio of right-handed
flowers
H0: Right- and left-handed offspring occur at a 3:1 ratio (the proportion of right-handed individuals in the offspring population is p = 3/4)
HA: Right- and left-handed offspring do not occur at a 3:1 ratio (p ≠ 3/4)
![Page 30: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/30.jpg)
Data
Of 27 offspring, 21 were “right-handed” and 6 were “left-handed.”
![Page 31: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/31.jpg)
Estimating the proportion
€
ˆ p =21
27= 0.778
* The “hat” notation denotes an estimate for apopulation parameter from a sample
![Page 32: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/32.jpg)
Number of right-handed flowers in a random sampleof 27
Probability
0-8 09 0.00000510 0.00003111 0.00012412 0.00049213 0.00175214 0.00530115 0.01383016 0.03109417 0.06067318 0.10089119 0.14305120 0.17233921 0.17178222 0.14103423 0.09147724 0.04549925 0.01640926 0.00375927 0.000457
Sampling distribution of null hypothesis
![Page 33: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/33.jpg)
![Page 34: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/34.jpg)
P = 0.83.
The P-value:
![Page 35: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/35.jpg)
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
Rock-paper-scissors battle
![Page 36: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/36.jpg)
Jargon
![Page 37: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/37.jpg)
Significance level
• A probability used as a criterion for rejecting the null hypothesis
• Called α• If p < α, reject the null hypothesis
• For most purposes, α = 0.05 is acceptable
![Page 38: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/38.jpg)
Type I error
• Rejecting a true null hypothesis
• Probability of Type I error is α (the significance level)
![Page 39: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/39.jpg)
Type II error
• Not rejecting a false null hypothesis
• The probability of a Type II error is
• The smaller , the more power a test has
![Page 40: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/40.jpg)
Power
• The probability that a random sample of a particular size will lead to rejection of a false null hypothesis
• Power = 1-
![Page 41: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/41.jpg)
![Page 42: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/42.jpg)
Reality
Result
Ho true Ho false
Reject Ho
Do not reject Ho correct
correctType I error
Type II error
![Page 43: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/43.jpg)
One- and two-tailed tests
• Most tests are two-tailed tests
• This means that a deviation in either direction would reject the null hypothesis
• Normally α is divided into α/2 on one side and α/2 on the other
![Page 44: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/44.jpg)
Test statistic
![Page 45: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/45.jpg)
One-sided tests
• Also called one-tailed tests
• Only used when one side of the null distribution is nonsensical
• For example, comparing grades on a multiple choice test to that expected by random guessing
![Page 46: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/46.jpg)
Critical value
• The value of a test statistic beyond which the null hypothesis can be rejected
![Page 47: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/47.jpg)
“Statistically significant”
• P < α
• We can “reject the null hypothesis”
![Page 48: Hypothesis testing. Want to know something about a population Take a sample from that population Measure the sample What would you expect the sample to](https://reader036.vdocument.in/reader036/viewer/2022062321/56649e0d5503460f94af6e87/html5/thumbnails/48.jpg)
We never “accept the null hypothesis”