QMTH 206 Hypothesis Testing In statistics, a hypothesis is by cap19913

VIEWS: 20 PAGES: 6

									QMTH 206                               Hypothesis Testing

In statistics, a hypothesis is a claim, an assertion, or a statement of belief, in which there is some doubt.
Statistical hypothesis testing is a method of statistical analysis for deciding if the hypothesis is
believable.

Example: You want to buy a new car for $22,000 and your decision criterion is that it must get an
average mpg of more then 30 mpg. The salesperson says it does. Do you believe them? What do you
do?

Solution: Take the car for a trip and compute the mpg for the trip.

Example: Suppose that the mpg for the trip is 31.4 mpg (one sample point). Is this good enough to
decide to buy the car?

Statistical hypothesis testing provides a standard procedure for testing such situations to make the
decision.

First: put problem into a statistical context
        - Define a random variable X that relates to the problem.
                       EX. In this car example, let
                               X = the mpg for a single trip, and
                                μ = mean or average mpg for all trips.

       - Assume the r.v. X has a probability distribution which is defined by a parameter which has an
       unknown value.
                      EX. In the car example, assume X ~ N(μ, σ),
                             where we do not know the actual value of μ.

Steps for statistical analysis are:
       - Take a sample of size = n from the population
       - From sample, compute the best estimate of the unknown value of the parameter
       - Using this best estimate, compute a confidence interval for this parameter
       - Using this best estimate, test hypothesis about the unknown value of this parameter

Set up the hypothesis in the format:
        Ho: the null hypothesis
        Ha: the alternative hypothesis
               where the alternative hypothesis is the opposite of the null hypothesis

In statistical hypothesis testing, these hypothesses are NOT equally weighted!
 Example: A man (or woman) is on trial for murder. For the jury to decide if he is guilty
 they must believe the evidence shows he is guilty beyond a reasonable doubt.
 So here the hypotheses are
                              Ho: not guilty (status quo for the defendant - no change)
                              Ha: guilty     (big change for the defendant - jail)
QMTH 206                                  Hypothesis Testing 1                                         Page 2

In statistical hypothesis testing, you do not reject a null hypothesis (Ho) unless there is significant
evidence that Ho is NOT true, and then you would reject Ho and accept Ha.

An interpretation of the "null" hypothesis is that it is the hypothesis of no change, that is, a hypothesis
of maintaining the status quo.
  Ex: In the murder trial, Ho represents that the defendant’s life stays the same (no change
  in his life style), while Ha represents a big life change (go to jail for a long time).

  Ex: In car MPG example, the hypotheses are
                             Ho: not buy the car (status quo - no change)
                             Ha: buy the car (big change - have a car but not $22,000)

  *HW: Chapter 9, #2a, 3a, 4a


The statistical hypotheses must be written in terms of the population mean’s parameter value: µ

  Ex: In the car mpg, let the r.v. X = mpg on a trip and assuming X ~ N (µ, σ) then write
  the hypothesis in terms of µ= mean mpg of the car and the hypothetical µ0 = 30 mpg:

  Ho: µ < 30 mpg       Ho: µ < µ0
  Ha: µ > 30 mpg       Ha: µ > µ0          an upper tail setup
           ↑
           µ0 = 30 in this example - this is the hypothetical value being tested against

How is this hypothesis tested?

Take a sample and compute the sample mean, 0, which is the best estimate of µ that we can make
based on this sample.
Compare this x-bar estimate to the hypothetical value µ0 = 30 mpg.

Case 1:                                           Picture:
                                                          ----------|---------|-------------------------
If 0 is < 30, then do not reject Ho.                                0      30

Case 2:                                        Picture:
                                                       --------------------|--|-----------------------
If 0 is only a little greater then 30 do not reject Ho.                  30 0

Case 3:                                        Picture:
                                                       --------------------|-----------------|--------
If 0 is significantly greater than 30, then reject Ho                    30                0
and accept Ha.
QMTH 206                               Hypothesis Testing 1                                   Page 3

How do we measure "significantly" greater than?
      An important statistical fact:                                   _
      - The statistical test uses the fact that if X ~ N (µ0, σ), then X ~ N(µ0, σ ⁄ /n )
        and then        _
                      (X - µ) / (σ / /n ) ~ N(0, 1)                      _
        which is the Standard Normal distribution, N(0, 1), that is, (X - µ) / (σ ⁄ /n ) ~ N(0, 1).

 Ex.     The test statistic used for the car purchase test of hypothesis is:
                       _
                zts = (X - µ) / (σ / /n )

         and the test of the hypotheses
                   Ho: µ < µo
                   Ha: µ > µo where µo = 30 MPG
         is to reject Ho if zts > zα. where zα is the Z-value with α = probability area in the right
         tail.


         For the car mpg example with
                        Ho: µ < 30
                        Ha: µ > 30 ← so this is an upper tail set up
                 and the sample size is n = 10 (trips)
                 and the sample mean is 0 = 31.4
                 and assume the population standard deviation is σ = 6.0.
         Compute test statistic:               _
                                       zTS = (X - µ0) / (σ / /n )
                                            = (31.4 – 30)/(6.0 / /10)
                                            = 0.737864787 of 0.74

         The test criterion for these hypotheses is to Reject Ho if zTS is greater than or equal to the zα
         critical value.
         Using α = 0.05 then the right tail probability is 0.05, then zα is the Z-value with probability
         0.05 to the right of zα, and so the probability to the left of zα is 1.00 - 0.05 = 0.95.
         The value of zα is the table entry value for inside the table value 0.95 = 0.9500.
         However, 0.9500 does not appear in the Z-table. Instead look up the table entries below
         0.9500 and above 0.9500 which are on the row for 1.6 and under the columns for .04 and
         .05:
                                  .04            .05       (              .04              .05 )
                         1.6 | .9495 | .9500 | .9505 | ( or -1.6 | .0505 | .0500 | .0495 | )

         Since .9500 is half way between .9495 and .9505, then can use zα = 1.645, but 1.64 or 1.65
         are ok too .

         Since zTS = 0.737… is NOT greater zα = 1.645, then do NOT reject Ho.
         The conclusion is that there is NOT sufficient evidence in this sample to decide that the
         mean mpg for this car is greater than 30 mpg. The decision then would be to NOT buy the
         car.
