05_statistical_inference.pdf

Upload: rama-dulce

Post on 06-Jul-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 05_Statistical_Inference.pdf

    1/14

    - 1 -

    STATISTICAL INFERENCE – REVIEWTopics Outline

    The Process of Statistical InferenceSampling Distributions

    The t Distributions

    Confidence Interval EstimationHypothesis Tests for a Population Mean

    The Process of Statistical Inference

    A population is the set of all subjects (units, individuals, members, elements) of interest ina particular study. A parameter is a number describing a characteristic of the population.Parameters are usually unknown.

    A sample is a subset of the population consisting of units which we actually examine and

    for which we do have data. Several methods can be used to select a sample from a population. One of the most common is simple random sampling. A simple randomsample of size n consists of n units chosen in such a way that:

    1. Each unit in the population has the same chance of being selected in the sample.2. All possible samples of size n have the same chance of being drawn.

    A statistic is a number describing a characteristic of a sample. We use statistics toestimate the unknown population parameters.

    The purpose of statistical inference is to develop estimates and test hypotheses about thecharacteristics of a population using information contained in a sample.

    Figure 1 The process of statistical inference.

    The three most common types of statistical inference are:1. Point estimation (for estimating the value of a population parameter)2. Confidence intervals (for estimating a range of values of a population parameter)3. Hypothesis testing (for assessing the evidence for a claim about a population parameter)

    Randomsample

    Population

    Calculatesample

    statistics

    x 2 s

    s

    Make an inferenceabout population

    parameters

    2

  • 8/17/2019 05_Statistical_Inference.pdf

    2/14

    - 2 -

    Sampling Distributions

    Statistical inference is based on the sampling distributions of statistics. That is, we use probability to say what would happen if we applied the inference method many times .

    The sampling distribution of a statistic is the distribution of all possible values taken bythe statistic when all possible samples of a fixed size n are taken from the population.

    Sampling distribution of ( known)

    In general, it is impossible to determine the distribution of X exactly without knowledgeof the actual distribution of the parent population. However, it is possible to find itslimiting distribution.

    Central Limit Theorem (CLT)For any population distribution with mean and finite standard deviation ,

    the sampling distribution of the sample mean X is approximately normal with mean

    and standard deviationn

    , and the approximation improves as n increases.

    (a) Populationdistribution

    (c) Samplingdistribution of X for n = 10

    (b) Samplingdistribution of X for n = 2

    (d) Samplingdistribution of X for n = 25

    Figure 2 An illustration of the approach toward normality forthe sampling distribution of X as sample size increases.

  • 8/17/2019 05_Statistical_Inference.pdf

    3/14

    - 3 -

    Notes:

    1. The CLT says that if the sample size is large, then regardless of the form of the population distribution, the random variable X is approximately normally distributed

    with mean and standard deviationn

    , where is the population mean,

    and is the population standard deviation (see figure 2).

    2. Rule of thumb: I n statistics “large” generally means 30 or more.

    3. Special case: If the random samples come from a normal population, then the randomvariable X is exactly normally distributed, regardless of the size of the sample.

    4. The standard deviationn

    X is smaller than the standard deviation of the population

    by a factor of n . This means that:

    (a) Averages are less variable than individual observations.(b) The results of large samples are less variable than the results of small samples.

    (c) If we want to decrease the standard deviation of X we have to increase the size of the sample.

    5. The formula for conversion of a normally distributed random variable X

    to the standard normal random variable Z is given by

    n

    x z

  • 8/17/2019 05_Statistical_Inference.pdf

    4/14

  • 8/17/2019 05_Statistical_Inference.pdf

    5/14

    - 5 -

    Sampling distribution of ( unknown)

    In most practical situations, the true value of the population standard deviation is unknown. Insuch cases, we estimate by the sample standard deviation s.We assume the population distribution is normal. Then in the place of the random variable

    n

    X Z we use the random variable

    n

    s X T which has t distribution

    with n – 1 degrees of freedom.

    The t Distributions

    The t distribution, also known as the Student’s t distribution, was discovered in 1908 by WilliamGosset who was a chemist employed by the Guinness brewing company.He considered himself a student still learning statistics, so he signed his papers with a pseudonym“Student”. Or perhaps he used a pseudonym due to “trade secrets” restrictions by Guinness.

    The probability density function for Student’s t distribution with degrees of freedom is

    where,

    1

    1

    2

    21

    1)(

    12t t f )1()1()( , 0

    )!1()( nn for integer 0n

    21

    Note that there are different t distributions; it is a family of similar probability distributions.

    When we speak of a specific t distribution, we have to specify the degrees of freedom.We will write the t distribution with n – 1 degrees of freedom as t (n – 1).

    Figure 3 Density curves for the t distributions with 2 and 9 degrees of freedom and the standard normal distribution. All are symmetric with center 0.The t distributions are somewhat more spread out.

  • 8/17/2019 05_Statistical_Inference.pdf

    6/14

    - 6 -

    Properties of t distributions:

    1. The t density curves are symmetric, bell-shaped, and have their peak at 0 like the standardnormal distribution.

    2. Since the peak of t is lower than that of the standard normal distribution, the tails of t are heavier(because the area under the curve is 1).Why do we need to use a distribution with heavier tails?

    3. As the degrees of freedom increase the t density curve approaches the standard normal curve.

    Using the t -Table

    Each row in the t -Table contains critical values t* for the t distribution whose degrees of freedomappear at the left of the row. For convenience, we label the table entries both by the confidencelevel (in percent) required for confidence intervals and by the one-sided and two-sided P -valuesrequired for hypothesis tests.

    The bottom row of the t -Table contains the standard normal critical values z *. By looking downany column, you can check that the t critical values approach the normal values as the degrees offreedom increase.

    Please note the difference in using the z - and t - tables.The z -Table gives probabilities (areas under the curve) to the left of specified z -values.The t -Table gives the t-values for a specified upper tail area.

    Example 2 You have a simple random sample of size n = 25.The corresponding t distribution has n – 1 = 25 – 1 = 24 degrees of freedom.

    (a) What is the critical value t * such that t has probability 0.025 to the right of t *?

    In the t -Table, in the row for df = 24above one-sided P -value 0.025,we find t * = 2.064.

    With Excel, t *= TINV( 0.05 ,24) = 2.064.

    (b) What is the critical value t * such that t has probability 0.75 to the left of t *?

    If t has probability 0.75 to the left of t *,then t has probability 0.25 to the right of t *.In the t -Table, in the row for df = 24 aboveone-sided P -value 0.25, we find t * = 0.685.

    With Excel, t *= TINV( 0.5 ,24) = 0.685.

  • 8/17/2019 05_Statistical_Inference.pdf

    7/14

    - 7 -

    Confidence Interval Estimation

    In practice, only one sample is selected and the point estimates s s x ,, 2 cannot really be expected

    to coincide with the true population parameters ,, 2 . Therefore, it is sometimes preferable toreplace the point estimates with interval estimates, that is, with intervals for which we can assertwith a reasonable degree of uncertainty that they will contain the parameter under consideration.

    There is a common format for all confidence interval estimates:

    Point Estimate ± (Critical Value)(Standard Error)

    Although this format is always used, there are slightly different formulas that we use dependingon what population value we are estimating and certain other conditions.

    Suppose a simple random sample with mean and standard deviations s has been drawn from anormally distributed population. A confidence interval for the population mean is

    n

    st x *

    where t* is the critical value for the t (n−1) density curve with area 1 between − t* and t*.1 is called confidence level . For example, if α = 0.05, then the confidence level is 0.95, or 95%.

    The valuen

    s is the standard error (SE) of the mean .

    Confidence intervals based on t distributions are robust to violations of normality.This means that the above confidence interval is exact when the population distribution is normaland is approximately correct and still valid for large n in other cases. (However, caution should beexercised when the population distribution is very severely skewed and/or has extreme outliers).

    The point estimate x is at the center of the confidence interval. The amount that we add andsubtract to the point estimate

    n

    st m *

    is called margin of error and is equal to half-length of the interval.

    This margin of error has n in the denominator. Therefore, increasing the sample size n reducesthe margin of error for any confidence level. We can find the sample size required to obtain aconfidence interval with specified margin of error m by solving the above equation for n:

    2*m

    st n

    Remember, though, that increasing the sample size is typically associated with higher cost in practice. The best approach is to use the smallest possible sample size that gives useful results.

  • 8/17/2019 05_Statistical_Inference.pdf

    8/14

    - 8 -

    Example 3 A study of commuting times reports the travel times to work of a random sample of 20 employedadults in New York State. The mean is x = 31.25 minutes and the standard deviation is s = 21.88minutes. Assume that the travel times to work are normally distributed.

    (a) What is the point estimate of the average travel time to work?

    The point estimate is x = 31.25 minutes.

    (b) What is the standard error of the mean?

    SE = 8925.420

    88.21

    n

    s

    (c) What is the critical value for 95% confidence?

    df = 20 – 1 = 19t * = 2.093 (from t -Table)

    (d) What is the margin of error for 95% confidence?

    m = t *SE = (2.093)(4.8925) = 10.24(e) What is the 95% confidence interval for the mean travel time to work?

    m x = 31.25 ± 10.24 = 21.01 to 41.49

    We are 95% confident that the mean travel time to work for employed adults in New YorkState is between 21.01 and 41.49 minutes.

    (f) Construct 90% and 99% confidence intervals.The 90% and 99% confidence intervals replace the 95% critical value t * = 2.093 by the90% and 99% critical values t * = 1.729 and t *= 2.861, respectively.

    90% confidence interval: 46.825.3120

    88.21)729.1(25.31* n

    st x or 22.79 to 39.71

    99% confidence interval: 00.1425.3120

    88.21)861.2(25.31*

    n

    st x or 17.25 to 45.25

    Note that: 1. The obtained intervals are centered at the point estimate x = 31.25.2. A longer interval is required to estimate with a higher level of confidence.

    (The margin of error equals 8.46 for 90% confidence, 10.24 for 95%, and 14.00 for 99%.)

    (g) How many more observations should we include in the sample if we want to estimatethe mean travel time within 6 minutes with 95% level of confidence?

    5925.586325.767948.45

    6)88.21)(093.2(* 2

    222

    m st

    n (Rounding up!)

    We need a total of 59 observations. Therefore, 59 – 20 = 39 more randomly drawnobservations should be included in the sample.

    Note: The general rule is to round the sample size up to the next whole integer to slightly oversatisfythe criteria. This conservative approach will make the interval somewhat smaller than required.

  • 8/17/2019 05_Statistical_Inference.pdf

    9/14

    - 9 -

    Hypothesis Tests for a Population Mean

    The goal of hypothesis tests is to assess the evidence provided by a sample about some claimconcerning a population.

    We will assume that the population from which a simple random sample of size n was drawn hasa normal distribution. When the population is not normally distributed the results will still beapproximately correct and research shows that the following rules of thumb can be used:

    – If n < 15, the data must be close to normal (roughly symmetric, single peak, no outliers). – If 15 ≤ n < 40, mild skewness is acceptable, but not outliers. – If n ≥ 40, the results will be valid even with strong skewness.

    The claim tested by a statistical test is called the null hypothesis and is denoted by 0 H .Usually th e null hypothesis is a statement of “no effect” or “no difference.” The test is designed to assess the strength of the evidence against the null hypothesis.

    The claim about the population that we are trying to find evidence for is called the alternativehypothesis and is denoted by a H . The alternative hypothesis is one-sided if it states that a

    parameter is smaller than (in left-sided ) or larger than (in right-sided ) the null hypothesis value.It is two-sided if it states that the parameter is different from the null value (it could be eithersmaller or larger):

    left-sided test right-sided test two-sided test

    0

    00

    :

    :

    a H

    H

    0

    00

    :

    :

    a H

    H

    0

    00

    :

    :

    a H

    H

    To test a hypothesis about a population mean, we use the test statistic

    n

    s

    xt 0

    The P -value is the probability if 0 H is true, of randomly drawing a sample like the one obtained,

    or more extreme, in the direction of a H . The P -value is calculated as the corresponding area

    under the curve, one-tailed or two-tailed depending on a H :

    left-sided test right-sided test two-sided test

    Small P -values are evidence against 0 H , because they say that the observed result is unlikely to

    occur when 0 H is true. Large P -values fail to give evidence against 0 H .

  • 8/17/2019 05_Statistical_Inference.pdf

    10/14

    - 10 -

    We can compare the P -value with a predefined level of significance .

    If P -value ≤ we reject 0 H and say that the result is statistically significant at level .If P -value > we do not reject 0 H .

    A result with a certain P -value could be significant at one level of significance and notsignificant at another level of significance.

    There is no rule for how small a P -value we should require to reject 0 H – it is a matter of judgment.The most commonly used values for are 0.05 and 0.01.If we choose = 0.05, we are requiring that the data give evidence against 0 H so strong that it

    would happen no more than 5% of the time (5 times in 100 samples in the long run) when 0 H is true.

    The following steps are appropriate for testing a claim about a population mean:

    1. Check the conditions for statistical inference.

    2. Formulate 0 H and a H .

    3. Select a level of significance .

    4. Calculate the test statistic

    n

    s

    xt 0

    5. Find the P -value.

    6. Reject 0 H if the P -value .

    Do not reject 0 H if the P -value .

    7. State a conclusion in context.

  • 8/17/2019 05_Statistical_Inference.pdf

    11/14

    - 11 -

    Example 4

    A business travel magazine wants to classify transatlantic gateway airports according to themean rating for the population of business travelers. A rating scale with a low score of 0 and ahigh score of 10 will be used, and airports with a population mean rating greater than 7 will be

    designated as superior service airports.The magazine staff surveyed a random sample of 60 business travelers at each airport to obtainthe ratings data. The sample for London’s Heathrow Airport provided a sample mean rating of x = 7.25 and a sample standard deviation of s = 1.052.

    Do the data indicate that Heathrow should be designated as a superior service airport?

    Solution:

    1. The sample size n = 60 is large enough to perform safely the hypothesis test.

    2. We want to develop a hypothesis test for which the decision to reject 0 H will lead to theconclusion that the population mean rating for the Heathrow Airport is greater than 7.Thus, a right-sided test is required:

    7:

    7:0

    a H

    H

    3. We will use = 0.05 as the level of significance for the test.

    4. The value of the test statistic is

    84.11358.0

    25.0

    60052.1

    725.70

    n s

    xt

    5. The sampling distribution of t has n – 1 = 60 – 1 = 59 degrees of freedom.

    Because the test is a right-sided test, the P -value is the area under the curve of the t distribution to the right of t = 1.84.

    Using the t -Table for t distribution with 60 (the closest to 59) degrees of freedom, we see that1.84 is between 1.671 and 2.000 which correspond to one-sided P -values 0.05 and 0.025.Therefore, our P -value must be less than 0.05 and greater than 0.025.We can approximate it as P -value ≈ (0.025 + 0.05)/2 = 0.0375

    Using Excel, P -value = TDIST(1.84,59, 1) = 0.0354

    6. Since P -value < , we reject the null hypothesis.

    7. The Heathrow Airport can be classified as a superior service airport.

  • 8/17/2019 05_Statistical_Inference.pdf

    12/14

    - 12 -

    Example 5

    The company Holiday Toys manufactures and distributes its products through more than 1000retail outlets. For this year’s most important new toy, Holiday’s marketing director is expectingdemand to average 40 units per retail outlet.

    Prior to making the final production decision based upon this estimate, Holiday decided to survey asample of 25 retailers in order to develop more information about the demand for the new product.Each retailer was provided with information about the features of the new toy along with the cost andthe suggested selling price. Then each retailer was asked to specify an anticipated order quantity.Here are their answers about the number of units they anticipate to order:

    26 23 32 47 45 31 47 59 21 52 45 53 3445 39 52 52 22 22 33 21 34 42 30 28

    Should Holiday Toys continue its production planning based on the marketing director’s estimateor they have to reevaluate their production plan?

    Solution:

    The sample data will be used to conduct thefollowing two-sided test:

    40:

    40:0

    a H

    H

    The histogram of the sample data shows amild right skewness with no extreme outliers.So the use of a t distribution with n – 1 = 24degrees of freedom is appropriate.

    Let = 0.05. We calculate x = 37.4, s = 11.79, and the test statistic

    10.1358.2

    6.2

    25

    79.11404.370

    n

    s x

    t

    Because we have a two-sided test, the P -value is two times the area under the curve for the tdistribution to the left of t = – 1.10. Since the t distribution is symmetric, however, the area under thecurve to the left of t = – 1.10 is the same as the area under the curve to the right of t = 1.10. Using thet -Table for df = 24, we see that t = 1.10 is very close to 1.059 corresponding to two-sided P -value 0.30.

    (Excel gives: P -value = TDIST(1.10,24, 2) = 0.2822)

    The P -value 0.30 is greater than = 0.05. Therefore, 0 H cannot be rejected.

    Sufficient evidence is not available to conclude that Holiday Toys should change its production plan for the coming season. Therefore, Holiday Toys should continue its production planning forthe coming season based on the expectation that the average demand is 40 units per retail outlet.

    0

    1

    2

    3

    4

    5

    6

    7

    20-26 27-33 34-40 41-47 48-54 55-61

    C o u n t

    Number of units

  • 8/17/2019 05_Statistical_Inference.pdf

    13/14

    - 13 -

    Confidence Interval Approach (for two-sided tests)

    It turns out that the testing of 00 : H against 0:a H at a significance level is equivalent to

    computing a (1 – )100% confidence interval on and rejecting 0 H if the hypothesized mean 0 is noinside the confidence interval. If 0 is inside the confidence interval, the null hypothesis is not rejected.

    Note: The same approach could be used for one-tailed tests too.However, it would require one-sided confidence intervals which we have not studied.

    Example 5 (Continued)For this example, x = 37.4, s = 11.79, n = 25.The critical value for df = 24 and 95% confidence is t * = 2.064.The 95% confidence interval is

    87.44.37)358.2)(064.2(4.3725

    79.11064.24.37*

    n

    st x

    = 32.53 to 42.27This interval contains the hypothesized mean ( 0 = 40).Therefore, we do not reject the null hypothesis at the 5% ( = 0.05) significance level.

    Type I and Type II Errors

    Because in hypothesis testing sample data is used to make conclusions about a population,we must allow for the possibility of errors. Two types of errors can be made in any test.

    A Type I error occurs when we reject a true null hypothesis,that is, claiming a H when in fact 0 H is true.

    A Type II error occurs when we do not reject a false null hypothesis,that is, claiming 0 H when in fact a H is true.

    The probabilities of Type I and Type II errors are:

    P(Type I error) =P(Type II error) =

    where is the level of significance of the test.

    Ideally we would like both and to be as small as possible. Unfortunately, an inverse

    relationship exists between them such that as gets smaller, gets larger.

    In practice, Type I errors are regarded as more serious. As a consequence, the person conductingthe test must control for the probability of Type I error. He or she is doing so by choosing a smallvalue for the level of significance , for example 0.05, or 0.01.

    Controlling for a Type II error is not common. To avoid the risk of making a Type II error,we should n ever directly “accept” 0 H . We should either “reject” or “do not reject” 0 H .

  • 8/17/2019 05_Statistical_Inference.pdf

    14/14

    - 14 -

    Example 6

    Carpetland salespersons averaged $8,000 per week in sales. Steve Contois, the firm’s vice president, proposed a compensation plan with new selling incentives. Steve hopes that the results of a trialselling period will enable him to conclude that the compensation plan increases the average sales

    per salesperson.

    (a) Develop the appropriate null and alternative hypotheses.

    (b) What is the Type I error in this situation? What are the consequences of making this error?

    (c) What is the Type II error in this situation? What are the consequences of making this error?

    Solution:reject 0 H (Type I error if 0 H is true )

    (a) 8000:0 H

    do not reject 0 H (Type II error if 0 H is false)

    accept a H

    8000:a H

    do not accept a H

    a H is a research hypothesis to see if the plan increases average sales.

    (b) Type I error is claiming that > 8000 when the new plan does not increase the sales.

    A mistake could be implementing the plan when it does not help.

    (c) Type II error is concluding that 8000 when the plan really would increase sales.This could lead to not implementing a plan that would increase sales.