Presentation is loading. Please wait.

Presentation is loading. Please wait.

Statistical Hypotheses & Hypothesis Testing. Statistical Hypotheses There are two types of statistical hypotheses. Null Hypothesis The null hypothesis,

Similar presentations


Presentation on theme: "Statistical Hypotheses & Hypothesis Testing. Statistical Hypotheses There are two types of statistical hypotheses. Null Hypothesis The null hypothesis,"— Presentation transcript:

1 Statistical Hypotheses & Hypothesis Testing

2 Statistical Hypotheses There are two types of statistical hypotheses. Null Hypothesis The null hypothesis, denoted by H 0, assumes the sample observations result purely from chance. Alternative Hypothesis The alternative hypothesis, denoted by H 1, states the counter-assumption that sample observations are influenced by some non-random cause. Note: The Alternate Hypothesis is always the logical opposite of the Null Hypothesis. Example: Suppose we wanted to determine whether a coin was fair and balanced. A null hypothesis might be that half the flips would be Heads and half of the flips would be Tails. The alternative hypothesis would be that the number (percent) of Heads and Tails would be very different. Symbolically, these hypotheses would be expressed as: H 0 : р = 0.5where р = Probability of Heads H 1 : р ≠ 0.5

3 Hypothesis Testing Hypothesis testing is a decision making process about accepting or rejecting a statement (assumption) regarding a population parameter. Frequently, hypothesis testing is applied to a assumption about a population mean. For example, test the assumption that the population mean μ is equal to 120 versus μ is not equal to 120; i.e., H 0 : μ = 120 versus H 1 : μ ≠ 120.

4 References David Harper - Bionic Turtle http://www.bionicturtle.com/learn/article/type_i_versus_type_ii_errors_9_minute_tutorial/ http://www.bionicturtle.com/learn/article/hypothesis_testing_9_minute_screencast/ http://www.bionicturtle.com/learn/article/hypothesis_testing_9_minute_screencast/ Null and Alternate Hypothesis http://www.ganesha.org/spc/hyptest.html#hypothesis

5 Hypothesis Testing

6 Suppose we believe the average systolic blood pressure of healthy adults is normally distributed with mean μ = 120 and variance σ 2 = 50. To test this assumption, we sample the blood pressure of 42 randomly selected adults. Sample statistics are Mean ¿ = 122.4 Variance s 2 = 50.3 Standard Deviation s = √50.3 = 7.09 Standard Error = s / √n = 7.09 / √42 = 1.09

7 Central Limit Theorem The distribution of all sample means of sample size n from a Normal Distribution (μ, σ 2 ) is a normally distributed with Mean = μ Variance = σ 2 / n For our case: Mean μ = 120 Variance σ 2 / n = 50 / 42 = 1.19 Note: Theoretically we can test the hypothesis regarding the mean and the hypothesis regarding the variance; however one usually presumes the sample variances are stable from sample to sample and any one sample variance is an unbiased estimator of the population variance. As such, hypothesis testing is most frequently associated with testing assumptions regarding the population mean.

8 Hypothesis Testing Test the assumption H 0 : μ = 120 vs. H 1 : μ ≠ 120 using a level of significance α = 5% Note: If our sample came from the assumed population with mean μ = 120, then we would expect 95% of all sample means of sample size n = 42 to be within ± Z α/2 = ± 1.96

9 a / 2 = 2.5% Confidence Interval 95% Level of Significance a = 5% +Z a/2 = +1.96 -Z a/2 = -1.96 95%

10 Calculate Upper and Lower Bounds on ¿ ¿ Lower = μ – Z α/2 (s /√n) = 120 – 1.96(1.09) =117.9 ¿ Upper = μ + Z α/2 (s /√n) = 120 + 1.96(1.09) =122.1

11 a / 2 = 2.5% Confidence Interval 95% Level of Significance a = 5% +Z a/2 = +1.96 -Z a/2 = -1.96 ¿ Lower = 117.9 ¿ Upper = 122.1 μ = 120 95%

12 Hypothesis Testing Comparisons Compare our sample mean ¿ = 122.4 To the Upper and Lower Limits.

13 a / 2 = 2.5% Confidence Interval 95% Level of Significance a = 5% +Z a/2 = +1.96 -Z a/2 = -1.96 ¿ Lower = 117.9 ¿ Upper = 122.1 μ = 120 95% ¿ = 122.4

14 Hypothesis Testing Conclusions Note: Sample mean ¿ = 122.4 falls outside of the 95% Confidence Interval. We can reach one of two logical conclusions: One, that we expect this to occur for 2.5% of the samples from a population with mean μ = 120. Two, our sample came from a population with a mean μ ≠ 120. Since 2.5% = 1/40 is a rather “rare” event; we opt for the conclusion that our original null hypothesis is false and we reject H 0 : μ = 120 and therefore accept vs. H 1 : μ ≠ 120.

15 Confidence Interval 95% Level of Significance a = 5% ¿ = 122.4 μ ≠ 120 Conclude μ ≠ 120

16 Alternate Method Rather than compare the sample mean to the 95% lower and upper bounds, one can use the Z Transformation for the sample mean and compare the results with ± Z α/2. Z 0 = ( ¿ – μ ) / (s / √n) = (122.4 – 120) / 1.09 = 2.20