QMTH 206                             Hypothesis Testing 1                                    Page 4

 Example 9-25 in the textbook has
       Given:          Ho: µ < 25
                       Ha: µ > 25 ← so this is an upper tail set up
               and the sample size is n = 40
               and the sample mean is 0 = 26.4
               and assume the population standard deviation is σ = 6.0.
       Using α = 0.01 then the right tail probability is 0.01, then zα is the Z-value with probability
       0.01 to the right of zα, and so the probability to the left of zα is 1.00 - 0.01 = 0.99.
       The value of zα is the table entry value for inside the table value 0.99 = 0.9900.
       However, 0.9900 does not appear in the Z-table. Instead look up the table entries below
       0.9900 and above 0.9900 which are on the row for 2.3 and under the columns for .02 and
       .03:
                                .02            .03       (              .02              .03 )
                       2.3 | .9898 | .9900 | .9901 | ( or -2.3 | .0102 | .0100 | .0099 | )

        Since .9900 is closer to .9901 than to .9898, then use zα = 2.33,
        ( or alternatively, .0099 is closer to .0100 than .0102, then use -zα = -2.33, so zα = 2.33.)

        Compute test statistic:               _
                                       zTS = (X - µ0) / (σ / /n )
                                           = (26.4 – 25)/(6.0 / /40)
                                            = 1.475729575

        The test criterion for these hypotheses is to Reject Ho if zTS is greater than or equal to the zα
        critical value.

        Since zTS = 1.475… is NOT greater zα = 2.33, then do NOT reject Ho.
        The conclusion is that there is NOT sufficient evidence in this sample to decide that the
        population mean µ is greater than 30.
QMTH 206                               Hypothesis Testing 1                                  Page 5

Seven Steps in the Test of Hypotheses

1.     State the meaning of
       • the Random Variable X involved in the problem
       • the mean μ of the random variable

2.     State the null and alternative hypotheses Ho and Ha being tested.

3.     From the sample of size n, compute the sample mean 0 and sample standard deviation s.

4.     State the formula for the test statistic for this test of hypotheses.
       State the statistical fact about this test statistic.
       From the sampled values, compute the value of the test statistic.

5.     State the Critical Value (C.V.) test criterion for this test.
       Given the stated level of significance, determine the critical value for the test.

6.     Compare the test statistic value to the critical value using the test criterion and decide whether
       or not to reject the null hypothesis.

7.     State the conclusion of the test in a sentence using the terms used in the problem (avoid using
       just the Greek symbols).
========================================================================
For example 9-25 in the textbook that was worked above, these are the seven steps:

1.     X = the mpg of the car on a trip
       µ = the mean (or average) of the mpg's for ALL trips in the car

2.     The hypotheses to decide if the car gets better than 25mpg are
                    Ho: µ < 25
                    Ha: µ > 25 ← so this is an upper tail set up

3.     From the sample, the sample size is n = 40, the sample mean is 0 = 26.4
       and it is assumed that the population standard deviation is σ = 6.0.
                                                       _
4.     The formula for the z-test statistic is zTS = (X - µ0) / (σ / /n )
       This zTS has the Standard Normal distribution N(0, 1).
       The value of the test statistics based on the sample is zTS = (26.4 – 25)/(6.0//40) =
       1.475729575 or approximately 1.48 (rounded).

5.     The Critical Value test criterion is is to reject Ho if zts > zα.
       Here zα is the Z-value with α = probability area in the right tail.
       Using α = 0.01 then the right tail probability is 0.01, then zα is the Z-value with probability 0.01
       to the right of zα, and so the probability to the left of zα is 1.00 - 0.01 = 0.99.
QMTH 206                              Hypothesis Testing 1                                    Page 6

5. (contd)
        The value of zα is the table entry value for inside the table value 0.99 = 0.9900.
        However, 0.9900 does not appear in the Z-table. Instead look up the table entries below 0.9900
        and above 0.9900 which are on the row for 2.3 and under the columns for .02 and .03:
                                .02             .03       (            .02             .03 )
                       2.3 | .9898 | .9900 | .9901 | ( or -2.3 | .0102 | .0100 | .0099 | )

       Since .9900 is closer to .9901 than to .9898, then use zα = 2.33,
       ( or alternatively, .0099 is closer to .0100 than .0102, then use -zα = -2.33, so zα = 2.33.)

6.     Since zTS = 1.475… is NOT greater zα = 2.33, then do NOT reject Ho at the α = 0.01 or 1%
       level of significance (LOS).

7.     The conclusion is that since we cannot reject Ho, then there is NOT sufficient evidence in this
       sample to decide that the population mean µ is greater than 30, based on this sample (BOTS).

Revised Wednesday, January 13, 2010

								
To top