Download Week5 - Staff Web Pages

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Degrees of freedom (statistics) wikipedia , lookup

Foundations of statistics wikipedia , lookup

Taylor's law wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

German tank problem wikipedia , lookup

Misuse of statistics wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
Confidence Intervals and
Hypothesis Tests
Week 5
Confidence Intervals Have:
• A percent of confidence: how sure are we
that the true proportion is in the interval.
• The interval: the low and high numbers that
we are x% sure contain the true
proportion.
Confidence Intervals
• All Confidence Intervals are an estimate
plus or minus a margin of error.
• Estimate ± Margin of Error
• Margin of error is the specific number of
standard errors (Std deviations) needed to
surround the percent of confidence
How to Make a Confidence
Interval for a Proportion
^
• Find p, the sample proportion from the data
^
• Find SE( p)=

^
^
p(1 p)
n
 z* for the level of confidence:
• Find

 90%1.645, 95%1.96, 99%2.576
• Find margin of error: ME = z*SE( p )
^
• Find interval =
^
p ± ME 
Confidence Intervals on the
Calculator
• STATSTESTSA:1-PropZInt
• Fill in the numbers
 X: number of successes in the sample
 N: sample side
 C-Level: percent of confidence
• Calculate
• Read off the interval
What can we say?
• We are 95% sure that the interval between
84% and 92% captures the true proportion
of all orders delivered on time.
• We are 90% sure that the interval from
78% to 84% contains the true proportion of
people who think original Frumpies are
better than new Frumpies.
What do we think?
• The interval is the subject not the proportion.
 We do not know anything about the proportion.
• The interval is one person’s calculated guess.
 Each sample will produce a different interval.
• The interval is not guaranteed to have
captured the proportion.
 We only have 90%, 95%, 99% certainty that the
interval captured the proportion
What we cannot imply.
• The parameter does not move around.
 95% of the time the parameter will be in the
interval
• Other people’s intervals will be like yours
 95% of all samples will have proportions that
will be in the interval.
• The parameter is sure to be in the interval
 The true proportion will be within the interval
Tests of Significance
Think
• Hypothesis test starts with a careful
statement of the alternatives.
• Form a null hypothesis H0 about a
parameter, usually the mean, µ or p
 H0 must be about a parameter
 Usually about what we do not want to show
 Usually states that the treatment had no effect
Think
• Form an alternative hypothesis, Ha
 Ha is what we “really want” to show
 Usually that the treatment had and effect
• Thought pattern
 Assume H0 is true
 Is the sample outcome surprisingly larger or smaller than
anticipated?
 If it is, then there is evidence that H0 is false and that Ha is true
 Ask the question: How unlikely is this sample result if the null
hypothesis is true?
 P-value is a measurement of the evidence against Ho.
• If p-value is small (less than .05) we reject Ho
• If p-value is large (more than .05) we do not reject Ho
Think
• The statement being tested is Ho. The test
is designed so to assess the strength of
the evidence against Ho.
• Usually the null hypothesis is a statement
of no effect or no difference.
• H0: p = some value is a common example
Think
• The alternative hypothesis, Ha states what
we hope the evidence will show.
• Two sided alternative: Ha: p ≠ same value
 We want to show that the true mean is not the
same as it was after the treatment
• One sided alternative: Ha: p > same value
or Ha: p < same value
 We want to show that the true mean has been
increased or decreased after the treatment
Thought Process
• We assume the claim is true.
• We take a sample and want to see if the
sample “supports” or “goes against” the
claim.
• We do not expect the sample to exactly
mirror the claim. The real world does not
come out even, but how far off is two far?
• We will use the number of standard errors
away from the claim as a measurement
Mechanics
• Find the standard deviation of p
SD 
p(1 p)
n
• Find how many standard deviations off the given proportion is
^
p p
z
SD( p)
• Use the Standard normal table to find the probability of a value this
extreme = p value
• The p value isthe probability that we would get a sample this far off
if Ho is true
Mechanics with the Calculator
• STATSTESTS5:1-PropZTest
• Fill in the numbers





Po: the claimed proportion
X: number of successes in the sample
N: sample size
Choose sample proportion ≠Po, <Po or >Po
Calculate
Calculator (page 2)
• Read results:
 Z = number of standard errors away from the
mean
 P= p-value, the measurement of how rare the
sample is if the claim is true.
 p = the sample proportion
^

Show
• Sometimes before the calculations are
done a set cut-off point will be established
such that if the p-value is smaller than the
cut-off point then H0 will be rejected.
• Common  levels are .05 and .01
• This cut-off point is call a significance level
and is denoted by the Greek letter alpha, 
 p-value is as small or smaller than ,
• If the
we say that it is statistically significant at
that level.

Tell
• After finding the p-value comment on the
likelihood of getting a value as extreme as
the test statistic given that H0 is true.
Tell
• What can we say if the p-value is small
 “The is strong evidence to reject H0 that . . .
and to accept Ha that . . . . “ Use context
 “The small likelihood of getting such a small pvalue given H0 is true leads us to reject H0 that
… and to accept Ha that . . . .
Tell
• What we can say if the p-value is large
 “Based on the p-value we can not reject H0
that . . .”
 “There is not enough evidence for us to reject
H0 that. . . .”
 Answer in the context of the problem.
Confidence Interval for Means
How to make a C.I. for means
s
SE(x) 
n
 s=standard deviation of the data
• Find SE(sample mean)
 n=sample size
• Find degrees of freedom dof = n-1

• Use the T chart to find the magic number t*
• Find x  t * SE(x)
Confidence Intervals on
Sample means on the TI
• STATSTESTSTinterval
• Choose Stats
• Fill in the numbers

• x Sample mean
• Sx:Sample standard deviation
• N: Sample size
• C-Level: Percentage of confidence desired
• Calculate
Calculator page 2
• Results:
• The interval
 (Low number, High number) for the mean
• We are C-Level% sure the true mean of
the population is between Low number,
High number
Hypothesis Tests for Means
How do you do it
s
SE(x) 
n
 s=standard deviation of the data
• Find SE(sample mean)
 n=sample size
• Find degrees of freedom dof = n-1

• Find how many SEs off the µ the sample
mean is:
x 
t
SE(x)
How do you do it part 2
• Look up the p-value in the T chart
 Find the degrees of freedom row
 Look up the desired cut-off points
• Compare the t value with the cut-off points
to estimate the p-value


Confidence Intervals for the
mean by Calculator
• STATSTESTS2: T-Test
• Choose STATS
• Enter the numbers





0 : Claimed value of the mean
x : Sample mean
Sx: Sample standard deviation
N : Sample size
Choose ≠, < or >
• Calculate
Calculator page 2
• Results:
 T: number of Standard errors off the claim
 P: p-value. Proportion of the time a sample
this unusual will occur if the claim is true