17 a / 2 = 2.5% Confidence Interval 95% Level of Significance a = 5% +Z a/2 = +1.96 -Z a/2 = -1.96 95% Z 0 = 2.20

18 Alternate Method Note: Since Z 0 = 2.20 value exceeds Z α/2 =1.96, we reach the same conclusion as before; Reject H 0 : μ = 120 and Accept H 1 : μ ≠ 120.

19 Alternate Method - Extended We can quantify the probability (p-Value) of obtaining a test statistic Z 0 at least as large as our sample Z 0. P( |Z 0 | > Z ) = 2[1- Φ (|Z 0 |)] p-Value = P( |2.20| > Z ) = 2[1- Φ (2.20)] p-Value = 2(1 – 0.9861) = 0.0278 = 2.8% Compare p-Value to Level of Significance If p-Value < α, then reject null hypothesis Since 2.8% < 5%, Reject H 0 : μ = 120 and conclude μ ≠ 120.

20 Hypothesis Testing Errors

21 Hypothesis Testing Suppose we believe the average systolic blood pressure of healthy adults is normally distributed with mean μ = 120 and variance σ 2 = 50. To test this assumption, we sample the blood pressure of 42 randomly selected adults. Sample statistics are Mean ¿ = 122.4 Variance s 2 = 50.3 Standard Deviation s = √50.3 = 7.09 Standard Error = s / √n = 7.09 / √42 = 1.09 Z 0 = ( ¿ – μ ) / (s / √n) = (122.4 – 120) / 1.09 = 2.20

22 a / 2 = 2.5% Confidence Interval 95% Level of Significance a = 5% +Z a/2 = +1.96 -Z a/2 = -1.96 95% Z 0 = 2.20

23 Conclusion (Critical Value) Since Z 0 = 2.20 exceeds Z α/2 = 1.96, Reject H 0 : μ = 120 and Accept H 1 : μ ≠ 120.

24 Conclusion (p-Value) We can quantify the probability (p-Value) of obtaining a test statistic Z 0 at least as large as our sample Z 0. P( |Z 0 | > Z ) = 2[1- Φ (|Z 0 |)] p-Value = P( |2.20| > Z ) = 2[1- Φ (2.20)] p-Value = 2(1 – 0.9861) = 0.0278 = 2.8% Compare p-Value to Level of Significance If p-Value < α, then reject null hypothesis Since 2.8% < 5%, Reject H 0 : μ = 120 and conclude μ ≠ 120.

25 Confidence Interval = 99% Level of Significance α = 1% Z 0 = ( ¿ – μ ) / (s / √n) = (122.4 – 120) / 1.09 = 2.20 Z α/2 = +2.58

26 a / 2 = 0.5% Confidence Interval 99% Level of Significance a = 1% +Z a/2 = +2.58 -Z a/2 = -2.58 99% Z 0 = 2.20

27 Conclusion (Critical Value) Since Z 0 = 2.20 is less than Z α/2 =2.58, Fail to Reject H 0 : μ = 120 and conclude there is insufficient evidence to say H 1 : μ ≠ 120.

28 Conclusion (p-Value) We can quantify the probability (p-Value) of obtaining a test statistic Z 0 at least as large as our sample Z 0. P( |Z 0 | > Z ) = 2[1- Φ (|Z 0 |)] p-Value = P( |2.20| > Z ) = 2[1- Φ (2.20)] p-Value = 2(1 – 0.9861) = 0.0278 = 2.8% Compare p-Value to Level of Significance If p-Value < α, then reject null hypothesis Since 2.8% > 1%, Fail to Reject H 0 : μ = 120 and conclude there is insufficient evidence to say H 1 : μ ≠ 120.

29 Hypothesis Testing Conclusions As can be seen in the previous example, our conclusions regarding the null and alternate hypotheses are dependent upon the sample data and the level of significance. Given different values of sample mean and the sample variance or given a different level of significance, we may come to a different conclusion.

30 Null Hypotheses And Alternate Hypotheses

31 Hypothesis Testing Hypotheses are always about the population and never about the sample. The true value of a hypothesis can never be known or confirmed. Conclusions regarding hypotheses are never absolute and as such are susceptible to some degree of definable/calculable risk of error. Type I Error Rejecting H 0 when H 0 is True Type II Error Failing to Reject H 0 when H 0 is False Probability of Type I Error = α Probability of Type II Error = β

32 Power of the Test Probability of Correctly Rejecting a False Null Hypothesis = 1 - β Probability of Correctly Rejecting H 0 when H 1 is true = 1 - β Probability of Rejecting H 0 when H 0 is False = 1 - β Probability of Accepting H 1 when H 1 is True = 1 - β

33 Probability of Type I and Type II Errors The Level of Significance α establishes the Probability of a Type I Error. The Probability of a Type II Error depends on the magnitude of the true mean and the sample size.

34 Probability of Type II Errors Consider H 0 : μ = μ 0 H 1 : μ ≠ μ 0 Suppose the null hypothesis is false and the true magnitude of the mean is μ = μ 0 + δ. and therefore, that is to say Z 0 is normally distributed with mean and variance 1.

35 Probability of Type II Error Applied Statistics and Probability for Engineers, 3ed, Montgomery & Runger, Wiley 2003


Download ppt "Statistical Hypotheses & Hypothesis Testing. Statistical Hypotheses There are two types of statistical hypotheses. Null Hypothesis The null hypothesis,"

Similar presentations


Ads by Google