confidence intervals with means. what is the purpose of a confidence interval? to estimate an...

30
Confidence Intervals with Means

Upload: lisa-edwina-hunt

Post on 28-Dec-2015

254 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Confidence Intervals with

Means

Page 2: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

What is the purpose of a confidence interval?

To estimate an unknown To estimate an unknown population parameterpopulation parameter

Page 3: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Formula:Formula:

nzx

* :Interval Confidence

statistic

Critical value

Standard deviation of statistic

Margin of errorMargin of error

Page 4: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

In a randomized comparative experiment on the effects of calcium on blood pressure, researchers divided 54 healthy, white males at random into two groups, taking calcium or placebo. The paper reports a mean seated systolic blood pressure of 114.9 with standard deviation of 9.3 for the placebo group. Assume systolic blood pressure is normally distributed.

Can you find a z-interval for this problem? Can you find a z-interval for this problem? Why or why not?Why or why not?

Page 5: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Student’s t- distributionStudent’s t- distribution

• Continuous distribution

• Unimodal, symmetrical, bell-shaped density curve

• Above the horizontal axis

• Area under the curve equals 1

• Based on degrees of freedomdf = n - 1df = n - 1

Page 6: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Formula:Formula:

n

stx * :Interval Confidence

statistic

Critical value

Standard deviation of statistic

Margin of errorMargin of error

Standard error – when you

substitute s for .

Page 7: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

How to find How to find tt**

• Use Table B for t distributions• Look up confidence level at bottom &

df on the sides• df = n – 1

Find these t*90% confidence when n = 595% confidence when n = 15

t* = 2.132

t* = 2.145

Can also use invT on the calculator!

Need upper t* value with 5% is above – so 95% is below

invT(p,df)

Page 8: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Steps for doing a confidence Steps for doing a confidence interval:interval:1) Assumptions –

2) Calculate the interval

3) Write a statement about the interval in the context of the problem.

Page 9: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Statement: Statement: (memorize!!)(memorize!!)

We are ________% confident that the true mean context is between ______ and ______.

Page 10: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Assumptions for Assumptions for tt-inference-inference

• Have an SRS from population (or randomly assigned treatments)

• unknown

• Normal (or approx. normal) distribution– Given– Large sample size– Check graph of data

Use only one of these methods to check normality

Page 11: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Ex. 1) Find a 95% confidence interval for the true mean systolic blood pressure of the placebo group.

Assumptions:

• Have randomly assigned males to treatment

• Systolic blood pressure is normally distributed (given).

• is unknown

We are 95% confident that the true mean systolic blood pressure is between 111.22 and 118.58.

)58.118,22.111(273.9

056.29.114

Page 12: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Find a sample size:Find a sample size:

n

zm

*

• If a certain margin of error is wanted, then to find the sample size necessary for that margin of error use:

Always round up to the nearest person!

Page 13: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Ex 4) The heights of PWSH male students is normally distributed with = 2.5 inches. How large a sample is necessary to be accurate within + .75 inches with a 95% confidence interval?

n = 43

Page 14: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Hypothesis TestsHypothesis Tests

One Sample Means

Page 15: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

A government agency has received numerous complaints that a particular restaurant has been selling underweight hamburgers. The restaurant advertises that it’s patties are “a quarter pound” (4 ounces).

How can I tell if they really are underweight?

Take a sample & find x.

But how do I know if this x is one that I expectexpect to happen or is it one

that is unlikelyunlikely to happen?

A hypothesis test will allow me to

decide if the claim is true or not!

Page 16: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Steps for doing a hypothesis test

1) Assumptions

2) Write hypotheses & define parameter

3) Calculate the test statistic & p-value

4) Write a statement in the context of the problem.

H0: = 12 vs Ha: (<, >, or ≠) 12

“Since the p-value < (>) , I reject (fail to reject) the H0. There is (is not) sufficient evidence to suggest that Ha (in context).”

Page 17: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Formulas:

unknown:

statistic of deviation standard

parameter - statisticstatistic test

t =

x

ns

Page 18: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Calculating p-values• For z-test statistic –

– Use normalcdf(lb,rb) – [using standard normal curve]

• For t-test statistic –– Use tcdf(lb, rb, df)

Page 19: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Draw & shade a curve & calculate the p-value:1) right-tail test t = 1.6; n = 20

2) two-tail test t = 2.3; n = 25

P-value = .0630

P-value = (.0152)2 = .0304

Page 20: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Example 1: Bottles of a popular cola are supposed to contain 300 mL of cola. There is some variation from bottle to bottle. An inspector, who suspects that the bottler is under-filling, measures the contents of six randomly selected bottles. Is there sufficient evidence that the bottler is under-filling the bottles? Use = .1

