inference as 91582. every time you over-indulge, your life shortens – expert 11:40 am wednesday...

29
Inference AS 91582

Upload: heidi-full

Post on 15-Dec-2015

219 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Inference

AS 91582

Page 2: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Every time you over-indulge, your life shortens – expert

• 11:40 AM Wednesday Dec 19, 2012

• http://www.nzherald.co.nz/lifestyle/news/article.cfm?c_id=6&objectid=10855064

Page 3: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Every time you over-indulge, your life shortens - expert

• It's the season for eating, drinking and being merry, but experts warn that every time you over-indulge you could be cutting hours off your life.

• A new report, published in the British Medical Journal, claims activities like having a couple of drinks, smoking, eating red meat and sitting in front of the TV can cut at least 30 minutes off a person's life for every day that do it.

Page 4: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

• On the flip side, sticking to one alcoholic beverage, eating plenty of fruit and vegetables and working up a sweat can add a couple of hours on to your life, Medical Daily reports.

• Professor David Spiegelhalter, a statistician from the University of Cambridge, figured out the impact of different activities on a person's lifespan by using a concept of accelerated or decelerated ageing.

Page 5: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

• Prof Spiegelhalter hopes expressing activities in microlives like this will help people make better lifestyle decisions.

• "Each day of smoking 20 cigarettes is as if you are rushing towards your death," he said.

Page 6: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

"Of course, evaluation studies would be needed to quantify any effect on behaviour, but one does not need a study to conclude that people do not generally like the idea of getting older faster.”

Page 7: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Maximise your chance of living to 100 – Tails you win: the science of chance

www.magsmaths.com

Page 8: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Meet the Doozers

• www.magsmaths.com

Page 9: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Height distribution of Doozers at Fraggle Rock

• The mean height of Doozers at Fraggle Rock is 150mm with a standard deviation of 5mm

Page 10: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Height distribution of Doozers at Fraggle Rock

• The mean height of Doozers at Fraggle Rock is 150mm with a standard deviation of 5mm

• Sketch a possible height distribution of Doozers at Fraggle Rock. Remember to give an indication of scale.

Page 11: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Height distribution of the population of Doozers at Fraggle Rock

Page 12: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Problem

I would like to get an estimate of the mean height of Doozers in Fraggle Rock.

Page 13: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Bootstrapping

Outline of the method:

• Re-sample with replacement from our original sample.

• Create a re-sample that is the same size as our original random sample

• Calculate the mean (or statistic of interest) for the re-sample

Page 14: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012
Page 15: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012
Page 16: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

INZight

Bootstrapping using iNZight

Page 17: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

iNZight

• Start iNZight and select the Sampling Variation VIT module (or select FILE and VIT modules).

• Import the Doozer height population file.• Drag “Height” down to the variable 1 box, and then

click the Analyse tab. • The default quantity is mean. Do NOT change this.

Change Sample Size to 10, then click on Record my choices.

• Play. Check you know what each selection does, and how it relates to sampling from the population.

Page 18: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

1000 samples of size 10 from the entire population.

Page 19: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

We can see that samples of size 10 form a Normal Distribution as the population was Normally Distributed.

Page 20: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Bootstrap Intervals

• Using iNZight to create a bootstrap confidence interval• Start iNZight and select the Bootstrap Confidence Interval

Construction VIT module.• Import the Doozer sample session 1 file.• Drag Height down to the variable 1 box, and then click the

Analyse tab. • The default quantity is “mean”. Do NOT change this, just click

on “Record my choices”• Play, and replicate what you have just done by hand. Check you

know what each selection does.• To finish, copy and paste the Bootstrap distribution of re-sample

means into a word document.

Page 21: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Distribution from the sample

Page 22: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

iNZight

• Start iNZight and select the Confidence interval coverage VIT module (or select FILE and VIT modules).

• Import the Doozer height population file.• Drag “Height” down to the variable 1 box, and then

click the Analyse tab. • The default quantity is mean. Do NOT change this.

Change the CI Method to bootstrap: percentile and the Sample Size to 10, then click on Record my choices.

• Play. Check you know what each selection does, and how it relates to the bootstrap confidence intervals.

Page 23: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

How well does the method work

We can use iNZight to check how well the Bootstrap method works, by repeating the process many times taking different random samples from a known population.

Page 24: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Key Points

The distribution of re-sample means (the bootstrap distribution) is similar to the distribution of means from repeated random sampling.Therefore we can use the bootstrap distribution to model the sampling variability in our data, and base our confidence interval on this bootstrap distribution.

Page 25: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

NOTE

The method doesn’t rely on having a Normal distribution and it works for small numbers.

Page 26: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

Confidence Interval coverage

Page 27: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

• Increasing the sample size – what’s the impact on our confidence intervals?

• We will use the Doozer height data to investigate this. Each file contains 10 different random samples from the population of Doozers at Fraggle Rock.

Page 28: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012
Page 29: Inference AS 91582. Every time you over-indulge, your life shortens – expert 11:40 AM Wednesday Dec 19, 2012

• What seems to happen to the widths of the bootstrap confidence intervals when you increase the sample size?

Consider the following:• How much does the width change? • How could you describe the change? • Can you describe how the width is related to

the number of Doozers in the samples?