Confidence Intervals and Hypothesis Testing - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

Confidence Intervals and Hypothesis Testing

Description:

7.4 Confidence Intervals for a Population Proportion ... in the sample estimate they may cautiously conjecture that the true mean is ... – PowerPoint PPT presentation

Number of Views:194
Avg rating:3.0/5.0
Slides: 58
Provided by: mcgrawhill
Category:

less

Transcript and Presenter's Notes

Title: Confidence Intervals and Hypothesis Testing


1
Confidence Intervals and Hypothesis Testing
  • 7.1/2 Confidence Intervals for a Population Mean
  • 7.4 Confidence Intervals for a Population
    Proportion
  • 8.1 Null and Alternative Hypotheses and Errors in
    Testing
  • 8.2/3 Tests about a Population Mean assuming
    sigma is known use of Z
  • 8.4 Testing assuming sigma is unknown

2
Motivational Scenario
  • A market research agency has been given the task
    to estimate the average number of hours per week
    that young adults spend surfing the web.
  • The agency surveys a random sample of 100 young
    adults and obtains a mean of 20 hours and a
    standard deviation of 5 hours
  • Can the agency conclude that the true mean number
    of hours per week spent by all young adults
    surfing the web is exactly 20 hours?

3
Motivational Scenario contd
  • Because the market research agency recognizes
    that the 20 hours was obtained from just one of
    many possible samples of the population they are
    unwilling to say the population mean is exactly
    equal to 20 hours.
  • To allow for the variation in the sample estimate
    they may cautiously conjecture that the true mean
    is somewhere between 18 and 22 hours, between 15
    and 25 hours, etc.

4
Establishing an Interval for Estimation
  • How wide should they make the interval?
  • How confident should they be that the named
    interval does indeed contain the true mean?
  • On what basis should the choice be made?
  • They can use an established fact about how sample
    means vary when random samples are repeatedly
    drawn from any population the central limit
    theorem

5
Confidence Intervals for the Mean - Rationale

6
Based on this relative frequency idea, if only
one random sample of size n is drawn we can
express 95 confidence that the interval
will contain m. This interval is called
a 95 confidence interval for m because if we
were to repeat the sampling process many times,
95 of the intervals calculated this way would
contain the true mean
7
(No Transcript)
8
7.1 Confidence Intervals for a Mean When Sigma
is Known
9
Example Confidence Interval for Mean assuming
sigma known
Example 7.1 Gas Mileage Case (assuming sigma
known)
95 Confidence Interval
99 Confidence Interval
10
Effect of Confidence Coefficient on Interval
For a given sample size, the interval width is
narrower for lower levels of confidence.
11
Effect of Sample Size on Confidence Interval
For a given level of confidence the interval
width is narrower for larger samples.
12
Confidence Intervals when population standard
deviation is unknown
There is one problem.we do not usually know s so
we cannot calculate We could use the
sample standard deviation, however.
13
The t-distribution
  • Just as
  • has a standard normal (Z) distribution either
    when X is normal or n is large, so does
  • follow a t-distribution with n-1 degrees
  • of freedom provided X is normally distributed

14
The t-distribution
  • The t-distribution looks almost like the
    standard normal distribution in that it is
    symmetric about zero.
  • However, the tails of the t-distribution are
    fatter than that of the standard normal. -
    This is to take into account the use of the
    sample standard deviation (s) instead of the
    population standard deviation (s).

15
(No Transcript)
16
The t-distribution
  • Table values used to construct confidence
    intervals using the t-distribution will be
    different from the standard normal.
  • The shape of the t-distribution is different
    depending on the degrees of freedom (df). When
    used to compute confidence intervals for the mean
    (m) the df n -1.
  • When the df are very large, the t-distribution is
    close to the standard normal distribution
    (z-distribution).

17
Effect of Degrees of Freedom on the
t-distribution
As the number of degrees of freedom increases,
the spread of the t distribution decreases and
the t curve approaches the standard normal curve.
18
7.2 Confidence Intervals for a Mean when Sigma
is unknown
If the sampled population is normally distributed
with mean ?, then a (1-a)100 confidence interval
for m is
19
95 C.I. for m using the t-distribution
Suppose you have collected a sample of
20 observations from a normal distribution, your
sample mean is 5.5 and your sample standard
deviation is 1.7 df 19 t 2.093
20
7.4 Confidence Intervals for a Population
Proportion
21
Example Confidence Interval for a Proportion
Example 7.8 Phe-Mycin side effects
22
Hypothesis Testing
  • Formal way to determine whether or not the data
    support a belief or hypothesis.

