33
Inference Inference 10.1: Estimating with 10.1: Estimating with Confidence Confidence 10.2 Tests of Significance 10.2 Tests of Significance 10.3 Making Sense of Statistical 10.3 Making Sense of Statistical Significance Significance 10.4 Inference as a Decision 10.4 Inference as a Decision

Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Embed Size (px)

Citation preview

Page 1: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Ch 10 – Intro To InferenceCh 10 – Intro To Inference

10.1: Estimating with Confidence10.1: Estimating with Confidence

10.2 Tests of Significance10.2 Tests of Significance

10.3 Making Sense of Statistical 10.3 Making Sense of Statistical SignificanceSignificance

10.4 Inference as a Decision10.4 Inference as a Decision

Page 2: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

DefinitionsDefinitions Statistical Inference Statistical Inference

– Provides methods for drawing Provides methods for drawing conclusions about a population from conclusions about a population from sample datasample data

– What happens if I do this many times?What happens if I do this many times?

Formal InferenceFormal Inference– Using probability to express the strength Using probability to express the strength

of our conclusions (probability takes of our conclusions (probability takes chance variation into account)chance variation into account)

Page 3: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Margin of Error Margin of Error

– How accurate we How accurate we believe our believe our guess is, based guess is, based on the variability on the variability of the estimateof the estimate

– What you always What you always see in the fine see in the fine printprint

Page 4: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Confidence Intervals Confidence Intervals Use facts about sampling distributions (what Use facts about sampling distributions (what

would happen in the long run) to express our would happen in the long run) to express our confidence in the results of any one sampleconfidence in the results of any one sample

““We got these numbers by a method that We got these numbers by a method that gives correct results 95% of the time.”gives correct results 95% of the time.”

In the form of In the form of estimate ± margin of errorestimate ± margin of error

Given at confidence level C which gives Given at confidence level C which gives probability the interval will capture true probability the interval will capture true parameter value in repeated samples parameter value in repeated samples

Page 5: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Fathom Demo Fathom Demo #29: Capturing #29: Capturing with Confidence with Confidence IntervalsIntervals– Black is a hit, red Black is a hit, red

is a missis a miss– What happens to What happens to

CIs when….?CIs when….?

p542 #10.1 to p542 #10.1 to 10.310.3

What CIs Say WSWhat CIs Say WS

Page 6: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Confidence Intervals Confidence Intervals Toolbox Toolbox

II CCreate reate FFabulous abulous CConfidence onfidence IIntervalsntervals

Identify Identify – PopulationPopulation– ParameterParameter– ProcedureProcedure

ConditionsConditions FormulaFormula CalculationsCalculations Interpret in Interpret in

ContextContext

Many CIs Collect More Measures

Page 7: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Confidence Intervals for μ Confidence Intervals for μ ConditionsConditions

– SRSSRS– sampling distribution of is approximately sampling distribution of is approximately

normalnormal GivenGiven CLTCLT NPPNPP

± z*± z*

““We are __% confident that the true mean We are __% confident that the true mean ___ is between __ and __. By __% confident, ___ is between __ and __. By __% confident, we mean that we arrived at this conclusion we mean that we arrived at this conclusion by a method that gives correct results __% by a method that gives correct results __% of the time.” of the time.”

Page 8: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

z* (Critical Values) z* (Critical Values)

Same as z-scores in Table A Same as z-scores in Table A (standard normal curve)(standard normal curve)

Most common are 1.645, 1.96 and Most common are 1.645, 1.96 and 2.576 (90, 95 and 99%) 2.576 (90, 95 and 99%)

90% is really 95% to left when you 90% is really 95% to left when you use the table (95 is 97.5, 99 is 99.5)use the table (95 is 97.5, 99 is 99.5)

SketchesSketches p548 #10.5-10.6p548 #10.5-10.6

Page 9: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Ways to Decrease Margin of Ways to Decrease Margin of Error Error

Make z* smaller (decrease confidence Make z* smaller (decrease confidence level C)level C)

Increase sample size Increase sample size nn

Decrease standard deviation Decrease standard deviation σσ

– High Confidence – our method almost always High Confidence – our method almost always gives correct answersgives correct answers

– Small Margin of Error – we have pinned down Small Margin of Error – we have pinned down the parameter quite precisely the parameter quite precisely

Page 10: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Choosing Sample Size Choosing Sample Size A wise user of statistics never plans A wise user of statistics never plans

data collection without planning the data collection without planning the inference at the same time.inference at the same time.

Chapter 9 - the size of the sample Chapter 9 - the size of the sample determines the margin of error, not determines the margin of error, not the size of the population (soup).the size of the population (soup).

p551 #10.10-10.11p551 #10.10-10.11

Page 11: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Cautions Cautions Data can’t be from anything more Data can’t be from anything more

