Basics of Hypothesis Testing

download Basics of Hypothesis Testing

of 31

  • date post

    31-Dec-2015
  • Category

    Documents

  • view

    46
  • download

    2

Embed Size (px)

description

Basics of Hypothesis Testing. Review of Inferential Basics Hypothesis Testing Procedure One-Sample z Test ( σ known) One-sample t test ( σ estimated with s ). Review of Some Basics. Population  all possible values Sample  a portion of the population - PowerPoint PPT Presentation

Transcript of Basics of Hypothesis Testing

  • Basics of Hypothesis TestingReview of Inferential Basics Hypothesis Testing ProcedureOne-Sample z Test ( known)One-sample t test ( estimated with s)

    Basics of Hypothesis Testing

  • Review of Some BasicsPopulation all possible valuesSample a portion of the population Statistical inference generalizing from a sample to a population with calculated degree of certainty Two forms of statistical inference EstimationHypothesis testingParameter 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

    Basics of Hypothesis Testing

  • Recall the distinction between parameters and statistics

    ParametersStatistics SourcePopulationSampleNotationGreek (m, s)Roman (xbar, s)VaryNoYesCalculatedNoYes

    Basics of Hypothesis Testing

  • Recall how sample means (xbars) varyThe sampling distribution of the mean (SDM) tends to be Normal with mean and a standard deviation called the SE

    Basics of Hypothesis Testing

  • Hypothesis Testing ProcedureA. HypothesesB. Test StatisticC. P-valueD. Significance level (optional)

    Basics of Hypothesis Testing

  • Step A. HypothesesTake the research question and convert it to statistical hypotheses State statistical hypotheses in null and alternative formsH0 Null hypothesis no difference in the populationHa Alternative hypothesis difference in the populationSeek evidence against H0 as a way of bolstering H1

    Basics of Hypothesis Testing

  • Step B. Test StatisticCalculate the appropriate test statistic There are many types of test statistics, depending on the conditions of the dataThis Chapter introduces this particular one-sample z statistic:

    Basics of Hypothesis Testing

  • Step C. P-valueConvert zstat to P-value using table or softwareThe P-value is the AUC in the tail of the SDM beyond the test statistics.The P-value answer the question: What is the probability of the observed test statistics or one that is more extreme assuming H0 is true?Small P-value good evidence against H0 Although it unwise to draw too-firm cutoffs, here are guidelines for the beginner:P > 0.10 evidence against H0 not significant0.05 < P 0.10 evidence against H0 marginally significant0.01 < P 0.05 evidence against H0 significantP 0.01 evidence against H0 highly significantSmaller and smaller P-values provide stronger and stronger evidence against

    Basics of Hypothesis Testing

  • 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 H0 at level of significance

    Basics of Hypothesis Testing

  • Illustrative Example: Lake Wobegon, Study DesignResearch question: Does a particular population of children have higher than average intelligence scores?Study design Weschler intelligence scores are Normal with = 100 and s = 15Take 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)?

    Basics of Hypothesis Testing

  • Illustrative Example: Lake Wobegon, Step AUnder the null hypothesis of no difference H0: = 100Under the alternative hypothesis of difference Ha: > 100 Note: (a) Hypotheses address the parameter (not the statistic) (b) The value of the parameter under H0 is based on the research question (NOT the data)

    Basics of Hypothesis Testing

  • Illustrative Example: Lake Wobegon, Step BThe test statistics for this problem is the one-sample z statisticThis statistic assumes H0 is correctIt then standardizes the sample mean (i.e., turns it into a z-score):

    Basics of Hypothesis Testing

  • Illustrative Example: Lake Wobegon, Step CThe test statistic is converted to a P-valueAssuming H0 true, where does zstat fall on the curve?P value area under curve beyond zstat Use Z table (or software) to find Pr(Z zstat) = Pr(Z 2.56) = 0.0052The P-value of 0.0052 provides strong (highly significant) evidence against H0

    Basics of Hypothesis Testing

  • Illustrative Example: Lake Wobegon Step D (Optional)P = 0.0052 is highly significant evidence against H0The smaller the P, the more significant the evidence.See guidelines in earlier slide.

    Basics of Hypothesis Testing

  • The one-sided alternativeThe prior test made a supposition about the direction of the difference The test had a one-sided H1

    We looked only at one side of the SDM

    Basics of Hypothesis Testing

  • The two-sided alternativeAllows for unanticipated findings either up or down from expectedThe requires a two-sided test The two-sided test looks at both tails Just double the one-sided PLake Wobegon example two-sided P = 2 0.0052 = 0.0104

    Basics of Hypothesis Testing

  • Illustrative example: AnemiaResearch question: A public health official suspects a particular population is anemicHemoglobin is a protein in red blood cells that carries oxygenPeople with less than 12 g/dl hemoglobin are anemicWe know that hemoglobin levels in children are Normal with standard deviation = 1.6 g/dlData: The researcher measures hemoglobin in 50 children and finds x-bar = 11.3

    Basics of Hypothesis Testing

  • Step A: Anemia exampleWe seek evidence against = 12. Thus, H0: = 12The one-sided alternative is H1: < 12The two-sided alternative is H1: 12Lets do a two-sided test (much more common in practice)

    Basics of Hypothesis Testing

  • Step B: Test statistic

    Basics of Hypothesis Testing

  • Step C. P-valuePr(Z < -3.10) = 0.0010Double this b/c the alternative is two-sided: P = 2 0.0010 = 0.0020Comment: Under H0, xbar~N(12, 0.226), Ill draw this on the board so you see that an x-bar of 11.3 is in the far left tail

    Basics of Hypothesis Testing

  • Step D: ConclusionP = 0.0020 evidence against H0 is highly significant

    Basics of Hypothesis Testing

  • Conditions necessary for z testSimple random sample (SRS)Normal population or large sample s known (not calculated)What do you do when is not known? Use a t procedure!

    Basics of Hypothesis Testing

  • Diabetic weight illustrative exampleClaim: diabetics are over-weightData are % of ideal body weight n = 18Sample mean (x-bar) = 112.778 Sample standard deviation (s) = 14.424

    Basics of Hypothesis Testing

  • Step A: Hypotheses (diabetic weight)Research claim is diabetics are over-weightConvert claim to a null hypothesisDiabetics are not overweightNot overweight = 100 of ideal body weightTherefore, H0: = 100Alternative hypothesis can be H1: 100 (two-sided)H1: > 100 (one-sided to right)H1: < 100 (one-sided to left)

    Basics of Hypothesis Testing

  • Step B: Test statistictstat tells you how many standard errors the sample mean falls from hypothesized population mean

    Basics of Hypothesis Testing

  • Step C: P value (Diabetic weight)t table: wedge tstat between t landmarksExample: tstat = 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.001P = 0.0016 (via software)

    Basics of Hypothesis Testing

  • Step D: ConclusionP = 0.0016 provides highly significant evidence against H0

    Basics of Hypothesis Testing

  • Consequences of test decisionsProbability (type I error) = aProbability (type II error) = b

    TRUTHDECISIONH0 trueH0 falseRetain H0 Correct retentiontype II errorReject H0type I errorCorrect rejection

    Basics of Hypothesis Testing

  • Type II errors ()We have considered only type I (a) errors In the next chapter we will take up the issue of type II (b) errorsb = Pr(rejecting a false H0)The complement of b is 1 b = Power

    Basics of Hypothesis Testing

  • Fallacies of hypothesis testingFailure to reject H0 = acceptance of H0 (WRONG!)P value = probability H0 is incorrect (WRONG!)Statistical significance implies biological or social importance (WRONG!)

    Basics of Hypothesis Testing

  • Beware!Hypothesis testing addresses random error only. It does not account for many problems encountered in practice, such as measurement error and sampling biases

    Basics of Hypothesis Testing

    Unit 6: Intro to hypothesis testingBiostat