23
Hypothesis Testing in the Judicial System
  • In our judicial system we have the following
    hypotheses
  • The accused is innocent The accused is guilty
  • We can make two errors
  • Convicting the innocent Letting the guilty go
    free

24
Hypothesis Testing in the Judicial System
  • It is desirable to minimize the chance of
    committing either error. But guarding against
    one usually results in increasing the chance of
    committing the other.
  • Society favors guarding against convicting the
    innocent.

25
Procedure for Guarding Against Convicting Innocent
  • Assume accused is innocent.
  • Gather evidence to prove guilt
  • Convict only if evidence is strong enough

26
Equivalent Procedure in Statistics
  • To test the belief m gt 20 (alternative
    hypothesis, Ha)
  • Assume m not gt 20 (Null hypothesis, Ho m ? 20)
  • Gather random sample from population compute
    sample mean, x
  • Conclude m gt 20 (Ha) only if evidence is strong
    enough, i.e. if x is so many standard deviations
    away from 20, the probability of this occurring
    by pure random chance is very small

27
8.1 Null and Alternative Hypotheses
The null hypothesis, denoted H0, is a statement
of the basic proposition being tested. The
statement generally represents the status quo and
is not rejected unless there is convincing sample
evidence that it is false.
The alternative or research hypothesis, denoted
Ha, is an alternative (to the null hypothesis)
statement that will be accepted only if there is
convincing sample evidence that it is true.
28
Types of Hypothesis
One-Sided, Greater Than H0 ? ? 50 Ha ? gt
50 (Trash Bag)
One-Sided, Less Than H0 ? ? 19.5 Ha ? lt
19.5 (Accounts Receivable)
Two-Sided, Not Equal To H0 ? 4.5 Ha ? ?
4.5 (Camshaft)
29
Hypothesis Testing Definitions
  • Type I error concluding Ha when Ho is true
    (convicting the innocent)
  • Type II error concluding Ho when in fact it is
    false (letting the guilty go free)
  • ? Prob (Type I error) significance level
  • b Prob (Type II error)

30
(No Transcript)
31
Formal Hypothesis Testing
  • Establish the Null Hypothesis and the Alternative
    Hypothesis
  • H0 ? 20.00 Ha ? ? 20.00 (two tailed)
  • OR
  • H0 ? 20.00 Ha ? gt 20.00 (right tailed)
  • OR
  • H0 ? 20.00 Ha ? lt 20.00 (left tailed)
  • Ho must always have an equal sign and Ha must be
    what you want to prove

32
Formal Hypothesis Testing for m
  • Specify ?, the probability of a Type I error.
  • For example, ?.05.
  • You set your standard for how extreme the
    sample results must be (in support of the
    alternative hypothesis in order for you to reject
    the null.
  • Here, the sample results must be strong
    enough in favor of Ha that you would falsely
    reject the null only 5 of the time.

33
Formal Hypothesis Testing for m
  • Compute the test statistic, z.
  • a) Determine the rejection point for z, za
  • b) Compute the probability of obtaining such an
    extreme test statistic z by pure chance, if the
    Null hypothesis were true. This is called the
    p-value of the test.
  • Reject or fail to reject the Null Hypothesis by
    determining a) whether z gt za or b) the p-value
    is less than or greater than a.
  • Interpret statistical result in (real-world)
    managerial terms

34
Interpreting p-values
  • All statistical packages give p-values in the
    standard output.
  • When we reject Ho we say the test is significant.
  • If p-value lt .01, highly significant
    (overwhelming evidence in support of research
    hypothesis)
  • If p-value between .01 and .05, significant
    (strong evidence)
  • If p-value between .05 and .10, slightly
    significant (weak evidence)
  • If p-value gt .10, not significant (no evidence)

