Download presentation
Presentation is loading. Please wait.
Published byPhilomena Crawford Modified over 9 years ago
1
Hypothesis testing Draw inferences about a population based on a sample
2
Null Hypothesis expresses no difference Example: H 0 : = 0 Often said “H naught” Or any number Later……. H 0 : 1 = 2
3
Alternative Hypothesis H 0 : = 0; Null Hypothesis H A : = 0; Alternative Hypothesis Researcher’s predictions should be a priori, i.e. before looking at the data
4
-To test a hypothesis about , determine X from a random sample -If H 0 is true, what is the probability of X as far (above or below- 2 tailed) from as the observed X (for a given n)? -Calculate the normal deviate Z = X - x x Normal deviate Population Mean SE of mean Sample Mean
5
How to determine what proportion of a normal population lies above/below a certain level 120 cm The average Hobbit If distribution of Hobbit heights is normal with mean = 120 cm, SD = 20 Half 120 What is probability of finding a Hobbit taller than 130 cm??
6
Calculate the normal deviate Z = X i - - Normal deviate - Test statistic - Any point on normal curve - Here, 130 cm Mean SD Z = (130-120)/20 = 0.5
7
- Calculate P (Z); table 2.B Zar, Table A in S&R) -If Z is large, the probability that H 0 is true is small -Pre-selected probability level, , that you require to reject the null, referred to as significance level -0.05 is common -If Z (test statistic) is larger than critical value, then H 0 is rejected -If Z (test statistic) is smaller than critical value, then H 0 is not rejected (failure to reject null)
8
P (probability) (X i >130 cm) = P (Z>0.50) = 0.3085 or 30.85% What is the probability of finding a hobbit between 120cm and 130cm tall? Table B.2; Zar Table A S & R
9
density 120cm 130cm Area = 0.3085 or 30.85% 0 0.5 density Area = 0.3085 or 30.85%
10
BE AWARE!! Different tables will give you different areas under the curve. You need to know what the table you are looking at is actually telling you!! S&R Table A Your book gives you this area (0.1915) You want this area: 0.5 - 0.1915=0.3085 120cm 130cm
11
Statistical Error Sometimes H 0 will be rejected (based on large test statistic & small P value) even though H 0 is really true i.e., if you had been able to measure the entire population, not a sample, you would have found no difference between and some value- but based on Xbar you see a difference. The mistake of rejecting a true H 0 will happen with frequency So, if H 0 is true, it will be rejected ~5% of the time as frequently = 0.05
12
0 0 20 Population mean = 0 Sample mean = 20 Conclude based on sample mean that population mean 0, but it really does (H 0 true), therefore you have falsely rejected H 0 Type 1 Error population=“True” Sample=What you see H 0 : mean = 0
13
Statistical Error Sometimes H 0 will be accepted (based on small test statistic & large P value) even though H 0 is really false i.e., if you had been able to measure the entire population, not a sample, you would have found a difference between and some value- but based on Xbar you do not see a difference. The mistake of accepting a false H 0 will happen with frequency β
14
0 Sample mean = 0 0 20 Sample mean = 20 Conclude based on sample mean that population mean = 0, but it really does not (H 0 really false), therefore you have falsely failed to reject H 0 Type 2 Error Population= “True” Sample= what you see H 0 : mean = 0 20
15
Finicky Words Reject the null hypothesis (or other) Fail to reject the null hypothesis Prove the null hypothesis to be true Accept the null hypothesis Support the null hypothesis Statistically correct I think these are OK
16
H 0 is true H 0 Is not true H 0 Is rejectedType I errorNo error H 0 Is not rejectedNo errorType II error
17
Probability of Type I Error= Probability of Type II Error= rarely known or reported power of a test = (1- ) = probability of rejecting null hypothesis that is really false and that should be rejected For a given N, and inversely related Both types of Error go down as you increase N Read pgs 157-169 in S&R
18
A few more words on hypothesis testing Methods trace to R.A. Fisher and colleagues. Before this, opinion of expert was criterion.R.A. Fisher Many practicing / publishing statisticians take issue with the null hypothesis and testing framework (see upcoming quotes) Still the dominant paradigm of analysis and you have to learn it “Under the usual teaching, the trusting student, to pass the course must forsake all the scientific sense that (s)he has accumulated so far, and learn the book, mistakes and all." (Deming 1975) "Small wonder that students have trouble [with statistical hypothesis testing]. They may be trying to think." (Deming 1975)
19
"... surely, God loves the.06 nearly as much as the.05." (Rosnell and Rosenthal 1989)
20
"What is the probability of obtaining a dead person (D) given that the person was hanged (H); that is, in symbol form, what is p(D|H)? Obviously, it will be very high, perhaps.97 or higher. Now, let us reverse the question: What is the probability that a person has been hanged (H) given that the person is dead (D); that is, what is p(H|D)? This time the probability will undoubtedly be very low, perhaps.01 or lower. No one would be likely to make the mistake of substituting the first estimate (.97) for the second (.01); that is, to accept.97 as the probability that a person has been hanged given that the person is dead. Even thought this seems to be an unlikely mistake, it is exactly the kind of mistake that is made with the interpretation of statistical significance testing---by analogy, calculated estimates of p(H|D) are interpreted as if they were estimates of p(D|H), when they are clearly not the same." (Carver 1978)
21
One sample, two tailed tests concerning means Does the body temperature of a group of 24 crabs differ from room temperature TweetyBird parakeet food company wants to know if their mega-bird formulation helps birds grow. They measure the weight gain/loss of 40 birds eating the food for one week. Does this differ from zero. Describe other scenarios…..
22
Null; H 0 : = room temp Alternative; H A : ≠ room temp One sample, two tailed tests concerning means Crab Temperature Must determine if sample mean (xbar) is different from room temp
23
Similar to calculating normal deviate, calculate “t” t = X - s x t-statistic Value to which you compare Sample SE Sample Mean
24
William Sealy Gosset (1876 –1937) Mathematician worked as brewer for Guinness Guinness progressive agro-chemical business, Gosset applied statisticas in brewery and farm selection of best varieties of barley. Guinness prohibited publishing by employees due to worry over trade secrets Used pseudonym “Student” and his most famous achievement now referred to as the Student t-distribution Gosset was a friend of both Pearson and Fisher, an achievement, for each had a massive ego and a loathing for the other. Gosset was a modest man who cut short an admirer with the comment that “Fisher would have discovered it all anyway.”
25
One sample, two tailed tests concerning means Crab Temperature For the crabs: =.05 (set by you ahead) =24.3 C Xbar= 25.03 C = 24 (n-1) S 2 (variance)= 1.80 C 2 s x = sxsx = s n 1.80 C 2 25 sxsx = s2s2 n t = X - s x Sample SE SDVariance Mean SS
26
t = X - s x t = 25.03 C – 24.3 C 0.27 C 2 = 2.704 t 0.05(2) = 2.064 (critical t from table B in S&R, B3 in Zar) test statistic (t) > critical t ……. Reject null hypothesis, conclude sample did not come from population with body temp of 24.3 Excel demo
27
density t for = 24, =0.05 0 2.064 -2.064 Critical value t- distribution = normal distribution for very large sample sizes Area outside critical values represent 5% total area Expect xbar so far from that it lies in critical area only 5 % of time 2.704=t 2.5%
28
If p<0.05 (or your chosen ), expect to get a values as extreme as the observed based on chance alone 5% (or your chosen %) of the time Expect to falsely reject null ~5% of the time H 0 is true H 0 Is not true H 0 Is rejectedType I errorNo error H 0 Is not rejected No errorType II error
29
Theoretical basis of t testing assumes that the sample came from a normal population But….. minor deviation from normality not does not affect validity, ie test is “robust from deviation from normality” Effect of deviation from normality more important with small Effect of deviation from normality decreases as N increases Assumptions of a t-test
30
Assumes that data are random sample Data must be true replicates (can’t measure the same crab 25 times; Hurlbert 1984, more later)
31
One sample, one tailed tests concerning means Does a drug cause weight loss? The Jamesville county school board has mandated that the mean standardized reading test scores should be above 440. Oak elementary school wants to know if their mean test score > 440. Describe other scenarios…..
32
One sample, one tailed tests concerning means Weight loss product Null; H 0 : ≥ 0; weight gain or no change, ie no loss Alternative; H A : <0; weight loss Must determine if sample mean weight gain (xbar) is different from 0
33
One sample, one tailed tests concerning means Weight loss For weight loss: =.05 (set by you ahead) =0 kg Xbar= -0.61 kg = 11 (n-1) S 2 (variance)= 0.4008kg 2 s x = sxsx = s n 0.4008kg 2 12 sxsx = s2s2 n t = X - s x Sample SE SDVariance Mean SS
34
t = X - s x t = -.61kg -0kg 0.18 kg = -3.389 t 0.05(11) = 1.796 (critical t from table B3; table gives you critical t for 2-tails) test statistic (t) > critical t ……. Reject null hypothesis, support alternative hypothesis of weight loss Excel demo
35
density t for = 24, =0.05 0 2.064 -2.064 Xbar expected in tails only 5% of the time, then 95% of the time Xbar lies in this region Confidence limits of mean
36
So, if we know xbar and SE and degrees of freedom, we can calculate an interval in which we will be 95% (or other value) confident that the “true mean” ( ) falls Confidence limits of mean X ± t (2), * s x For the crabs….. CI= mean ± (critical t * SE) 25.03 ± (2.064 *.27) 25.03 ± 0.56
37
density t for = 24, =0.05 25.03 25.59 24.47 Xbar expected in tails only 5% of the time, then 95% of the time Xbar lies in this region Confidence limits of mean
38
CI is two tailed The smaller SE, the smaller CI. We have more precise estimate of when SE small A large N results in smaller SE Parameter estimate from large sample more precise than from small sample
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.