Chapter 8. Inferences on a Population Meanmathsci.kaist.ac.kr/~nipl/cc511/lectures/Chapter8.pdf ·...

67
Chapter 8. Inferences on a Population Mean 1,35/ 8.1 Confidence Intervals 8.2 Hypothesis Testing 8.3 Summary

Transcript of Chapter 8. Inferences on a Population Meanmathsci.kaist.ac.kr/~nipl/cc511/lectures/Chapter8.pdf ·...

  • Chapter 8. Inferences

    on a Population Mean

    �����

    8.1 Confidence Intervals

    8.2 Hypothesis Testing

    8.3 Summary

  • 8.1 Confidence Intervals8.1.1 Confidence Interval Construction(1/8)

    • Confidence Intervals

    – A confidence interval for an unknown parameter θ is an interval that

    contains a set of plausible values of the parameter.

    – It is associated with a confidence level 1-aaaa, which measures the

    �����

    probability that the confidence interval actually contains the unknown

    parameter value.

    – Confidence levels of 90%, 95%, and 99% are typically used.

  • 8.1.1 Confidence Interval Construction(2/8)

    • Inferences on a Population Mean

    – Inference methods on a population mean based upon the t-

    procedure are appropriate for large sample sizes n ≥ 30 and

    also for small sample sizes as long as the data can reasonably

    �����

    also for small sample sizes as long as the data can reasonably

    be taken to be approximately normally distributed.

    – Nonparametric techniques (Chapter 15) can be employed for

    small sample sizes with data that are clearly not normally

    distributed.

  • 8.1.1 Confidence Interval Construction(3/8)

    • Two-Sided t-Interval

    – A confidence interval with confidence level 1-a for a population mean µ

    based upon a sample of n continuous data observations with a sample

    mean and a sample standard deviation s isx

    / 2, 1 / 2 , 1n nt s t sα αµ − −

    ∈ − +

    �����

    – The interval is known as a two-sided t-interval or variance unknown

    confidence interval.

    / 2, 1 / 2 , 1,n nt s t s

    x xn n

    α αµ − −

    ∈ − +

  • 8.1.1 Confidence Interval Construction(4/8)

    • A two-sided t-interval

    / 2, 1nt sxn

    α −− / 2, 1nt s

    xn

    α −+

    / 2, 1n

    st

    nα − ×

    �����

    x

    µ̂

    ˆcritical point . .( )s e µ×

  • 8.1.1 Confidence Interval Construction(5/8)

    • The length of two-sided t-interval is

    • As the standard error of decreases, so that becomes a more

    / 2, 12 ˆ2 critical point . .( )nt s

    L s en

    α µ−= = × ×

    µ̂ ˆ xµ =

    �����

    “accurate” estimate of .

    • The length of a confidence interval also depends upon the confidence

    level. As the confidence level increases, the length of the confidence

    interval also increase.

    µ

  • 8.1.1 Confidence Interval Construction(6/8)

    • We know that

    and so the definition of the critical point of the t-distribution ensures

    that

    ( )1n

    n Xt

    S

    µ−

    −�

    �����

    that

    ( )/ 2, 1 / 2, 1 1n n

    n XP t t

    Sα αµ

    α− − − − ≤ ≤ = −

  • 8.1.1 Confidence Interval Construction(7/8)

    • And

    / 2, 1 / 2, 1 1n nt S t S

    P X Xn n

    α αµ α− −

    − ≤ ≤ + = −

    �����

    • This probability statement should be interpreted as saying that there

    is a probability of 1-aaaa that the random confidence interval limits

    take values that “straddle” the fixed value µ.

  • 8.1.1 Confidence Interval Construction(8/8)

    • Technically speaking, has a t-distribution only when the

    random variables are normally distributed.

    • Nevertheless, the central limit theorem ensures that the

    distribution of is approximately normal for reasonably large

    ( )n X Sµ−iX

    �����

    distribution of is approximately normal for reasonably large

    sample sizes, and in such cases it is sensible to construct t-intervals

    regardless of the actual distribution of the data observations.

    X

  • Example 14 : Metal Cylinder Production (p.365)

    • Data : 60 metal cylinder diameters (page 290, Figure 6.5).

    • Summary statistics:

    n = 60 Median = 50.01 Max. = 50.36

    = 49.999 Upper quartile = 50.07 Min. = 49.74x

    �����

    s = 0.134 Lower quartile = 49.91

    • Critical points:

    Sample size n = 60

    Confidence level 90%: t0.05,59 = 1.671

    Confidence level 95%: t0.025,59 = 2.001

    Confidence level 99%: t0.005,59 = 2.662

  • Example 14 : Metal Cylinder Production(2/4)

    • Confidence interval with confidence level 90%:

    • Confidence interval with confidence level 95%:

    1.671 0.134 1.671 0.13449.999 , 49.999 (49.970,50.028)

    60 60× ×

    − + =

    �����

    • Confidence interval with confidence level 95%:

    • Confidence interval with confidence level 99%:

    2.001 0.134 2.001 0.13449.999 ,49.999 (49.964,50.033)

    60 60× ×

    − + =

    2.662 0.134 2.662 0.13449.999 , 49.999 (49.953,50.045)

    60 60× ×

    − + =

  • Example 14 : Metal Cylinder Production(3/4)

    49.970 50.028=49.999

    90%

    x

    • Confidence intervals for mean metal cylinder diameter

    �����

    49.964 50.033=49.999

    95%

    x

    49.953 50.045=49.999

    99%

    x

  • Example 14 : Metal Cylinder Production(4/4)

    • Conclusion with confidence interval:

    With over 99% certainty, the average cylinder diameter lies

    within 0.05 mm of 50.00mm, that is, within the interval (49.95,

    50.05).

    �����

    50.05).

    • Comment:

    It is important to remember that this confidence interval is for the

    mean cylinder diameter, and not for the actual diameter of a

    randomly selected cylinder.

  • 8.1.2 Effect of the Sample Sizeon Confidence Intervals(1/4)

    • Recall:

    • For a fixed critical point, a confidence interval length L is inversely

    / 2, 12 nt sLn

    α −=

    �����

    • For a fixed critical point, a confidence interval length L is inversely

    proportional to the square root of the sample size n.

    • Notice that this dependence of the critical point on the sample size

    also serves to produce smaller confidence intervals with large

    sample sizes.

  • 8.1.2 Effect of the Sample Sizeon Confidence Intervals(2/4)

    • If a confidence interval with a length no large than L0 is required, then

    sample size

    2/ 2, 1

    0

    4 nt s

    nL

    α − ≥ ×

    �����

    must be used. This inequality can be used to find a suitable sample

    size n if approximate values or upper bounds are used for ta/2, n-1 and s.

    0L

  • 8.1.2 Effect of the Sample Sizeon Confidence Intervals(3/4)

    • Example (p. 364): For the mean thickness of plastic sheets, an

    experimenter wishes to construct a 95% confidence interval with a

    length no larger than L0 = 2.0 mm.

    – Known fact: the standard deviation (s) ≤ 4.0 mm

    – Assumption: t0.025, n-1 ≤ 2.1, for a large enough sample size

    �����

    – Assumption: t0.025, n-1 ≤ 2.1, for a large enough sample size

    – Then a sample size is/ 2, 1

    0

    2

    2.1 4.02 2

    2.1 4.04 70.56

    2.0

    nt s Ln n

    n

    α − × ≤ ≤

    × ≥ × =

    � �

  • 8.1.2 Effect of the Sample Sizeon Confidence Intervals(4/4)

    • Additional sampling:

    – For a sample size n1 and a sample standard deviation s, the length of the

    confidence interval is 1/ 2, 1

    1

    2 nt sLn

    α −=

    �����

    – To reduce the confidence interval length to L0 < L, the size of the

    additional sample required is

    1

    2/ 2,

    11

    0

    , 4 nt s

    where nL

    n n α −

    ≥ ×

  • Example 14 : Metal Cylinder Production (p. 365)

    • n = 60, 99% confidence interval (49.953, 50.045) and confidence length

    = 0.092 mm

    • Question: How much additional sampling is required to provide the

    increased precision of a confidence interval with a length of 0.08 mm at

    �����

    the same confidence level?

    • Answer: A total sample size required is

    – Therefore, an additional sample of at least 80-60 = 20 cylinders is

    needed.

    2 20.005,59

    0

    2.662 0.1344 4 79.53

    0.08

    t sn

    L × ≥ × = × =

  • 8.1.4 Simulation Experiment(1/2)

    • Figure 8.8(page 369) shows the 500 simulation results (a mean of µ = 10, a

    sample size of n = 30) and 95% confidence intervals.

    • Notice that, in simulations 24 and 37, the confidence intervals do not

    include the correct value µ = 10.

    �����

    • Each simulation provides a 95% confidence interval which has a probability

    of 0.05 of not containing the value µ = 10.

  • 8.1.4 Simulation Experiment(2/2)

    • Since the simulations are independent of each other, the number of

    simulations out of 500 for which the confidence interval does not

    contain µ = 10 has a binomial distribution with n = 500 and p = 0.05.

    • In practice, an experimenter observes just one data set, and it has a

    �����

    • In practice, an experimenter observes just one data set, and it has a

    probability of 0.95 of providing a 95% confidence interval that does

    indeed straddle the true value µ.

  • 8.1.5 One-Sided Confidence Intervals(1/4)

    • One-Sided t-Interval: One-sided confidence intervals with confidence

    levels 1-a for a population mean µ based on a sample of n

    continuous data observations with a sample mean and a

    sample standard deviation s arex

    t s

    �����

    which provides an upper bound on the population mean µ, and

    which provides a lower bound on the population mean µ.

    , 1, nt s

    xn

    αµ −

    ∈ −∞ +

    , 1 ,nt s

    xn

    αµ −

    ∈ − ∞

  • 8.1.5 One-Sided Confidence Intervals(2/4)

    • c.f.

    Since

    ( )1n

    n Xt

    S

    µ−

    −�

    �����

    the definition of the critical point ta,n-1 implies that

    S

    ( ), 1 1n

    n XP t

    Sαµ

    α− − − ≤ = −

  • 8.1.5 One-Sided Confidence Intervals(3/4)

    This may be rewritten

    so that

    , 1 1nt S

    P Xn

    αµ α−

    ≤ + = −

    �����

    so that

    is a one-sided confidence interval for µ with a confidence level of 1-

    a.

    , 1, nt s

    xn

    αµ −

    ∈ −∞ +

  • 8.1.5 One-Sided Confidence Intervals(4/4)

    • Figure 8.10: Comparison of two-sided and one-sided confidence

    intervals

    , 1nt sxn

    α −+xOne-sided(upper bound)

    �����

    / 2, 1nt sxn

    α −− / 2, 1nt s

    xn

    α −+xTwo-sided

    , 1nt sxn

    α −− xOne-sided(lower bound)

  • Example 45 : Hospital Worker Radiation Exposures

    • n = 28, sample mean = 5.145,

    • sample standard deviation s = 0.7524,

    • critical point t0.01, 27 = 2.473.

    • 99% one-sided confidence interval for µ is

    x

    ( ), 1 2.473 0.7524nt sαµ −

    × ∈ −∞ + = −∞ + = −∞

    �����

    • Consequently, with a confidence level of 0.99 the experimenter can

    conclude that the average radiation level at a 50cm distance from a

    patient is no more than about 5.5.

    ( ), 1 2.473 0.7524, ,5,145 ,5.49628

    nt sxn

    αµ − ×

    ∈ −∞ + = −∞ + = −∞

  • 8.1.6 z-Intervals(1/2)

    • Two-Sided z-Interval

    If an experimenter wishes to construct a confidence interval for a

    population mean µ based on a sample of size n with a sample mean

    and using an assumed known value for the population standard x

    �����

    deviation s, then the appropriate confidence interval is

    which is known as a two-sided z-interval or variance known

    confidence interval.

    / 2 / 2,z z

    x xn n

    α ασ σµ ∈ − +

    ���

  • 8.1.6 z-Intervals(2/2)

    • One-Sided z-Interval

    One-sided 1-a level confidence intervals for a population mean µ

    based on a sample of n observations with a sample mean and

    using a known value of the population standard deviation s are

    x

    �����

    using a known value of the population standard deviation s are

    These confidence intervals are known as one-sided z-intervals.,

    zx

    nασµ ∈ −∞ +

    ,

    zx

    nασµ ∈ − ∞

    and

  • 8.2 Hypothesis Testing8.2.1 Hypotheses(1/2)

    • Hypothesis Tests of a Population Mean

    – A null hypothesis H0 for a population mean µ is a statement that

    designates possible values for the population mean.

    – It is associated with an alternative hypothesis HA, which is the

    �����

    – It is associated with an alternative hypothesis HA, which is the

    “opposite” of the null hypothesis.

    – A two-sided set of hypotheses is

    H0 : µ = µ0 versus HA : µ ≠ µ0

    for specified value of µ.

  • 8.2.1 Hypotheses(2/2)

    – A one-sided set of hypotheses is either

    H0 : µ ≤ µ0 versus HA : µ > µ0

    or

    H0 : µ ≥ µ0 versus HA : µ < µ0

    �����

    0 0 A 0

  • Example 14 : Metal Cylinder Production

    • The machine that produces metal cylinders is set to make

    cylinders with a diameter of 50 mm.

    • The two-sided hypotheses of interest are

    H0 : µ = 50 versus HA : µ ≠ 50

    �����

    H0 : µ = 50 versus HA : µ ≠ 50

    where the null hypothesis states that the machine is calibrated

    correctly.

  • Example 47 : Car Fuel Efficiency

    • A manufacturer claim : its cars achieve an average of at least 35

    miles per gallon in highway driving.

    • The one-sided hypotheses of interest are

    H0 : µ ≥ 35 versus HA : µ < 35

    �����

    H0 : µ ≥ 35 versus HA : µ < 35

    • The null hypothesis states that the manufacturer’s claim regarding

    the fuel efficiency of its cars is correct.

  • 8.2.2 Interpretation of p-values(1/4)

    • Types of error

    – Type I error: An error committed by rejecting the null hypothesis

    when it is true.

    – Type II error: An error committed by accepting the null hypothesis

    �����

    when it is false.

    • Significance level

    – is specified as the upper bound of the probability of type I error.

  • 8.2.2 Interpretation of p-values(2/4)

    • p-value of a test (or observed level of significance)

    – Definition: The p-value of a test is the probability of obtaining a

    given data set or worse when the null hypothesis is true.

    – A data set can be used to measure the plausibility of null

    �����

    hypothesis H0 through the construction of a p-value.

    – The smaller the p-value, the less plausible is the null hypothesis.

    (why?)

  • 8.2.2 Interpretation of p-values(3/4)

    • Rejection of the Null Hypothesis

    – If a p-value is smaller than the significance level, then the

    hypothesis H0 is rejected in favor of the alternative hypothesis

    HA.

    �����

    • Acceptance of the Null Hypothesis

    – A p-value larger than 0.10 is generally taken to indicate that the null

    hypothesis H0 is a plausible statement. The null hypothesis H0 is

    therefore accepted.

    – However, this does not mean that the null hypothesis H0 has been

    proven to be true.

  • 8.2.2 Interpretation of p-values(4/4)

    • Intermediate p-values

    – A p-value in the range 1% ~ 10% is generally taken to indicate

    that the data analysis is inconclusive. There is some evidence

    that the null hypothesis is not plausible, but the evidence is not

    overwhelming.

    �����

  • Example 14 : Metal Cylinder Production

    • Q : whether the machine can be shown to be calibrated

    incorrectly.

    • H0 : µ = 50, HA : µ ≠ 50

    • With a small p-value,

    – The null hypothesis is rejected and the machine is demonstrated

    �����

    to be miscalibrated.

    • With a large p-value,

    – The null hypothesis is accepted and the experimenter concludes

    that there is no evidence that the machine is calibrated

    incorrectly.

  • 8.2.3 Calculation of p-values

    • Two-sided t-test

    – Consider testing

    0 0 0: :AH vs Hµ µ µ µ= ≠� �� �� �

    2 ( | |)p value P X t

    where

    − = × ≥

    �����

    0

    /

    where

    xX

    s n

    µ− =

  • • One-sided t-test

    – Consider testing

    – Then0 0 0: :AH vs Hµ µ µ µ≤ >� �� �� �

    ( )p value P X t− = ≥

    �����

    – Consider testing

    – Then 0 0 0: :AH vs Hµ µ µ µ≥

  • Example 14 : Metal Cylinder Production

    • The data set of metal cylinder diameters: n = 60, = 49.99856,

    s = 0.1334

    • µ0 = 50.0 è

    • p-value = 2 x P(X≥0.0836), X ~ t-distribution with n-1=59 d.f.

    x

    ( )49.99856 50.00.0836

    0.1334 60t

    −= = −

    H0: µ = µ0 versus HA: µ ≠ µ0

    �����

    • p-value = 2 x P(X≥0.0836), X ~ t-distribution with n-1=59 d.f.

    • p-value = 2 x 0.467 = 0.934

    • With such a large p-value,

    the null hypothesis is accepted.

    t59 distribution

    0 ltl=0.0836

    0.467

  • Example 47 : Car Fuel Efficiency (1/2)

    • n=20,

    • the fuel efficiency with a sample mean =34.271 miles/gallon

    • sample standard deviation s=2.915 miles/gallon.

    • µ0 = 35.0

    x

    0 : 35 : 35AH versus Hµ µ≥ <

    �����

    • µ0 = 35.0

    • The alternative hypothesis is HA: µ < 35, so that

    where X has a t-distribution with n-1=19 d.f.

    ( )20 34.271 35.01.119

    2.915t

    −= = −

    ( )1.119p value P X− = ≤ −

  • Example 47 : Car Fuel Efficiency (2/2)

    • The value can be shown to be

    p-value = 0.1386.

    • This p-value is larger than 0.10

    and so the null hypothesis

    t19 distribution

    �����

    and so the null hypothesis

    should be accepted.

    0-1.119p-value

  • 8.2.4 Significance Levels(1/14)

    • Significance Level of a Hypothesis Test

    – A hypothesis test with a significance level or size a

    rejects the null hypothesis H0 if a p-value smaller than a is obtained and

    accepts the null hypothesis H0 if a p-value larger than a is obtained.

    �����

    0

    • P-values are more informative than knowing whether a size a test accepts

    or rejects the null hypothesis. (Why?)

  • 8.2.4 Significance Levels(2/14)

    • Two-Sided Problems

    – Two-Sided Hypothesis Test for a Population Mean

    • A size a test for the two-sided hypotheses

    rejects the null hypothesis H if the test statistic ltl falls in

    H0: µ = µ0 versus HA: µ ≠ µ0

    �����

    rejects the null hypothesis H0 if the test statistic ltl falls in

    the rejection region

    and accepts the null hypothesis H0 if the test statistic ltl falls in the

    acceptance region

    • What is the role of here?

    / 2, 1nt tα −>

    / 2, 1nt tα −≤α

  • Example 14 : Metal Cylinder Production

    • The data set of metal cylinder diameters gives a test statistic of ltl =

    0.0836

    • a=0.10 à t0.05,59=1.671

    • a=0.05 à t0.025,59=2.001

    H0: µ = µ0 versus HA: µ ≠ µ0

    �����

    • a=0.05 à t0.025,59=2.001

    • a=0.01 à t0.005,59=2.662

    • The test statistic is smaller than each of these critical points, and so

    the hypothesis tests all accept the null hypothesis.

    • The p-value is therefore known to be larger than 0.10, and in fact the

    previous analysis found the p-value to be 0.934.

  • 8.2.4 Significance Levels(3/14)

    • Relationship Between Confidence Intervals and Hypothesis Tests

    – The value µ0 is contained within a 1-a level two-sided confidence

    interval

    / 2, 1 / 2, 1,n nt s t s

    x xn n

    α α− − − +

    �����

    if the p-value for the two-sided hypothesis test

    H0: µ = µ0 versus HA: µ ≠ µ0

    is larger than a.

    ,x xn n

    − +

  • 8.2.4 Significance Levels(4/14)

    • If µ0 is contained within the 1-a level confidence interval,

    the hypothesis test with size a accepts the null hypothesis,

    and

    • if µ is not contained within the 1-a level confidence interval, the

    �����

    • if µ0 is not contained within the 1-a level confidence interval, the

    hypothesis test with size a rejects the null hypothesis.

  • 8.2.4 Significance Levels(5/14)

    0 0 0: :AH versus Hµ µ µ µ= ≠

    • (FIGURE 8.36, Page 399)

    �����

    / 2, 1nt sxn

    α −− / 2, 1nt s

    xn

    α −+x

    1- level two-sided confidence intervalα

    p value α− < p value α− ≥ p value α−

  • Example 14 : Metal Cylinder Production (1/2)

    • A 90% two-sided t-interval for the mean cylinder diameter was found

    to be (49.970, 50.028).

    • This contains the value µ0=50.0

    and so is consistent with

    �����

    and so is consistent with

    • the hypothesis testing problem

    H0: µ = 50.0 versus HA: µ ≠ 50.0

    having a p-value of 0.934, so that the null hypothesis is accepted at size

    aaaa=0.10.

  • Example 14 : Metal Cylinder Production (2/2)

    • The 90% confidence interval implies that the hypothesis testing

    problem

    H0: µ = µ0 versus HA: µ ≠ µ0

    has a p-value larger than 0.10 for 49.970≤ µ0≤50.028 and a p-value

    �����

    has a p-value larger than 0.10 for 49.970≤ µ0≤50.028 and a p-value

    smaller than 0.10 otherwise. (Why ?)

  • 8.2.4 Significance Levels(6/14)

    • One-Sided Inferences on a Population Mean(H0: µ ≤ µ0) (p.401)

    – A size a test for the one-sided hypothesis

    H0: µ ≤ µ0 versus HA: µ > µ0

    rejects the null hypothesis when

    �����

    rejects the null hypothesis when

    t > t a,n-1

    and accepts the null hypothesis when

    t ≤ t a,n-1

  • 8.2.4 Significance Levels(7/14)

    • One-sided Inferences on a Population Mean(H0: µ ≤ µ0)

    – The 1-a level one-sided upper confidence interval

    , 1 ,nt s

    x αµ −

    ∈ − ∞

    �����

    consists of the values µ0 for which this hypothesis testing

    problem has a p-value larger than a.

    ,xn

    µ ∈ − ∞

  • 8.2.4 Significance Levels(8/14)

    • Relationship between hypothesis testing and confidence intervals for

    one-sided problems (FIGURE 8.40, Page 403)

    0 0 0: :AH versus Hµ µ µ µ≤ >

    �����

    , 1nt sxn

    α −− x

    1- level one-sided confidence intervalα

    p value α− < p value α− ≥

  • 8.2.4 Significance Levels(9/14)

    • One-sided Inferences on a Population Mean (H0: µ ≥ µ0)

    – A size a test for the one-sided hypothesis

    H0: µ ≥ µ0 versus HA: µ < µ0

    rejects the null hypothesis when

    �����

    rejects the null hypothesis when

    t < -t a,n-1

    and accepts the null hypothesis when

    t ≥ -t a,n-1

  • 8.2.4 Significance Levels(10/14)

    • One-sided Inferences on a Population Mean(H0: µ ≥ µ0)

    – The 1-a level one-sided lower confidence interval

    , 1, nt s

    x αµ −

    ∈ −∞ +

    �����

    consists of the values µ0 for which this hypothesis testing problem

    has a p-value larger than a.

    , xn

    µ ∈ −∞ +

  • 8.2.4 Significance Levels(11/14)

    • Relationship between hypothesis testing and confidence intervals for

    one-sided problems (FIGURE 8.39, Page 402)

    0 0 0: :AH versus Hµ µ µ µ≥ <

    �����

    , 1nt sxn

    α −+x

    1- level one-sided confidence intervalα

    p value α−

  • Example 47 : Car Fuel Efficiency (1/2)

    • The one-sided hypotheses of interest here are

    – H0: µ ≥ 35.0 versus HA: µ < 35.0

    • t = -1.119 > –t0.10,19 = -1.328.

    • So

    �����

    • So

    a size a = 0.10 hypothesis test accepts the null hypothesis.

    • This conclusion is consistent with the previous analysis where the p-

    value was found to be 0.1386, which is larger than a =0.10.

  • Example 47 : Car Fuel Efficiency (2/2)

    • Furthermore, the one-sided 90% lower t-interval

    contains the value µ = 35.0, as expected.

    ( ), 1 1.328 2.915, ,34.271 ,35.1420

    nt sxn

    αµ − ×

    ∈ −∞ + = −∞ + = −∞

    �����

    contains the value µ0 = 35.0, as expected.

    • In fact, this confidence interval indicates that the hypothesis testing

    problem

    – H0: µ ≥ µ0 versus HA: µ < µ0

    has a p-value larger than 0.10 for any value of µ0 ≤ 35.14.

  • 8.2.4 Significance Levels(12/14)

    • Power of a hypothesis Test

    – The power of a hypothesis test is defined to be

    • power = 1 – (probability of Type II error | )

    which is the probability that the null hypothesis is rejected when it

    AH

    �����

    is false.

    • Larger power levels and shorter confidence intervals are both

    indications of an increase in the “precision” of an experiment ( why? ).

  • 8.2.4 Significance Levels(13/14)

    Hypothesis Testing Sample size n

    FIGURE 8.42 The specification of two quantities determines the third quantity

    �����

    Confidence Intervals

    Significance level a

    Power of hypothesis test

    Sample size n

    Confidence level 1-a

    Length of confidence interval

  • 8.2.4 Significance Levels(14/14)

    • Relationship Between Power and Sample Size

    – For a fixed significance level a, the power of a hypothesis test

    increases as the sample size n increases. (Why? )

    �����

  • 8.2.5 z-Tests (1/7)

    • Two-Sided z-test

    – The p-value for the two-sided hypothesis testing problem

    H0: µ = µ0 versus HA: µ ≠ µ0

    based upon a data set of n observations with a sample mean

    , n-1(t-test, s, t ) (z-test, , )α ασ⇔ z

    �����

    based upon a data set of n observations with a sample mean

    and an assumed “known” population standard deviation s, is

    where is the standard normal cumulative distribution

    function.

    x

    ( )2p value z− = ×Φ −( )xΦ

  • 8.2.5 z-Tests (2/7)

    • Two-Sided z-test

    which is known as the z-statistic.

    • A size test rejects the null hypothesis if the test statistic l l falls in the

    ( )0n xz µσ

    −=

    �����

    • A size a test rejects the null hypothesis H0 if the test statistic lzl falls in the

    rejection region

    and accepts the null hypothesis H0 if the test statistic lzl falls in the acceptance

    region

    / 2z zα>

    / 2z zα≤

  • 8.2.5 z-Tests (3/7)

    – The 1- a level two-sided confidence interval

    consists of the value µ0 for which this hypothesis testing problem

    / 2 / 2,z z

    x xn n

    α ασ σµ ∈ − +

    �����

    0

    has a p-value larger than a.

  • 8.2.5 z-Tests (4/7)

    • One-Sided z-Test (H0: µ ≤ µ0)

    – The p-value for the one-sided hypothesis testing problem

    H0: µ ≤ µ0 versus HA: µ > µ0

    based upon a data set of n observations with a sample mean

    �����

    based upon a data set of n observations with a sample mean

    and an assumed known population standard deviation s, is

    This testing procedure is called a one-sided z-test.

    x

    ( )1p value z− = − Φ

  • 8.2.5 z-Tests (5/7)

    • One-Sided z-Test (H0: µ ≤ µ0)

    – A size a test rejects the null hypothesis when

    and accepts the null hypothesis when

    z zα>

    �����

    and accepts the null hypothesis when

    – The 1- a level upper one-sided confidence interval

    z zα≤

    ,z

    xn

    ασµ ∈ − ∞

  • 8.2.5 z-Tests (6/7)

    • One-Sided z-Test (H0: µ ≥ µ0)

    – The p-value for the one-sided hypothesis testing problem

    • H0: µ ≥ µ0 versus HA: µ < µ0

    based upon a data set of n observations with a sample mean

    �����

    based upon a data set of n observations with a sample mean

    and an assumed known population standard deviation s, is

    This testing procedure is called a one-sided z-test.

    x

    ( )p value z− = Φ

  • 8.2.5 z-Tests (7/7)

    • One-Sided z-Test (H0: µ ≥µ0)

    – A size a test rejects the null hypothesis when

    and accepts the null hypothesis when

    z zα< −

    �����

    and accepts the null hypothesis when

    – The 1- a level lower one-sided confidence interval

    z zα≥ −

    ,z

    xn

    ασµ ∈ −∞ +