299.4 297.7 298.9 300.2 297 301

Page 21: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

• I have an SRS of bottles•Since the boxplot is approximately symmetrical with no outliers, the sampling distribution is approximately normally distributed• is unknown

SRS?

576.1

6503.1

30003.299

t p-value =.0880 = .1

Normal?How do

you know?

H0: = 300 where is the true mean amount

Ha: < 300 of cola in bottles

What are your hypothesis

statements? Is there a key word?

Plug values into formula.

Do you know ?

Since p-value < , I reject the null hypothesis.There is sufficient evidence to suggest that the true mean cola in the bottles is less than 300 mL.

Compare your p-value to & make decision

Write conclusion in context in terms of Ha.

Page 22: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Matched Pairs Test

A special type of t-inference

Page 23: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Matched Pairs – two forms

• Pair individuals by certain characteristics

• Randomly select treatment for individual A

• Individual B is assigned to other treatment

• Assignment of B is dependent on assignment of A

• Individual persons or items receive both treatments

• Order of treatments are randomly assigned before & after measurements are taken

• The two measures are dependent on the individual

Page 24: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Is this an example of matched pairs?

1)A college wants to see if there’s a difference in time it took last year’s class to find a job after graduation and the time it took the class from five years ago to find work after graduation. Researchers take a random sample from both classes and measure the number of days between graduation and first day of employmentNo, there is no pairing of individuals, you have two independent samples

Page 25: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Is this an example of matched pairs?

2) In a taste test, a researcher asks people in a random sample to taste a certain brand of spring water and rate it. Another random sample of people is asked to taste a different brand of water and rate it. The researcher wants to compare these samples

No, there is no pairing of individuals, you have two independent samples – If you would have the same people taste both brands in random order, then it would be an example of matched pairs.

Page 26: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Is this an example of matched pairs?

3) A pharmaceutical company wants to test its new weight-loss drug. Before giving the drug to a random sample, company researchers take a weight measurement on each person. After a month of using the drug, each person’s weight is measured again.

Yes, you have two measurements that are dependent on each individual.

Page 27: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

A whale-watching company noticed that many customers wanted to know whether it was better to book an excursion in the morning or the afternoon. To test this question, the company collected the following data on 15 randomly selected days over the past month. (Note: days were not consecutive.)

Day 1 2 3 4 5 6 7 8 9 1011

12

13

14

15

Morning 8 9 7 9

10

13

10 8 2 5 7 7 6 8 7

After-noon 8 10 9 8 9

11

8 10 4 7 8 9 6 6 9First, you must find the differences for

each day.

Since you have two values for each day, they are dependent on the day – making this data

matched pairs

You may subtract either way – just be careful

when writing Ha

Page 28: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Morning 8 9 7 9 10 13 10 8 2 5 7 7 6 8 7After-noon 8 10 9 8 9 11 8 10 4 7 8 9 6 6 9

Differences 0 -1 -2 1 1 2 2 -2 -2 -2 -1 -2 0 2 -2

Assumptions:

• Have an SRS of days for whale-watching

• unknown

•Since the normal probability plot is approximately linear, the distribution of difference is approximately normal.

I subtracted:Morning – afternoon

You could subtract the other way!

You need to state assumptions using the differences!

Notice the granularity in this plot, it is still displays a nice linear relationship!

Page 29: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

Differences 0 -1 -2 1 1 2 2 -2 -2 -2 -1 -2 0 2 -2

Is there sufficient evidence that more whales are sighted in the afternoon?

Be careful writing your Ha!Think about how you

subtracted: M-AIf afternoon is more should the differences be + or -?

Don’t look at numbers!!!!

H0: D = 0

Ha: D < 0

Where D is the true mean difference in whale sightings from morning minus afternoon

Notice we used D for differences& it equals 0 since the null should be that there is NO

difference.

If you subtract afternoon –

morning; then Ha: D>0

Page 30: Confidence Intervals with Means. What is the purpose of a confidence interval? To estimate an unknown population parameter

finishing the hypothesis test:

Since p-value > , I fail to reject H0. There is insufficient evidence to suggest that more whales are sighted in the afternoon than in the morning.

05.14

1803.

945.

15639.1

04.

df

p

nsx

t Notice that if you subtracted A-M, then your test statistic

t = + .945, but p-value would be the same

In your calculator, perform a t-test

using the differences (L3)

Differences 0 -1 -2 1 1 2 2 -2 -2 -2 -1 -2 0 2 -2

How could I increase the power of this

test?