complicated than an SRScomplicated than an SRS Beware of outliers and skewnessBeware of outliers and skewness Using σ is unrealistic, but we’re using it Using σ is unrealistic, but we’re using it

now to understand the process – this now to understand the process – this entire chapter is about the process!entire chapter is about the process!

Read last paragraph on p554 about Read last paragraph on p554 about what statistical confidence does not what statistical confidence does not saysay. .

Page 12: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

YMS - 10.2 YMS - 10.2

Hypothesis TestingHypothesis Testing

Page 13: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Tests of Significance – A Few Tests of Significance – A Few WaysWays

Used to assess evidence about a claim while CIs Used to assess evidence about a claim while CIs were estimating a parameterwere estimating a parameter

An outcome that would rarely happen if a claim An outcome that would rarely happen if a claim were true is good evidence the claim is not truewere true is good evidence the claim is not true

““Does our sample result reflect a true change or did Does our sample result reflect a true change or did our result occur just by chance; How unlikely is our our result occur just by chance; How unlikely is our outcome if the null hypothesis were really true?” outcome if the null hypothesis were really true?”

Uses knowledge of how the sample mean would Uses knowledge of how the sample mean would vary in repeated samplesvary in repeated samples

Page 14: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

HypothesesHypotheses Null Hypothesis (Null Hypothesis (HHoo) )

– Statement saying there is no effect or change Statement saying there is no effect or change in the populationin the population

– If true, the sample result is just chance at workIf true, the sample result is just chance at work Alternative Hypothesis (Alternative Hypothesis (HHaa))

– Alternative we believe to be true Alternative we believe to be true – It is cheating to first look at data and then It is cheating to first look at data and then

frame frame HHaa

One-sided vs. Two-sided testsOne-sided vs. Two-sided tests– <, > or ≠<, > or ≠– Should know before you collect sampleShould know before you collect sample– Choose two-sided to be safeChoose two-sided to be safe

Page 15: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

P-ValueP-Value Probability of a Probability of a

result result at least as far at least as far out as the result we out as the result we actually gotactually got

Evidence against Evidence against HHoo

Lower p-value = Lower p-value = stronger evidence stronger evidence

Probability from Ch Probability from Ch 2!2!

Page 16: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Calculating Two-Sided P-Calculating Two-Sided P-ValuesValues

Calculate the same way as one-sided and Calculate the same way as one-sided and then doublethen double

Alternative hypothesis stated some Alternative hypothesis stated some difference, not in any particular directiondifference, not in any particular direction

Must consider both differences – greater Must consider both differences – greater than and less than (even though your than and less than (even though your sample only produces one or the other)sample only produces one or the other)

Diagram on p573Diagram on p573

Page 17: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Statistically SignificantStatistically Significant Chance alone would rarely produce Chance alone would rarely produce

so extreme a resultso extreme a result Significance level Significance level alpha αα Reject null hypothesis when Reject null hypothesis when p p < < αα

Page 18: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Stats in DatingStats in Dating

Page 19: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

p564 #10.27 to 10.35 oddsp564 #10.27 to 10.35 odds

ha ha ha…

Page 20: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Significance Tests Toolbox Significance Tests Toolbox 1. 1. Identify population and parameter AND state the null Identify population and parameter AND state the null

and alternative hypotheses in words and symbols.and alternative hypotheses in words and symbols.

2. Choose and verify the procedure (conditions are still 2. Choose and verify the procedure (conditions are still SRS and normal).SRS and normal).

3. Carry out the inference procedure.3. Carry out the inference procedure.- Calculate the test statistic (one-sample z-- Calculate the test statistic (one-sample z-

statistic).statistic).- Find the p-value.- Find the p-value.

4. Interpret your results in the context of the problem.4. Interpret your results in the context of the problem.- Reject or do not reject the null hypothesis.- Reject or do not reject the null hypothesis.- Include p-value and statement assessing - Include p-value and statement assessing

strength. strength.

p576 #10.38-10.39p576 #10.38-10.39

Page 21: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Rejecting is not AcceptingRejecting is not Accepting Just because you can’t prove that something is Just because you can’t prove that something is

false, doesn’t mean that you believe it to be false, doesn’t mean that you believe it to be truetrue

Not rejectingNot rejecting the null hypothesis and the null hypothesis and acceptingaccepting the null hypothesis are not the same the null hypothesis are not the same conclusionconclusion

ExamplesExamples– Shakespeare VideoShakespeare Video– OJOJ

Ho: Person did not commit crime.Ho: Person did not commit crime. Ha: Person did commit crime.Ha: Person did commit crime. If there is enough evidence, we find the person guilty. If If there is enough evidence, we find the person guilty. If

there is not, we proclaim they are not guilty. We aren’t there is not, we proclaim they are not guilty. We aren’t saying the person is innocent, just that we didn’t have saying the person is innocent, just that we didn’t have enough evidence to find them guilty.enough evidence to find them guilty.

