Presentation is loading. Please wait.

Presentation is loading. Please wait.

HS 167Basics of Hypothesis Testing1 (a)Review of Inferential Basics (b)Hypothesis Testing Procedure (c)One-Sample z Test (σ known) (d)One-sample t test.

Similar presentations


Presentation on theme: "HS 167Basics of Hypothesis Testing1 (a)Review of Inferential Basics (b)Hypothesis Testing Procedure (c)One-Sample z Test (σ known) (d)One-sample t test."— Presentation transcript:

1 HS 167Basics of Hypothesis Testing1 (a)Review of Inferential Basics (b)Hypothesis Testing Procedure (c)One-Sample z Test (σ known) (d)One-sample t test (σ estimated with s)

2 HS 167Basics of Hypothesis Testing2 Review of Some Basics Population  all possible values Sample  a portion of the population Statistical inference  generalizing from a sample to a population with calculated degree of certainty Two forms of statistical inference Estimation Hypothesis testing Parameter  a numerical characteristic of a population, e.g., population mean µ, population standard deviation σ Statistic  a numerical characteristic calculated in the sample, e.g., sample mean x-bar, sample standard deviation s

3 HS 167Basics of Hypothesis Testing3 Recall the distinction between parameters and statistics ParametersStatistics SourcePopulationSample Notation Greek (  ) Roman (xbar, s) VaryNoYes CalculatedNoYes

4 HS 167Basics of Hypothesis Testing4 Recall how sample means (xbars) vary The sampling distribution of the mean (SDM) tends to be Normal with mean µ and a standard deviation called the SE

5 HS 167Basics of Hypothesis Testing5 Hypothesis Testing Procedure A. Hypotheses B. Test Statistic C. P-value D. Significance level (optional)

6 HS 167Basics of Hypothesis Testing6 Step A. Hypotheses Take the research question and convert it to statistical hypotheses State statistical hypotheses in null and alternative forms H 0  Null hypothesis  “no difference in the population” H a  Alternative hypothesis  “difference in the population” Seek evidence against H 0 as a way of bolstering H 1

7 HS 167Basics of Hypothesis Testing7 Step B. Test Statistic Calculate the appropriate test statistic There are many types of test statistics, depending on the conditions of the data This Chapter introduces this particular one-sample z statistic:

8 HS 167Basics of Hypothesis Testing8 Step C. P-value Convert z stat to P-value using table or software The P-value is the AUC in the tail of the SDM beyond the test statistics. assuming H 0 is true The P-value answer the question: What is the probability of the observed test statistics or one that is more extreme assuming H 0 is true? Small P-value  good evidence against H 0 Although it unwise to draw too-firm cutoffs, here are guidelines for the beginner: P > 0.10  evidence against H 0 not significant 0.05 < P  0.10  evidence against H 0 marginally significant 0.01 < P  0.05  evidence against H 0 significant P  0.01  evidence against H 0 highly significant Smaller and smaller P-values provide stronger and stronger evidence against

9 HS 167Basics of Hypothesis Testing9 Step D. Significance level (optional) Declare acceptable false rejection (Type I) error rate α α can be set at any level (e.g., 1 in 20, 1 in 50, 1 in 100) When P < α  reject H 0 at α level of significance

10 HS 167Basics of Hypothesis Testing10 Illustrative Example: Lake Wobegon, Study Design Research question: Does a particular population of children have higher than average intelligence scores? Study design Weschler intelligence scores are Normal with µ = 100 and  = 15 Take a SRS Measure WIS  {116, 128, 125, 119, 89, 99, 105, 116, 118} Calculate sample mean: x-bar = 112.8 Ask: Does this provide sufficient evidence that population mean (μ) is greater than expected (100)?

11 HS 167Basics of Hypothesis Testing11 Illustrative Example: Lake Wobegon, Step A Under the null hypothesis of “no difference” H 0 : µ = 100 Under the alternative hypothesis of “difference” H a : µ > 100 Note: (a) Hypotheses address the parameter (not the statistic) (b) The value of the parameter under H 0 is based on the research question (NOT the data)

12 HS 167Basics of Hypothesis Testing12 Illustrative Example: Lake Wobegon, Step B The test statistics for this problem is the one-sample z statistic This statistic assumes H0 is correct It then standardizes the sample mean (i.e., turns it into a z-score):

13 HS 167Basics of Hypothesis Testing13 Illustrative Example: Lake Wobegon, Step C The test statistic is converted to a P-value Assuming H 0 true, where does z stat fall on the curve? P value  area under curve beyond z stat Use Z table (or software) to find Pr(Z ≥ z stat ) = Pr(Z ≥ 2.56) = 0.0052 The P-value of 0.0052 provides strong (“highly significant”) evidence against H 0

