Testing Hypotheses Pri

Embed Size (px)

Citation preview

  • 8/3/2019 Testing Hypotheses Pri

    1/37

    Testing Hypotheses

  • 8/3/2019 Testing Hypotheses Pri

    2/37

    Presentation Outline Hypothesis

    Types of Hypotheses

    Null and Alternative Hypothesis

    Motivation for Hypothesis Testing

    Two-tailed and One-tailed Hypothesis

    Test Statistic

    Decision Errors

    Decision Rules

    Two-tailed and One-tailed Tests

    Test of hypothesis for a population mean (Z Test , t Test)

    Hypothesis Test for a Proportion

  • 8/3/2019 Testing Hypotheses Pri

    3/37

    What is Hypothesis ??

    A hypothesis is a statement that something is true.A hypothesis is an assumption about the populationparameter.

    A parameter is a characteristic of the population, likeits mean or variance.

    The parameter must be identified before analysis.

    I assume the mean height ofstudents in this class is 5 feet 4

    inches.

  • 8/3/2019 Testing Hypotheses Pri

    4/37

    Hypothesis Testing

    Statisticians follow a formal process to determinewhether to reject a null hypothesis, based on sample

    data.

    This process is called hypothesis testing.

  • 8/3/2019 Testing Hypotheses Pri

    5/37

    Types of Hypotheses

  • 8/3/2019 Testing Hypotheses Pri

    6/37

    Null Hypothesis

    A hypothesis to be tested.

    The symbol H0is used to represent the null hypothesis

    Alternative Hypothesis

    A hypothesis which is alternativ

    e to the null hypothesis.

    The symbol HAor H1is used to represent the alternativehypothesis.

    It is the hypothesis that is believed to be true, or what

    you are trying to prove is true.

  • 8/3/2019 Testing Hypotheses Pri

    7/37

    Null Hypothesis Vs.Alternative HypothesisNull Hypothesis Alternative Hypothesis

    Begin with the assumption that thenull hypothesis is TRUE

    Is generally the hypothesis that isbelieved to be true by the

    researcher

    Always contains the = sign Never contains the = sign

    Null Hypothesis may or may not berejected

    Alternative Hypothesis may or maynot be accepted

    Observed difference is due tochance and there is nosignificant

    difference.

    Observed difference is real

  • 8/3/2019 Testing Hypotheses Pri

    8/37

    Example: Null Hypothesis and Alternative Hypothesis

    NumberedTickets

    The average ofthe box equals 50

    The average of thebox is less than 50

    Mr. Null Mr. Alt

    Null Hypothesis Alternative Hypothesis

    Arguing about the averageof a large box of numberedtickets

  • 8/3/2019 Testing Hypotheses Pri

    9/37

    Motivation for Hypothesis Testing

    The intent of hypothesis testing is formally examine twoopposing hypotheses, H0 and HA.

    These two hypotheses are mutually exclusive so that oneis true to the exclusion of the other.

    We accumulate evidence - collect and analyze sample

    information - for the purpose of determining which ofthe two hypotheses is true and which of the twohypotheses is false.

  • 8/3/2019 Testing Hypotheses Pri

    10/37

    One-tailed Hypothesis

    A Hypothesis in which the value of a parameter is specifiedas being either: above a certain value, or below a certain value.Eg: Mean height of students is less than 5 feet 4inches

    Two-tailed Hypothesis

    A form of alternative hypothesis in which a populationparameter is different than a specified value.

    Example: Mean height of students is not 5 feet 4inches

    0: aH

    0:

    aH

  • 8/3/2019 Testing Hypotheses Pri

    11/37

    Test Statistic

    i. The decision to reject or fail to reject is based oninformation contained in a sample drawn from thepopulation of interest.

    ii. The sample values are used to compute a single number,

    which operates as a decision maker.

    iii. This decision maker is called test statistic

    A test statistic is used to measure the differencebetween the data and what is expected on the null

    hypothesis.

  • 8/3/2019 Testing Hypotheses Pri

    12/37

    Determining Rejection and Acceptance Region

    Rejection Region

    If test

    statistic fallsin someinterval whichsupport

    alternativehypothesis, wereject the nullhypothesis.

    AcceptanceRegion

    It test

    statistic fallsin someinterval whichsupport null

    hypothesis, wefail to rejectthe nullhypothesis.

    Critical Value

    The value of

    the point,which dividethe rejectionregion and

    acceptance one

  • 8/3/2019 Testing Hypotheses Pri

    13/37

    Decision Errors

    Type I Error

    Reject Null Hypothesis when it is true

    Probability of Type I Error is denoted by alphaa

    The probability of committing a Type I error is

    called thesignificance level.

  • 8/3/2019 Testing Hypotheses Pri

    14/37

    Decision Errors

    Type II Error

    Researcher fails to reject a null hypothesisthat is false

    Probability of Type II Error is denoted byBeta,

    The probability of not committing a Type II

    error is called the Power of the test.

  • 8/3/2019 Testing Hypotheses Pri

    15/37

    Decision Rules

    In practice, statisticians describe decision rules for

    rejecting the null hypothesis in two ways with reference to a P-value or

    with reference to a region of acceptance.

    P-value The strength of evidence in support of a null hypothesis is measured

    by the P-value.

    Suppose the test statistic is equal to S. The P-value is theprobability of observing a test statistic as extreme as S, assumingthe null hypothesis is true.

    If the P-value is less than the significance level, we reject the null

    hypothesis.

  • 8/3/2019 Testing Hypotheses Pri

    16/37

    Decision Rules

    Rejection region If test statistic falls in some interval which support

    alternative hypothesis, we reject the null hypothesis.

    The set of values outside the region of acceptance.

    Acceptance Region The region of acceptance is a range of values. If the test

    statistic falls within the region of acceptance, the nullhypothesis is not rejected.

    It test statistic falls in some interval which support nullhypothesis, we fail to reject the null hypothesis.

    The value of the point, which divide the rejection regionand acceptance one is called

    Critical value

  • 8/3/2019 Testing Hypotheses Pri

    17/37

    Two-tailed vs. One-tailed TestsTwo-tailed Test One-tailed Test

    Test of deciding whether a

    population parameter is different

    thana specified value

    Test is about whether a population

    parameter is less than a specified

    value (left-tailed test) or more

    than a specified value (right-

    tailed test)In a two-tailed test, the direction

    of the difference is not predicted.

    In a one-tailed test, the researcher

    predicts the direction (i.e.

    greater or less than) of the

    difference.

    A two-tailed test splits the critical

    region equally on both sides of

    the curve.

    All of the critical region is placed

    on one side of the curve in the

    direction of the prediction.

  • 8/3/2019 Testing Hypotheses Pri

    18/37

    1. Test of hypothesis for a population mean

    Two-Tailed Test

    Large Sample

    With reference to region of acceptance orrejection

  • 8/3/2019 Testing Hypotheses Pri

    19/37

    Example - The population of all minority workers has a

    mean wage of $14,500 with a standard deviation of $200.

    Test whether a sample of 100 having an average of $14,300

    and = .05 differs from the population average.

    Step 1 Stating the null and alternative hypothesis

    1. HO : $14,500

    HA : $14,500

  • 8/3/2019 Testing Hypotheses Pri

    20/37

    Step 2 - Select Sampling Distribution and Establish theCritical Region

    Critical Region begins at Z= 1.96

    This is the critical Z score associated with =

    .05, two-tailed test.

    If the obtained Z score falls in the Critical

    Region, or the region of rejection, then we

    would reject the H0.

  • 8/3/2019 Testing Hypotheses Pri

    21/37

    Step 3:

    Applying the Formula to Compute the Test Statistic (Z

    for large samples ( 100)

    N

    Z

    When the Population Standard deviation is not knownthe formula is:

    1

    Ns

    Z

    StandardError

    Sample SD

  • 8/3/2019 Testing Hypotheses Pri

    22/37

    4.zx

    SE

    14,300 14,500

    200

    100

    10

    Substituting the values into the formula, we calculate aZ score of -10

    Rule of Thumb:

    If the test statistic is in the Critical Region ( =.05, beyond1.96):Rejectthe H0. The difference is significant.

    If the test statistic is not in the Critical Region (at =.05,between +1.96 and -1.96):Fail to rejectthe H0. The difference is not significant.

  • 8/3/2019 Testing Hypotheses Pri

    23/37

    Step 5

    Make a Decision and Interpret Results

    The obtained Z (-10) score falls in the Critical Region,

    so we rejectthe H0. Therefore, the H0 is false and must be rejected. There

    is evidence that the salaries are different.

    C C

    Z = -10Rejection region

  • 8/3/2019 Testing Hypotheses Pri

    24/37

    2. Test of hypothesis for a population mean

    Two-Tailed Test

    Small Sample

    With reference to region of acceptance orrejection

  • 8/3/2019 Testing Hypotheses Pri

    25/37

    Example - A manufacturer of ball bearings have a diameter of

    .25 inches and a sample standard deviation of .05 inches. A

    random sample ofn = 25 ball bearings reveal a mean diameter

    of .2670 inches. Conduct a hypothesis test at the 10 % level ofsignificance to determine whether there is statistical

    significance that the manufacturing process is not running

    correctly, that is .25 inches.

    Step 1 Stating the null and alternative hypothesis

    1. HO

    : .25

    HA

    : .25

  • 8/3/2019 Testing Hypotheses Pri

    26/37

    Step 2

    n< 30

    unknown

    The appropriate t distribution has (n- 1) Degrees offreedomDegrees of Freedom = n- 1 = 25 - 1 = 24

    Step 3 Determining the Critical value

    Given significance level of 0.10 and degree of freedom of 24,we look in the t distribution table.

    Under 0.10 column until we reach 24 degrees of freedom row.

    There we find the critical value of t, which is 1.711

    Thus we use t distribution.

  • 8/3/2019 Testing Hypotheses Pri

    27/37

    Step 4 Calculating the t - statistic

    4. tx

    SE

    .2670 .25

    .05

    25

    1.7

    Critical valuet = - 1.711

    Critical valuet = 1.711

    t = 1.7Acceptanceregion

    Step 5 Sketching the distribution and marking the

    sample value and critical value Step 6 Interpreting theResult

    The sample mean falls in

    the acceptance region,hence Fail to reject HO

    There is not enoughevidence that it is not

    running incorrectly.

  • 8/3/2019 Testing Hypotheses Pri

    28/37

    Main Considerations in Hypothesis Testing

    Sample size

    Use Z for large samples, t for small (

  • 8/3/2019 Testing Hypotheses Pri

    29/37

    The Curve for Two- vs. One-tailed Tests at = .05

    Two-tailed test:is there a significant difference?

    One-tailed tests:

    is the sample meangreater than ?

    is the sample meanless than ?

  • 8/3/2019 Testing Hypotheses Pri

    30/37

    Type I and Type II Errors

    Type I, or alpha error:

    Rejecting a true null hypothesis

    Type II, or beta error:

    Failing to reject a false null hypothesis

  • 8/3/2019 Testing Hypotheses Pri

    31/37

    START

    Decide whether this is a two-tailed or a one-tailed test. State your hypothesis. Select a

    level of significance appropriate for this decision

    Decide which distribution(tor z)is appropriate and find the critical value for the chosen

    level of significance from the appropriate appendix table.

    Circulate the standard error of the sample statistic. Use the standard error to

    standardize the observed sample value.

    Sketch the distribution and mark the position of the standardized sample value and the

    critical values for the test

    Is the sample

    statistic within

    the acceptance

    region?AcceptHo

    Translate the statistical results

    into appropriate managerial action

    Accept

    Ho

    Yes No

  • 8/3/2019 Testing Hypotheses Pri

    32/37

    Hypothesis Test for a Proportion

    Two-Tailed Test

    With reference to P-Value

    The CEO of a large electric utility claims that 80 % of his1,000,000 customers are very satisfied with the service

    they receive. To test this claim, the local newspaper

    surveyed 100 customers, using simple random sampling.

    Among the sampled customers, 73 % say they are verysatisified. Based on these findings, can we reject the CEO's

    hypothesis that 80% of the customers are very satisfied?

    Using a 0.05 level of significance.

  • 8/3/2019 Testing Hypotheses Pri

    33/37

    Solution

    Step 1

    Stating the null hypothesis and an alternative hypothesis.

    Null hypothesis : P = 0.80

    Alternative hypothesis : P 0.80

  • 8/3/2019 Testing Hypotheses Pri

    34/37

    Step 2

    Deciding the following:

    a. Nature of the testTwo-tailed test

    b. Level of Significance 0.05

    c. Choosing the distribution Normal distribution(as n > 30) Z-test

  • 8/3/2019 Testing Hypotheses Pri

    35/37

    Step 3 - Analyse sample data

    Using sample data, we calculate the standard deviation () and

    compute the z-score test statistic (z).

    = square root[ P * ( 1 - P ) / n ]

    = sqrt [(0.8 * 0.2) / 100] = sqrt(0.0016) = 0.04

    z = (p - P) /

    = (.73 - .80)/0.04 = -1.75

    Where, P is the hypothesized value of population proportion in the null

    hypothesis p is the sample proportion n is the sample size.

  • 8/3/2019 Testing Hypotheses Pri

    36/37

    Step 4 Determimg P Value

    P-value is the probability that the z-score is less than -1.75 or greater than 1.75.

    We use the Normal Distribution Calculator to find

    P(z < -1.75) = 0.04

    P(z > 1.75) = 0.04Thus, the P-value = 0.04 + 0.04 = 0.08

  • 8/3/2019 Testing Hypotheses Pri

    37/37

    Step 5 - Interpreting the results

    Ifpvalue > a, Do Not Reject H0

    Ifpvalue < a, Reject H0

    Since the P-value (0.08) is greater than the significance

    level (0.05), we cannot reject the null hypothesis.