Page 22: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Fixed Significance Level Fixed Significance Level Z Tests for μ Z Tests for μ

Use the z-score associated with chosen Use the z-score associated with chosen significance level to make the decisionsignificance level to make the decision– You don’t need to find the p-value to make You don’t need to find the p-value to make

your decision. your decision. – More standard deviations from the mean More standard deviations from the mean

yields a smaller and smaller p-value/tail areayields a smaller and smaller p-value/tail area Example for One-Sided Tests with HExample for One-Sided Tests with Haa > >

– If z > 1.645 you can reject at 0.05If z > 1.645 you can reject at 0.05– If z > 1.96 you can reject at 0.025If z > 1.96 you can reject at 0.025– If z > 2.576 you can reject at 0.005If z > 2.576 you can reject at 0.005

Page 23: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

CIs and Two-Sided Tests CIs and Two-Sided Tests Reject if the value of Reject if the value of μμoo falls outside a falls outside a

level 1 – level 1 – αα confidence interval for μ confidence interval for μ – You’re 99% confident the true mean is You’re 99% confident the true mean is

captured in a particular interval, but the captured in a particular interval, but the interval doesn’t contain interval doesn’t contain μμoo

Why use a CI over a test?Why use a CI over a test?– CIs give an estimate of the parameter CIs give an estimate of the parameter

while tests just reject/accept valueswhile tests just reject/accept values

p580 #10.42-10.43p580 #10.42-10.43

Test Review p583 #10.46 to 10.54 Test Review p583 #10.46 to 10.54 evensevens

Page 24: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

YMS – 10.3YMS – 10.3

Making Sense of Statistical Making Sense of Statistical SignificanceSignificance

Page 25: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Choosing a Level of Choosing a Level of Significance Significance

What are the ramifications for rejecting What are the ramifications for rejecting HHoo??

Practical vs. Statistical Practical vs. Statistical Significance Significance

Who cares if your scab falls off half of Who cares if your scab falls off half of a day sooner?a day sooner?

Pay attention to actual data as well Pay attention to actual data as well as p-value. as p-value.

Page 26: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Inference is Not Valid for All Sets of Inference is Not Valid for All Sets of DataData

Inference cannot correct a poorly Inference cannot correct a poorly designed experiment or survey. designed experiment or survey.

Beware of Multiple Analyses Beware of Multiple Analyses Every once in a while the result Every once in a while the result

will show by chance. will show by chance.

p589 #10.58-10.59, 10.62 and 10.64

Page 27: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

YMS – 10.4YMS – 10.4

Inference as DecisionInference as Decision

Page 28: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Acceptance Sampling Acceptance Sampling

When When circumstances call circumstances call for a decision or for a decision or action at the end action at the end result of inferenceresult of inference

When we must When we must accept instead of accept instead of just not rejectingjust not rejecting

Page 29: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Type I Errors Type I Errors If we reject If we reject HHoo (accept (accept HHaa) when in ) when in

fact fact HHoo is trueis true Probability of Type I error is equal to Probability of Type I error is equal to α α

Type II Errors Type II Errors If we accept If we accept HHoo (reject (reject HHaa) when in ) when in

fact fact HHaa is true is true Calculated based on the alternative Calculated based on the alternative

for μ for μ

Page 30: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Type I ErrorType I Error Correct Correct DecisionDecision

Correct Correct DecisionDecision

Type II ErrorType II Error

Reject Ho

Accept Ho

Ho True Ha True

p 595

Truth about the Population

Decision based on Sample

p597 Examples 10.21 - 10.22 p598 #10.67

Type I & II Errors for HW

Page 31: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Power (1-β) Power (1-β)

Choose your interpretation:Choose your interpretation:

- Probability the test will reject - Probability the test will reject HHoo when an when an alternative is true alternative is true

- Probability of rejecting - Probability of rejecting HHoo when it is in fact false when it is in fact false

- Probability of making a correct decision (to - Probability of making a correct decision (to reject reject HHoo) when ) when HHoo is false is false

- Probability the test will pick up on an effect - Probability the test will pick up on an effect that is present that is present

- Probability the test will detect a deviation from - Probability the test will detect a deviation from the null hypothesis should such a deviation existthe null hypothesis should such a deviation exist

Page 32: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Ways to Increase Power Ways to Increase Power Increase Increase αα (less evidence is required to (less evidence is required to

reject)reject)

Consider an alternative that is farther away Consider an alternative that is farther away from μfrom μoo

Page 33: Ch 10 – Intro To Inference 10.1: Estimating with Confidence 10.2 Tests of Significance 10.3 Making Sense of Statistical Significance 10.4 Inference as

Increase the sample size Increase the sample size nn (less (less overlap because spread decreases) overlap because spread decreases)

Decrease σ (less overlap because Decrease σ (less overlap because spread decreases) spread decreases)

Example 10.23p603 #10.72-10.75