- 99 Views
- Uploaded on
- Presentation posted in: General

Statistical Hypotheses & Hypothesis Testing

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Statistical Hypotheses

&

Hypothesis Testing

- There are two types of statistical hypotheses.
- Null Hypothesis
- The null hypothesis, denoted by H0, assumes the sample observations result purely from chance.
- Alternative Hypothesis
- The alternative hypothesis, denoted by H1, 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 andhalf 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:
- H0: р = 0.5where р = Probability of Heads
- H1: р ≠ 0.5

- 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., H0: μ = 120 versus H1: μ ≠ 120.

- 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

- Suppose we believe the average systolic blood pressure of healthy
- adults is normally distributedwith 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 s2 = 50.3

Standard Deviation s = √50.3 = 7.09

Standard Error = s / √n = 7.09 / √42 = 1.09

- 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 μ = 120Variance σ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.

- Test the assumption
- H0: μ = 120 vs. H1: μ ≠ 120using 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

Confidence Interval 95%

Level of Significance a = 5%

a / 2 = 2.5%

a / 2 = 2.5%

95%

+Za/2 = +1.96

-Za/2 = -1.96

- ¿Lower = μ – Zα/2 (s /√n) = 120 – 1.96(1.09) =117.9
- ¿Upper = μ + Zα/2 (s /√n) = 120 + 1.96(1.09) =122.1

Confidence Interval 95%

Level of Significance a = 5%

a / 2 = 2.5%

a / 2 = 2.5%

95%

μ = 120

-Za/2 = -1.96

+Za/2 = +1.96

¿Upper = 122.1

¿Lower = 117.9

- Compare our sample mean ¿ = 122.4
- To the Upper and Lower Limits.

Confidence Interval 95%

Level of Significance a = 5%

a / 2 = 2.5%

a / 2 = 2.5%

95%

μ = 120

¿ = 122.4

-Za/2 = -1.96

+Za/2 = +1.96

¿Upper = 122.1

¿Lower = 117.9

- 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 H0: μ = 120 and therefore accept vs. H1: μ ≠ 120.

Confidence Interval 95%

Level of Significance a = 5%

μ ≠ 120

¿ = 122.4

Conclude μ ≠ 120

- 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.
- Z0 = ( ¿ – μ ) / (s / √n) = (122.4 – 120) / 1.09 = 2.20

Confidence Interval 95%

Level of Significance a = 5%

a / 2 = 2.5%

a / 2 = 2.5%

95%

Z0 = 2.20

+Za/2 = +1.96

-Za/2 = -1.96

- Note: Since Z0= 2.20 value exceeds Zα/2 =1.96, we
- reach the same conclusion as before;
- Reject H0: μ = 120 and Accept H1: μ ≠ 120.

- We can quantify the probability (p-Value) of
- obtaining a test statistic Z0 at least as large as our sample Z0.
- P( |Z0| > Z ) = 2[1- Φ (|Z0|)]
- 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 H0: μ = 120 and conclude μ ≠ 120.

- 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 s2 = 50.3

Standard Deviation s = √50.3 = 7.09

Standard Error = s / √n = 7.09 / √42 = 1.09

Z0 = ( ¿ – μ ) / (s / √n) = (122.4 – 120) / 1.09 = 2.20

Confidence Interval 95%

Level of Significance a = 5%

a / 2 = 2.5%

a / 2 = 2.5%

95%

Z0 = 2.20

+Za/2 = +1.96

-Za/2 = -1.96

- Since Z0= 2.20 exceeds Zα/2 = 1.96,
- Reject H0: μ = 120 and Accept H1: μ ≠ 120.

- We can quantify the probability (p-Value) of
- obtaining a test statistic Z0 at least as large as our sample Z0.
- P( |Z0| > Z ) = 2[1- Φ (|Z0|)]
- 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 H0: μ = 120 and conclude μ ≠ 120.

- Z0 = ( ¿ – μ ) / (s / √n) = (122.4 – 120) / 1.09 = 2.20
- Zα/2 = +2.58

Confidence Interval 99%

Level of Significance a = 1%

a / 2 = 0.5%

a / 2 = 0.5%

99%

Z0 = 2.20

+Za/2 = +2.58

-Za/2 = -2.58

- Since Z0= 2.20 is less than Zα/2 =2.58,
- Fail to Reject H0: μ = 120 and conclude
- there is insufficient evidence to say H1: μ ≠ 120.

- We can quantify the probability (p-Value) of
- obtaining a test statistic Z0 at least as large as our sample Z0.
- P( |Z0| > Z ) = 2[1- Φ (|Z0|)]
- 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 H0: μ = 120 and conclude
- there is insufficient evidence to say H1: μ ≠ 120.

- 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.

Null Hypotheses

And

Alternate Hypotheses

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 H0 when H0 is True

Type II Error Failing to Reject H0 when H0 is False

Probability of Type I Error = α

Probability of Type II Error = β

Power of the Test

Probability of Correctly Rejecting a False Null Hypothesis = 1 - β

Probability of Correctly Rejecting H0 when H1 is true = 1 - β

Probability of Rejecting H0 when H0 is False = 1 - β

Probability of Accepting H1 when H1 is True = 1 - β

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.

Probability of Type II Errors

Consider

H0: μ = μ0

H1: μ ≠ μ0

Suppose the null hypothesis is false and the true magnitude of the mean is μ = μ0 + δ.

and therefore , that is to say

Z0 is normally distributed with mean and variance 1.

Probability of Type II Error

Applied Statistics and Probability for Engineers, 3ed, Montgomery & Runger, Wiley 2003