Introduction to Hypothesis Testing (T)

Embed Size (px)

Citation preview

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    1/12

    PR2103

    Pharmacostatistics

    2013

    Dr Perry Lim

    Introduction toHypothesis Testing

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    2/12

    2

    Q1: The mean lung capacity for non-smokers was reported to be

    2 L. A random sample of 40 smokers has a mean lung capacity

    of 1.8 L. is assumed to be 0.35 L. Is the lung capacity ofsmokers different from that of non-smokers at a significance level

    of 5%?

    35.0;2;8.1;40 0 xn ( is known)z-score

    There is no difference between lung capacities of smokers and

    non-smokers.

    n

    xz

    0 61.3

    4035.0

    28.1

    z

    Lung capacity of smokers is different from that of non-smokers.

    and are sample and population mean lung capacities of smokers.

    0 is lung capacity of non-smokers.

    x

    H0: = 2 L

    H1: 2 L

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    3/12

    3

    Q1: The mean lung capacity for non-smokers was reported to be

    2 L. A random sample of 40 smokers has a mean lung capacity

    of 1.8 L. is assumed to be 0.35 L. Is the lung capacity ofsmokers different from that of non-smokers at a significance level

    of 5%?

    5% significance level; = 0.05

    z/2 = z0.025 = 1.96

    z = |3.61| > |1.96| RejectH0

    Conclusion: At a significance level of 0.05, there is a difference

    between the lung capacities of smokers and non-smokers.

    Acceptanceregion

    z1.961.96

    Rejection region

    3.61

    Rejection region

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    4/124

    Q2:A consumer group is investigating a producer of diet meals

    to examine if their pre-packaged meals do contain the advertised

    protein amount of 6 oz in each package. Based on the followingdata, is there any evidence that the meals do not contain the

    advertised protein amount at a significance level of 1%?

    6.16.05.85.65.54.94.24.74.85.2

    5.86.06.14.95.55.75.16.04.95.1

    n

    xx

    1

    )( 2

    n

    xxs

    395.5x 552.0s

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    5/125

    Q2:A consumer group is investigating a producer of diet meals

    to examine if their pre-packaged meals do contain the advertised

    protein amount of 6 oz in each package. Based on the followingdata, is there any evidence that the meals do not contain the

    advertised protein amount at a significance level of 1%?

    Pre-packaged diet meals contain advertised protein amount.

    90.4

    20552.0

    6395.5

    t

    552.0;6;395.5;20 0 sxn ( is not known) t-score

    ns

    xt 0

    Pre-packaged diet meals do not contain advertised protein amount.

    and are sample and population mean protein amounts in diet meals.0 is advertised protein amount in diet meals.x

    H0: = 6 oz

    H1: 6 oz

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    6/12

    6

    Q2:A consumer group is investigating a producer of diet meals

    to examine if their pre-packaged meals do contain the advertised

    protein amount of 6 oz in each package. Based on the followingdata, is there any evidence that the meals do not contain the

    advertised protein amount at a significance level of 1%?

    1% significance level; = 0.01 df= n 1 = 19

    t/2,df= t0.005,19 = 2.861

    Acceptanceregion

    Rejection region

    t2.8612.861

    Rejection region

    4.90

    t = |4.90| > |2.861| RejectH0

    Conclusion: At a significance level of 0.01, the pre-packaged diet

    meals do not contain the advertised amount of protein.

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    7/12

    7

    Q3: The mean hospital stay following a particular surgical

    procedure in 2007 was reported to be 7.1 days. A researcher

    feels that the mean hospital stay in 2008 could be shorter. Arandom sample of 45 patients undergoing the same surgical

    procedure in 2008 had a mean stay of 6.24 days with a standard

    deviation of 3.01 days. Run the appropriate test at = 0.05.

    01.3;1.7;24.6;45 0 sxn ( is not known) t-score

    Mean hospital stay in 2008 is not shorter than that in 2007.

    ns

    x

    t0

    Mean hospital stay in 2008 is shorter than that in 2007.

    92.14501.3

    1.724.6

    t

    and are sample and population mean hospital stays in 2008.0 is mean hospital stay in 2007.x

    H0: = 7.1 days

    H1: < 7.1 days

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    8/12

    8

    Q3: The mean hospital stay following a particular surgical

    procedure in 2007 was reported to be 7.1 days. A researcher

    feels that the mean hospital stay in 2008 could be shorter. Arandom sample of 45 patients undergoing the same surgical

    procedure in 2008 had a mean stay of 6.24 days with a standard

    deviation of 3.01 days. Run the appropriate test at = 0.05.

    5% significance level; = 0.05

    Acceptance

    region

    t1.681

    Rejection region

    1.92

    t = |1.92| > |1.681| RejectH0

    Conclusion: At a significance level of 0.05, mean hospital stay in

    2008 is shorter than that in 2007.

    df= n 1 = 44

    t,df= t0.05,44 = 1.681

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    9/12

    9

    Q4:A companys cookie recipe states the sugar coating on a

    cookie to be 16.4 g. A sample of 28 cookies taken at random has

    a mean sugar coating weight of 16.6 g with standard deviation of1.2 g. Is the sugar coated on the cookies more than the stated

    amount at 95% confidence level?

    Stated amount of sugar is coated on the cookies.

    88.0

    282.1

    4.166.16

    t

    2.1;4.16;6.16;28 0

    sxn ( is not known)

    t-score

    ns

    xt 0

    Sugar coated on the cookies is more than stated amount.

    and are sample and population mean sugar coating weights.

    0 is stated sugar coating weight.

    x

    H0: = 16.4 g

    H1: > 16.4 g

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    10/12

    10

    Q4:A companys cookie recipe states the sugar coating on a

    cookie to be 16.4 g. A sample of 28 cookies taken at random has

    a mean sugar coating weight of 16.6 g with standard deviation of1.2 g. Is the sugar coated on the cookies more than the stated

    amount at 95% confidence level?

    df= n 1 = 27

    t,df= t0.05,27 = 1.703

    Acceptanceregion

    t1.703

    Rejection region

    0.88

    t = 0.88 < 1.703 Fail to reject H0

    Conclusion: At 95% confidence level, the stated amount of sugar is

    coated on the cookies.

    95% confidence level; = 0.05

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    11/12

    11

    Q5:A certain supplier has always supplied goods that is 6%

    defective. A random sample of 250 units of the goods supplied

    recently is found to be 3% defective. Is there an improvement inthe quality of the goods supplied at 95% confidence level?

    06.0;03.0;250 0 ppn

    There is no improvement in quality of goods supplied.

    npp

    ppz

    )1(

    00

    0

    There is an improvement in quality of goods supplied.

    00.2250)06.01(06.0

    06.003.0

    z

    andp are sample and population defective proportions of recent

    goods, andp0

    is defective proportion of previous goods.

    p

    H0:p = 0.06

    H1:p < 0.06

  • 7/27/2019 Introduction to Hypothesis Testing (T)

    12/12

    12

    Q5:A certain supplier has always supplied goods that is 6%

    defective. A random sample of 250 units of the goods supplied

    recently is found to be 3% defective. Is there an improvement inthe quality of the goods supplied at 95% confidence level?

    z =

    z0.05 = 1.645

    Acceptance

    region

    z1.645

    Rejection region

    2.00

    z = |2.00| > |1.645| Reject H0

    Conclusion: At 95% confidence level, there is an improvement in

    the quality of the goods supplied.

    95% confidence level; = 0.05