Stats Lecture 07 Confidence Intervals

download Stats Lecture 07 Confidence Intervals

of 41

Transcript of Stats Lecture 07 Confidence Intervals

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    1/41

    Confidence Intervals

    For Means and Proportions

    Quantitative Methods for Economics

    Dr. Katherine Sauer

    Metropolitan State College of Denver

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    2/41

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    3/41

    We have seen that the sample mean can vary greatly from thepopulation mean.

    We have also seen that as the sample size increases, the variation

    decreases.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    4/41

    Sometimes we dont know the population mean.

    - we cant know if our sample mean is close to the

    population mean

    We can estimate an interval estimate for the mean.

    x margin of error

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    5/41

    I. Confidence Intervals for the Population Mean

    When the population mean is know, an interval that contains 95%

    of sample means is

    x 96.1

    This can also be written as where x 96.1

    This interval has a fixed center point of and total width of 2that contains 95% of all sample means.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    6/41

    If we dont know the population mean, we have to estimate it.

    xx 96.1

    In this case, the center is no longer fixed.

    - it will move according to the value of each new point

    estimate of the sample mean

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    7/41

    Observations:

    An interval estimate will contain the population mean if

    the sample mean is one of the 95% of sample meanswithin the interval.

    - sample means 1, 2, and 4 from the diagram

    Each of the sample means that is within the interval willresult in an interval that contains the population mean

    somewhere within the interval.

    An interval estimate will not contain the population mean

    if the sample mean lies in either tail.- sample means 3 and 5 from the diagram

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    8/41

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    9/41

    A. How To Construct a Confidence Interval

    A Confidence Interval ispoint estimate + (critical Z value)(standard error)

    For a 95% confidence interval:

    5% is divided into two tails 0.025 each

    Z0.025 = 1.96 and the margin of error is

    For a 99% confidence interval:

    1% is divided into two tails 0.005 each

    Z0.005 = 2.5758 and the margin of error is

    x 96.1

    x 5758.2

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    10/41

    Denote the area in the two tails as .

    The area between the two tails is (1 - ).

    In general, if we denote the area in each tail as /2 then the

    corresponding critical Z value is Z/2 and the margin of

    error isxZ 2/

    xZx 2/

    (1 - )(100%) is called the level of confidence.

    The (1 - )(100%) confidence interval is given by:

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    11/41

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    12/41

    Example: An importer of Herbs and Spices claims that the average

    weight of packets of saffron is 20 grams. A random sample of 36

    packets is selected. The sample average is calculated to be 19.35

    grams. The populations standard deviation is 1.8 grams.

    Calculate the 99% confidence interval for the population average

    weight.

    Step 1: find

    3.036

    8.1

    nx

    2/,, Zx x

    we are given that =19.35 grams

    we can calculate

    x

    x

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    13/41

    For the critical Z:

    = 1% /2 = 0.5%

    so Z/2 = 2.5758

    Step 2: construct the intervalx

    Zx 2/

    19.35 + (2.5758)(0.3)

    19.35 + 0.77274

    18.5773 to 20.1227

    We are 99% sure that the population mean is somewhere

    between 18.5773 and 20.1227.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    14/41

    The manufacturer makes the claim that the average weight of a

    packet is 20 grams.

    Does our confidence interval support this claim?

    yes, 20 lies between the upper and lower limits of our

    confidence interval

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    15/41

    B. One-Sided Confidence Intervals

    Sometimes we wish to know the lower limit, above which we are

    (1)(100%) confident the population mean lies.

    Sometimes we wish to know the upper limit, below which we are(1)(100%) confident the population mean lies.

    xZx

    2/ xZx 2/

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    16/41

    Ex: Suppose a property investor claims that the average rental

    income per room in student housing is at most $5000 per year. The

    average rent paid by a sample of 36 students was calculated to be$5200. The sample standard deviation is $735.

    Calculate a 90% confidence interval for the true mean annual rental

    income.

    Step 1: find2/

    ,,

    Zsxx

    5.12236

    735

    n

    ssx

    we are given that =5200

    we can calculate

    x

    xs

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    17/41

    For the critical Z:

    = 10% /2 = 5%

    so Z/2 = 1.6449

    Step 2: construct the intervalxsZx 2/

    5200 + (1.6449)(122.5)

    5200 + 201.50

    4998.50 to 5401.50

    We are 90% sure that the true population mean is somewhere

    between $4998.50 and $5401.50.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    18/41

    The investor makes the claim that the average rent is at most

    $5000.

    Does our confidence interval support this claim?

    no, $5000 is $401 below the upper bound of our

    confidence interval

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    19/41

    II. Confidence Intervals for Proportions

    The (1)(100%) confidence interval for a population proportion

    is given by

    n

    ppZp

    )1(2/

    center of interval margin of error

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    20/41

    Example: In a poll of 200 voters, 88 stated that they will vote for

    the Green party candidate. Construct a 95% confidence interval

    for the true proportion of support for the Green party candidate.

    Step 1: find2/

    ,,

    Znp

    n = 200

    p = 88/200 = 0.44

    Z0.025 = 1.96

    0351.0200

    )44.01(44.0)1(

    n

    pp

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    21/41

    So, the confidence interval is:

    0.44 + (1.96)(0.0351)

    0.44 + 0.068796

    Meaning, we are 95% confident that the population proportion

    is between 0.371204 and 0.508796.

    That is, we are 95% sure that between 37.1% and 50.8% of the

    voters will vote for the Green party.

    The margin of error is 6.88 percentage points.

    What would you say about the usefulness of this information?

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    22/41

    III. The Precision of Confidence Intervals

    The margin of error tells us about the precision of the interval.

    nZ

    2/

    It depends on Z, , and n.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    23/41

    The population standard deviation is fixed for a given

    population.

    - The margin of error (width of the interval) will begreater when the population standard deviation is large.

    The greater the level of confidence, the larger Z is and the wider

    the interval.- A more precise interval can be obtained by reducing

    the confidence level.

    The larger the sample size, the smaller the margin of error.

    Sample size has a major effect on the precision of the confidence

    interval.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    24/41

    How to calculate the sample size needed that will result in a

    confidence interval with a specified precision:

    2

    2/

    Zn ))1((

    2

    2/ ppZ

    n

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    25/41

    Example: An importer of Herbs and Spices claims that the

    average weight of packets of saffron is 20 grams. The

    populations standard deviation is 1.8 grams.

    Calculate the sample sized needed to construct a 99% confidence

    interval with a margin of error of + 0.5.

    2

    2/

    Zn

    986.855.0

    )8.1)(5758.2(2

    For 99%, Z/2 = 2.5758

    A sample size of 86 would allow us to construct a 99%

    confidence interval with a margin of error of 0.5.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    26/41

    Example: In a poll of 200 voters, 88 stated that they will vote

    for the Green party candidate.

    Calculate the sample sized needed to construct a 95% confidence

    interval with a margin of error of + 0.01.

    For 95%, Z/2 = 1.96

    p=88/200 = 0.44

    A sample size of 9466 would allow us to construct a 95%

    confidence interval with a margin of error of 0.01.

    ))1((

    2

    2/ ppZn

    7.9465))44.01(44.0(

    01.0

    96.12

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    27/41

    IV. Confidence Intervals for Differences between Means and

    Proportions

    Ex: Is the average commuting time by bus faster than by car?

    Ex: Is the percentage of people likely to vote for candidate A

    larger than the percentage of people likely to vote for candidate B?

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    28/41

    The distribution for the difference between two normalindependent random variables is normal with a mean equal to the

    difference of the means and the variance equal to the sum of the

    variances.

    If and

    1

    2

    111,~n

    NX

    2

    2

    222,~n

    NX

    then (for large n)

    2

    2

    2

    1

    2

    12121,~

    nnNXX

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    29/41

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    30/41

    The confidence interval for differences between population

    means is:

    point estimate + (critical value)(standard error)

    The (1)(100%) confidence interval for 12:

    2

    22

    1

    21

    2/21nn

    Zxx

    2

    2

    2

    1

    2

    12/21

    n

    s

    n

    sZxx

    Or, if the standard deviation is unknown:

    (for large n)

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    31/41

    For sample proportions that are normally distributed, thedifference between the proportions will also be normally

    distributed.

    If and

    1

    112

    1111

    )1(,~

    nNp

    pp

    then

    2

    22

    1

    112

    21212121

    )1()1(,~

    nnNpp pppp

    2

    222

    2222

    )1(,~

    nNp

    pp

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    32/41

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    33/41

    The confidence interval for differences between population

    proportions is:

    point estimate + (critical value)(standard error)

    The (1)(100%) confidence interval for p1p2:

    2

    22

    1

    112/21

    )1()1(

    n

    pp

    n

    ppZpp

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    34/41

    How to interpret:

    Let the confidence interval for the difference between means be

    A < 12 < B

    Case 1: If A and B are both positive, then we can be (1-)(100%)

    confident that 1 is greater than 2 by an amount ranging from A to

    B.

    Case 2: If A and B are both negative, then we can be (1-)(100%)

    confident that 1 is less than 2 by an amount ranging from A to B.

    Case 3: If A and B have different signs, then the interval contains

    12 = 0. We can be (1-)(100%) confident that A is equal to B.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    35/41

    Example: Designers of rowing equipment investigate the

    difference between the mean weights (kg)of male and female

    rowing teams. Random samples of male and female rowers are

    selected.

    Calculate the 95% confidence interval for the difference in mean

    weights between male and female rowers.

    Note: we dont know the population mean or standard deviation

    2

    2

    2

    1

    2

    12/21

    n

    s

    n

    sZxx

    ll d h diff i d

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    36/41

    Well need the difference in means, Z, s, and n.

    difference in means = 60.552.6 = 7.9

    Z/2=1.96

    n1 = 42 n2 = 30

    s1 = 6.8 s2 = 4.530

    5.4

    42

    8.696.19.7

    22

    7.9 + 1.96(1.3326)

    7.9 + 2.6119

    We are 95% confident that the difference between the mean

    weights of male and female rowers is between 5.2881kg and

    10.5119kg.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    37/41

    Both the lower and upper limits are positive.

    1 > 2

    The average weight for male rowers is greater than the

    average weight for female rowers.

    Lower Limit: 1 > 2 by 5.2881

    Upper Limit: 1 > 2 by 10.5991

    We are 95% confident that the mean weight of male rowers

    exceeds the mean weight of female rowers by 5.2881kg to

    10.5991kg.

    We cannot assume that the weight of any individual male rower

    exceeds the weight of any individual female rower.

    variance for individual variance for means2

    n

    x

    2

    2

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    38/41

    Example: Here are the results for polls taken in 2 locations.

    Calculate the 90% confidence interval for the difference in

    proportions who will vote for the Green party in area A and Area

    B.

    2

    22

    1

    112/21 )1()1(

    npp

    nppZpp

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    39/41

    Well need p, the difference in p, Z, and n.

    p1 = 88/200 = 0.44 p2 = 54/160 = 0.3375

    difference in proportions = 0.440.3375 = 0.1025

    n1 = 200 n2 = 160

    Z/2=1.6449

    160

    )3375.01(3375.0

    200

    )44.01(44.06449.11025.0

    0.1025 + 1.6449(0.0513)0.1025 + 0.0843

    We are 90% confident that the difference between the two

    proportions is between 0.0182 and 0.1868.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    40/41

    Both the lower and upper limits are positive.1 > 2

    The proportion of voters supporting the Green party in area

    A exceeds the proportion of voters supporting the Green

    party in area B.

    Lower Limit: 1 > 2 by 0.0182

    Upper Limit: 1 > 2 by 0.1868

    We are 90% confident that 1 > 2.

  • 8/3/2019 Stats Lecture 07 Confidence Intervals

    41/41

    Concepts:

    Interpreting confidence intervals and their precision

    Skills:

    Construct a 90%, 95% and 99% confidence interval for means

    and proportions

    Calculate the sample size needed in order to construct a

    confidence interval of a specified margin of error

    - means and proportions

    Construct a 90%, 95% and 99% confidence interval for the

    difference between means or proportions.