14 HS 167Basics of Hypothesis Testing14 Illustrative Example: Lake Wobegon Step D (Optional) P = 0.0052 is highly significant evidence against H 0 The smaller the P, the more significant the evidence. See guidelines in earlier slide.

15 HS 167Basics of Hypothesis Testing15 The one-sided alternative The prior test made a supposition about the direction of the difference The test had a “one-sided H 1 ” We looked only at one side of the SDM

16 HS 167Basics of Hypothesis Testing16 The two-sided alternative Allows for unanticipated findings either up or down from expected two-sided test The requires a two-sided test The two-sided test looks at both tails Just double the one-sided P Lake Wobegon example two-sided P = 2 × 0.0052 = 0.0104

17 HS 167Basics of Hypothesis Testing17 Illustrative example: “Anemia” Research question: A public health official suspects a particular population is anemic Hemoglobin is a protein in red blood cells that carries oxygen People with less than 12 g/dl hemoglobin are anemic We know that hemoglobin levels in children are Normal with standard deviation σ = 1.6 g/dl Data: The researcher measures hemoglobin in 50 children and finds x-bar = 11.3

18 HS 167Basics of Hypothesis Testing18 Step A: Anemia example We seek evidence against µ = 12. Thus, H 0 : µ = 12 The one-sided alternative is H 1 : µ < 12 The two-sided alternative is H 1 : µ  12 Let’s do a two-sided test (much more common in practice)

19 HS 167Basics of Hypothesis Testing19 Step B: Test statistic

20 HS 167Basics of Hypothesis Testing20 Step C. P-value Pr(Z < -3.10) = 0.0010 Double this b/c the alternative is two- sided: P = 2 × 0.0010 = 0.0020 Comment: Under H 0, xbar~N(12, 0.226), I’ll draw this on the board so you see that an x-bar of 11.3 is in the far left tail

21 HS 167Basics of Hypothesis Testing21 Step D: Conclusion P = 0.0020 evidence against H 0 is highly significant

22 HS 167Basics of Hypothesis Testing22 Conditions necessary for z test Simple random sample (SRS) Normal population or large sample  known (not calculated) What do you do when σ is not known?  Use a t procedure!

23 HS 167Basics of Hypothesis Testing23 Diabetic weight illustrative example Claim: “diabetics are over-weight” Data are “% of ideal body weight” n = 18 Sample mean (x-bar) = 112.778 Sample standard deviation (s) = 14.424

24 HS 167Basics of Hypothesis Testing24 Step A: Hypotheses (diabetic weight) Research claim is “diabetics are over-weight” Convert claim to a null hypothesis “Diabetics are not overweight” Not overweight = 100 of ideal body weight Therefore, H 0 : µ = 100 Alternative hypothesis can be H 1 : µ  100 (two-sided) H 1 : µ > 100 (one-sided to right) H 1 : µ < 100 (one-sided to left)

25 HS 167Basics of Hypothesis Testing25 Step B: Test statistic t stat tells you how many standard errors the sample mean falls from hypothesized population mean

26 HS 167Basics of Hypothesis Testing26 Step C: P value (Diabetic weight) t table: wedge t stat between t landmarks Example: t stat = 3.76 on t with 17 df falls between 3.646 (right tail 0.001) and 3.965 (right tail 0.0005) Two-tailed P is twice the one-tailed values: P less than 0.002 and more than 0.001 P = 0.0016 (via software)

27 HS 167Basics of Hypothesis Testing27 Step D: Conclusion P = 0.0016 provides highly significant evidence against H 0

28 HS 167Basics of Hypothesis Testing28 Consequences of test decisions TRUTH DECISION H 0 trueH 0 false Retain H 0 Correct retention type II error Reject H 0 type I error Correct rejection Probability (type I error) =  Probability (type II error) = 

29 HS 167Basics of Hypothesis Testing29 Type II errors (β) We have considered only type I (  ) errors In the next chapter we will take up the issue of type II (  ) errors  Pr(rejecting a false H 0 ) The complement of  is 1 –  ”Power”

30 HS 167Basics of Hypothesis Testing30 Fallacies of hypothesis testing Failure to reject H 0 = acceptance of H 0 (WRONG!) P value = probability H 0 is incorrect (WRONG!) Statistical significance implies biological or social importance (WRONG!)

31 HS 167Basics of Hypothesis Testing31 Beware! Hypothesis testing addresses random error only. It does not account for many problems encountered in practice, such as measurement error and sampling biases


Download ppt "HS 167Basics of Hypothesis Testing1 (a)Review of Inferential Basics (b)Hypothesis Testing Procedure (c)One-Sample z Test (σ known) (d)One-sample t test."

Similar presentations


Ads by Google