35
Hypothesis Test Example ex. 8.7/8.30
  • What are we given? n 65 s 2.6424 xbar
    42.954
  • For this exercise well consider s to represent
    the true s
  • Step 1, establish hypotheses
  • H0 ? 42 vs. Ha ? gt 42
  • Step 2, specify significance level. a .01
    (given)
  • Step 3, compute the test statistic
  • z (42.954-42)/(2.6424/sqrt65) 2.91
  • Step 4a, determine the rejection point, z..01
    2.326
  • Step 4b, determine the p-value. Z-table gives
    P(z lt 2.91) 0.9982. So, P(z gt 2.91) 1-
    0.9982 .0018

36
Hypothesis Test Example ex. 8.7/8.30
  • Step 5, decision reject Ho since a) test
    statistic, z (2.91) gt rejection point (2.326) or
    since b) p-value (.0018) lt ? .01
  • Step 6, conclusion within context Conclude there
    is very strong evidence that a typical customer
    is very satisfied since we reject the notion that
    the average rating is 42 with such a small
    p-value

37
Hypothesis Test Example ex. 8.9/8.32
  • What are we given? n 100 s 32.83 xbar
    86.6
  • For this exercise well consider s to represent
    the true s
  • Step 1, establish hypotheses
  • H0 ? 90 vs. Ha ? lt 90
  • Step 2, specify significance level. a .05
    (arbitrary)
  • Step 3, compute the test statistic
  • z (86.6 - 90)/(32.83/sqrt100) -1.035
  • Step 4a, determine the rejection point, -z.05
    -1.645
  • Step 4b, determine the p-value. Z-table gives
    P(z lt -1.04) 0.1492.

38
Hypothesis Test Example ex. 8.9/8.32
  • Step 5, decision fail to reject Ho since a) test
    statistic, z (-1.035) not beyond rejection point
    (-1.645) or since b) p-value (.1492) gt ? .05
  • Step 6, conclusion within context Conclude there
    is no evidence that the mean audit delay is less
    than 90 days since we fail to reject the notion
    that the mean is 90

39
Two Tailed vs. One Tailed Tests
If the alternative is ? ? 20, the test is
two-tailed. a is shared between both tails of the
z-curve. The p-value twice the area cut off at
the tail by the computed z. This p-value is then
compared with a.
a/2 .025
?/2.025
½ p-value
z
40
Hypothesis Test Example ex. 8.11/8.45a
  • What are we given? n 36 s 0. 1 xbar
    16.05
  • For this exercise well consider s to represent
    the true s
  • Step 1, establish hypotheses
  • H0 ? 16 vs. Ha ? ? 16
  • Step 2, specify significance level. a .01
    (given)
  • Step 3, compute the test statistic
  • z (16.05 - 16)/(0.1/sqrt36) 3.0
  • Step 4a, determine the rejection points, z.005
    2.576
  • Step 4b, determine the p-value. Z-table gives
    P(z lt 3) 0.9987, P(z gt 3) 1 - .9987 0.0013.
    So 2-tailed p-value 20.0013 0.0026

41
Hypothesis Test Example ex. 8.11/8.45
  • Step 5, decision reject Ho since a) test
    statistic, z 3.0) is beyond one of the rejection
    points (2.576) or since b) p-value (.0026) lt ?
    .01
  • Step 6, conclusion within context Conclude there
    is very strong evidence that the filler needs
    readjusting since we reject the notion that the
    mean is 16

42
8.4 Tests about a Population Mean Sigma Unknown
If the sampled population is normal, we can
reject H0 ? ?0 at the ? level of significance
(probability of Type I error equal to ?) if and
only if the appropriate rejection point condition
holds or, equivalently, if the corresponding
p-value is less than ?.
Reject H0 if
p-Value
Alternative
43
Example 1 Test about a Mean Sigma Unknown.
Credit Card Case (pg 322)
  • What are we given? n 15 s 1.538 xbar
    16.827 ? .05
  • Step 1, establish hypotheses
  • H0 ? ? 18.8 vs Ha ? lt 18.8
  • Step 2, set significance level. a .05 (given)
  • Step 3, compute the test statistic
  • Step 4a, determine rejection point t.05,14
    1.761
  • Step 4b, estimate p-value df14, P(t lt 4.14)
    .0005. So P(t lt 4.97) lt .0005

44
Example 1 Test about a Mean Sigma Unknown.
Credit Card Case (pg 322)
Step 5, decision reject Ho since (a) test
statistic, t (-4.97) lt rejection point (-1.761)
or (b) p-value (lt.0005) lt a .05 Step 6,
conclusion within context there is overwhelming
evidence that the current mean credit card
interest rate is less than 18.8.
45
MegaStat Output for Example 1
46
Hypothesis Test Example 2
  • What are we given? n 30 s 15 x 21 ?
    .10
  • Step 1, establish hypotheses
  • H0 ? 20 vs. Ha ? gt 20
  • Step 2, set significance level. a .10 (given)
  • Step 3, compute the test statistic
  • t (21 - 20)/2.74 0.365
  • Step 4a, determine the rejection points, t.10,29
    1.311
  • Step 4b, estimate the p-value. Using df 29,
    t-table gives P(T gt 1.311) .10. So, P(T gt t
    .365) gt .10 Best estimate of p-value is gt 0.10

SExbar 15/?30 2.74
47
Using df 29, t-table gives P(T gt 1.311)
.10 P-value P(T gt t) gt .10
0.10
t 0.365
1.311
48
Hypothesis Test Example 2
  • Step 5, decision fail to reject Ho since (a)
    test statistic, t (0.365) lt rejection point
    (1.311) or (b) p-value (gt.10) gt ? .10
  • Step 6, conclusion within context no context
    given but we can say there is insufficient
    evidence that the population mean is greater than
    20. Notice we do NOT say we have evidence that m
    is less than or equal 20. In other words we can
    prove Ha but not Ho

49
MegaStat Output for Example 2
50
Hypothesis Test Example 3
  • What are we given? n 400 s 15 x 23 ?
    .05
  • Step 1, establish hypotheses
  • H0 ? 20 vs. Ha ? ? 20
  • Step 2, set significance level. a .05 (given)
  • Step 3, compute the test statistic
  • t (23 20)/0.75 4.0
  • Step 4a, determine the rejection points,
    t.025,399 1.96
  • Step 4b, estimate the p-value. Using df 8,
    t-table gives P(T gt 3.291) .0005. So, P(T gt t
    4) lt .0005. Since test is two tailed, p-value
    lt 20.0005 i.e. lt 0.001

51
Since we have a 2-tailed test, p-value 2 x P(T
gt t). 2 x .0005 .001, so p-value lt .001 lt a
(.05). Reject H0 since p-value lt a
.0005
½ p-value lt .0005
3.291
4.0
52
Hypothesis Test Example 3
  • Step 5, decision reject Ho since (a) test
    statistic, t (4.0) gt rejection point (1.96) or
    (b) p-value (lt.001) lt ? .05
  • Step 6, conclusion within context no context
    given but we can say there is very strong
    evidence that the population mean is not equal to
    20 and is most likely gt 20 since we rejected Ho
    at the upper tail.

53
MegaStat Output for Example 3
54
Hypothesis Test Example 4
  • What are we given? n 25 s 4 x 18.7 ?
    .05
  • Step 1, establish hypotheses
  • H0 ? 20 vs. Ha ? lt 20
  • Step 2, set significance level. a .05 (given)
  • Step 3, compute the test statistic
  • t (18.7 20)/0.80 1.63
  • Step 4a, determine the rejection point, t.05,24
    1.711
  • Step 4b, estimate the p-value. Using df 24,
    t-table gives P(T lt 1.711) .05 and P(T lt
    1.318) .10 Since 1.711 lt (t 1.63) lt
    1.318 , p-value is between 0.05 and 0.10

55
Using df 24, t-table gives P(T lt 1.711) 0.05
and P(T lt 1.318) 0.10 . Since t 1.63 which
lies between 1.711 and 1.318 then 0.05 lt
P-value lt 0.10
.10
.05
-1.711 -1.63
-1.318
56
Hypothesis Test Example 4
  • Step 5, decision F.T.R. Ho since (a) test
    statistic, t (1.63) is not as extreme as
    rejection point (1.711) or (b) p-value (between
    .05 and .10) gt ? .05
  • Step 6, conclusion within context no context
    given but we can say there is only weak evidence
    that the population mean is less than 20 and the
    finding is insignificant at the 5 level

57
MegaStat Output for Example 4
Write a Comment
User Comments (0)
About PowerShow.com