+ All Categories
Home > Documents > Last Time

Last Time

Date post: 30-Jan-2016
Category:
Upload: linus
View: 225 times
Download: 0 times
Share this document with a friend
Description:
Last Time. Histograms Binomial Probability Distributions Lists of Numbers Real Data Excel Computation Notions of Center Average of list of numbers Weighted Average. Administrative Matters. Midterm I, coming Tuesday, Feb. 24 Excel notation to avoid actual calculation - PowerPoint PPT Presentation
Popular Tags:
156
Last Time • Histograms – Binomial Probability Distributions – Lists of Numbers – Real Data – Excel Computation • Notions of Center – Average of list of numbers – Weighted Average
Transcript
Page 1: Last Time

Last Time

• Histograms– Binomial Probability Distributions– Lists of Numbers– Real Data– Excel Computation

• Notions of Center– Average of list of numbers– Weighted Average

Page 2: Last Time

Administrative Matters

Midterm I, coming Tuesday, Feb. 24

• Excel notation to avoid actual calculation– So no computers or calculators

• Bring sheet of formulas, etc.

• No blue books needed

(will just write on my printed version)

Page 3: Last Time

Administrative Matters

Midterm I, coming Tuesday, Feb. 24

• Material Covered:

HW 1 – HW 5

– Note: due Thursday, Feb. 19– Will ask grader to return Mon. Feb. 23– Can pickup in my office (Hanes 352)– So this weeks HW not included

Page 4: Last Time

Administrative Matters

Midterm I, coming Tuesday, Feb. 24

• Extra Office Hours:– Monday, Feb. 23 8:00 – 9:00– Monday, Feb. 23 9:00 – 10:00– Monday, Feb. 23 10:00 – 11:00– Tuesday, Feb. 24 8:00 – 9:00– Tuesday, Feb. 24 9:00 – 10:00– Tuesday, Feb. 24 1:00 – 2:00

Page 5: Last Time

Administrative Matters

Midterm I, coming Tuesday, Feb. 24

• How to study:– Rework HW problems

• Since problems come from there• Actually do, not “just look over”• In random order (as on exam)• Print HW sheets, use as a checklist

– Work Practice Exam• Posted in Blackboard “Course Information” Area

Page 6: Last Time

Reading In Textbook

Approximate Reading for Today’s Material:

Pages 277-282, 34-43

Approximate Reading for Next Class:

Pages 55-68, 319-326

Page 7: Last Time

Big Picture

• Margin of Error

• Choose Sample Size

Need better prob tools

Start with visualizing probability distributions

Page 8: Last Time

Big Picture

• Margin of Error

• Choose Sample Size

Need better prob tools

Start with visualizing probability distributions,

Next exploit constant shape property of Bi

Page 9: Last Time

Big Picture

Start with visualizing probability distributions,

Next exploit constant shape property of Binom’l

Page 10: Last Time

Big Picture

Start with visualizing probability distributions,

Next exploit constant shape property of Binom’l

Centerpoint feels p

Page 11: Last Time

Big Picture

Start with visualizing probability distributions,

Next exploit constant shape property of Binom’l

Centerpoint feels p Spread feels n

Page 12: Last Time

Big Picture

Start with visualizing probability distributions,

Next exploit constant shape property of Binom’l

Centerpoint feels p Spread feels n

Now quantify these ideas, to put them to work

Page 13: Last Time

Notions of Center

Will later study “notions of spread”

Page 14: Last Time

Notions of Center

Textbook: Sections 4.4 and 1.2

Recall parallel development:

(a) Probability Distributions

(b) Lists of Numbers

Study 1st, since easier

Page 15: Last Time

Notions of Center

(b) Lists of Numbers

“Average” or “Mean” of x1, x2, …, xn

Mean = =

common

notation

xn

xn

ii

1

Page 16: Last Time

Notions of Center

Generalization of Mean:

“Weighted Average”

Intuition: Corresponds to finding balance

point of weights on number line

1x 2x 3x

Page 17: Last Time

Notions of Center

Generalization of Mean:

“Weighted Average”

Intuition: Corresponds to finding balance

point of weights on number line

1x 2x 3x

Page 18: Last Time

Notions of Center

Textbook: Sections 4.4 and 1.2

Recall parallel development:

(a) Probability Distributions

(b) Lists of Numbers

Page 19: Last Time

Notions of Center

(a) Probability distributions, f(x)

Approach: use connection to lists of numbers

Page 20: Last Time

Notions of Center

(a) Probability distributions, f(x)

Approach: use connection to lists of numbers

Recall: think about many repeated

draws

Page 21: Last Time

Notions of Center

(a) Probability distributions, f(x)

Approach: use connection to lists of numbers

Draw X1, X2, …, Xn from f(x)

Page 22: Last Time

Notions of Center

(a) Probability distributions, f(x)

Approach: use connection to lists of numbers

Draw X1, X2, …, Xn from f(x)

Compute and express in terms of f(x)X

Page 23: Last Time

Notions of Center

n

XXX n

1

Page 24: Last Time

Notions of Center

n

XXX n1

n

XX ii 22#11#

Rearrange list, depending on values

Page 25: Last Time

Notions of Center

n

XXX n1

n

XX ii 22#11#

Number of Xis that are 1

Page 26: Last Time

Notions of Center

n

XXX n1

n

XX ii 22#11#

Apply Distributive Law of Arithmetic

2

2#1

1#

n

X

n

X ii

Page 27: Last Time

Notions of Center

n

XXX n1

n

XX ii 22#11#

Recall “Empirical Probability Function”

2

2#1

1#

n

X

n

X ii

22ˆ11ˆ ff

Page 28: Last Time

Notions of Center

n

XXX n1

22ˆ11ˆ ff

Page 29: Last Time

Notions of Center

n

XXX n1

22ˆ11ˆ ff

2211 ii XPXP

Frequentist approximation

Page 30: Last Time

Notions of Center

n

XXX n1

22ˆ11ˆ ff

2211 ii XPXP

2211 ff

Page 31: Last Time

Notions of Center

n

XXX n1

22ˆ11ˆ ff

2211 ii XPXP

A weighted average of values that X takes on

2211 ff

Page 32: Last Time

Notions of Center

n

XXX n1

22ˆ11ˆ ff

2211 ii XPXP

A weighted average of values that X takes on, where weights are probabilities

2211 ff

Page 33: Last Time

Notions of Center

n

XXX n1

A weighted average of values that X takes on, where weights are probabilities

2211 ff

This concept deserves its own name:Expected Value

Page 34: Last Time

Expected Value

Define Expected Value of a random variable X:

Page 35: Last Time

Expected Value

Define Expected Value of a random variable X:

xfxEXx

Page 36: Last Time

Expected Value

Define Expected Value of a random variable X:

Useful shorthand notation

xfxEXx

Page 37: Last Time

Expected Value

Define Expected Value of a random variable X:

Recall f(x) = 0, for most x, so sum

only operates for values X takes

on

xfxEXx

Page 38: Last Time

Expected Value

E.g. Roll a die, bet (as before):

Page 39: Last Time

Expected Value

E.g. Roll a die, bet (as before):

Win $9 if 5 or 6, Pay $4, if 1, 2 or 3, otherwise

(4) break even

Page 40: Last Time

Expected Value

E.g. Roll a die, bet (as before):

Win $9 if 5 or 6, Pay $4, if 1, 2 or 3, otherwise

(4) break even

Let X = “net winnings”

Page 41: Last Time

Expected Value

E.g. Roll a die, bet (as before):

Win $9 if 5 or 6, Pay $4, if 1, 2 or 3, otherwise

(4) break even

Let X = “net winnings”

otherwise

x

x

x

xf

0

0

4

9

)(61

21

31

Page 42: Last Time

Expected Value

E.g. Roll a die, bet (as before):

Win $9 if 5 or 6, Pay $4, if 1, 2 or 3, otherwise

(4) break even

Let X = “net winnings”

Are you keen to play?

otherwise

x

x

x

xf

0

0

4

9

)(61

21

31

Page 43: Last Time

Expected Value

Let X = “net winnings”

otherwise

x

x

x

xf

0

0

4

9

)(61

21

31

Page 44: Last Time

Expected Value

Let X = “net winnings”

Weighted average, wts & values

otherwise

x

x

x

xf

0

0

4

9

)(61

21

31

x

xfxEX )(

Page 45: Last Time

Expected Value

Let X = “net winnings”

Weighted average, wts & values

otherwise

x

x

x

xf

0

0

4

9

)(61

21

31

6121

31 0)4(9)( x

xfxEX

Page 46: Last Time

Expected Value

Let X = “net winnings”

i.e. weight average of values 9, -4 & 0, with

weights of “how often expect”, thus “expected”

otherwise

x

x

x

xf

0

0

4

9

)(61

21

31

10)4(9)( 61

21

31 x

xfxEX

Page 47: Last Time

Expected Value

Let X = “net winnings”

Conclusion: on average in many plays, expect

to win $1 per play.

otherwise

x

x

x

xf

0

0

4

9

)(61

21

31

10)4(9)( 61

21

31 x

xfxEX

Page 48: Last Time

Expected Value

Caution: “Expected value” is not what is

expected on one play

(which is either 9, -4 or 0)

But instead on average, over many plays

HW: 4.73, 4.74 (1.9, 1)

Page 49: Last Time

Expected Value

Real life applications of expected value:

• Decision Theory

– Operations Research

– Rational basis for making business decisions

– In presence of uncertainty

– Common Goal: maximize expected profits

– Gives good average results over long run

Page 50: Last Time

Expected Value

Real life applications of expected value:

• Decision Theory

• Casino Gambling

– Casino offers games with + expected value

(+ from their perspective)

– Their goal: good overall average performance

– Expected Value is a useful tool for this

Page 51: Last Time

Expected Value

Real life applications of expected value:

• Decision Theory

• Casino Gambling

• Insurance

– Companies make profit

– By writing policies with + expected value

– Their goal is long run average performance

Page 52: Last Time

Expected Value

Real life applications of expected value:

• Decision Theory

• Casino Gambling

• Insurance

• State Lotteries

– State’s view: games with + expected value

– Raise money for state in long run overall

Page 53: Last Time

Flip Side of Expected Value

Decisions made against expected value:

Page 54: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

– Why do people play?

Page 55: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

– Why do people play?

– Odds are against them

– For sure will lose “over long run”

Page 56: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

– Why do people play?

– Odds are against them

– For sure will lose “over long run”

– But love of short run successes, can make

eventual long term loss worthwhile

– Are buying entertainment

Page 57: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

• Insurance

– Why should you buy it?

Page 58: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

• Insurance

– Why should you buy it?

– You lose in expected value sense

Page 59: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

• Insurance

– Why should you buy it?

– You lose in expected value sense

– But E not applicable since you only play once

– Avoids chance of catastrophic loss

– Allows low cost sharing of risk

Page 60: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

• Insurance

• State Lotteries

– Why do people play?

Page 61: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

• Insurance

• State Lotteries

– Why do people play?

– Clear loss in expected value

Page 62: Last Time

Flip Side of Expected Value

Decisions made against expected value:

• Casino Gambling

• Insurance

• State Lotteries

– Why do people play?

– Clear loss in expected value

– But only play once (hopefull), so not applicable

– Worth feeling of hope from buying ticket?

Page 63: Last Time

Flip Side of Expected Value

Interesting issues about State Lotteries:

A very different type of tax

Big Plus:

• Only totally voluntary tax

Big Minus:

• Tax paid mostly by poor

Page 64: Last Time

Flip Side of Expected Value

Decisions made against expected value:

Key Lesson: Expected Value tells what

happens on average over long run,

not in one play

Page 65: Last Time

Flip Side of Expected Value

Decisions made against expected value:

Key Lesson: Expected Value tells what

happens on average over long run,

not in one play

Conclude Expected Value not good for

everything, but very good for many things

Page 66: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

Page 67: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

e.g. you owe mafia $5000 (gambling debt?),

clean out safe at work for $5000.

Page 68: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

e.g. you owe mafia $5000 (gambling debt?),

clean out safe at work for $5000.

If give to mafia, you go to jail

Page 69: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

e.g. you owe mafia $5000 (gambling debt?),

clean out safe at work for $5000.

If give to mafia, you go to jail, so decide to

raise another $5000 by gambling.

Page 70: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Page 71: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Can really do this, e.g. bet on Red in game of

Roulette at a casino

Page 72: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Important question:

Make one large bet? Or many small bets?

Something in between?

Page 73: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Make one large bet? Or many small bets?

E[Gain] = 0 x P[loss] + $2 x P[win]

= 0 x (0.52) + $2 x (0.48) =

$0.96

Page 74: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Make one large bet? Or many small bets?

E[Gain] = $0.96

Interpretation: “expect” to lose $0.04 every

time you play

Page 75: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Make one large bet? Or many small bets?

E[Gain] = $0.96

Interpretation: “expect” to lose $0.04 every

time you play

Why games are so profitable for casinos

Page 76: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Make one large bet? Or many small bets?

E[Gain] = $0.96

Interpretation: “expect” to lose $0.04 every

time you play

Many plays Expected Value dictates result

Page 77: Last Time

Another Inverse View of Expected Value

Suppose you have $5000, and need $10,000

and can make even bets, with P[win] = 0.48

Make one large bet? Or many small bets?

E[Gain] = $0.96

Interpretation: “expect” to lose $0.04 every

time you play

So best to make just one large bet!

Page 78: Last Time

Another Inverse View of Expected Value

Interpretation: “expect” to lose $0.04 every

time you play

So best to make just one large bet!

Page 79: Last Time

Another Inverse View of Expected Value

Interpretation: “expect” to lose $0.04 every

time you play

So best to make just one large bet!

After many plays, will surely lose!

(lesson of expected value)

Page 80: Last Time

Another Inverse View of Expected Value

Another View:

Strategy P[win $1,0000]

one $5000 bet 0.48 ≈ ½

Page 81: Last Time

Another Inverse View of Expected Value

Another View:

Strategy P[win $1,0000]

one $5000 bet 0.48 ≈ ½

two $2500 bets ≈ (0.48)2 ≈ ¼

Page 82: Last Time

Another Inverse View of Expected Value

Another View:

Strategy P[win $1,0000]

one $5000 bet 0.48 ≈ ½

two $2500 bets ≈ (0.48)2 ≈ ¼

four $1250 bets ≈ 1/16

Page 83: Last Time

Another Inverse View of Expected Value

Another View:

Strategy P[win $1,0000]

one $5000 bet 0.48 ≈ ½

two $2500 bets ≈ (0.48)2 ≈ ¼

four $1250 bets ≈ 1/16

many bets no chance

Page 84: Last Time

Another Inverse View of Expected Value

Interpretation: “expect” to lose $0.04 every

time you play

So best to make just one large bet!

Casino Folklore: Sometimes people really

make such bets

Page 85: Last Time

Expected Value

Binomial Expected Value:

For X ~ Bi(n,p),

Page 86: Last Time

Expected Value

Binomial Expected Value:

For X ~ Bi(n,p), Expected Value is

probability weighted average of values

x

xfxEX )(

Page 87: Last Time

Expected Value

Binomial Expected Value:

For X ~ Bi(n,p), Expected Value is

Use Binomial Probability Distribution

x

xnx

xpp

x

nxxfxEX 1)(

Page 88: Last Time

Expected Value

Binomial Expected Value:

For X ~ Bi(n,p), Expected Value is

After a long and tricky calculation

(details beyond scope of this course)

x

xnx

xpp

x

nxxfxEX 1)(

pn

Page 89: Last Time

Expected Value

For X ~ Bi(n,p),

• Makes sense:

“Expect” to win proportion p, of n trials

pnEX

Page 90: Last Time

Expected Value

For X ~ Bi(n,p),

• Makes sense:

“Expect” to win proportion p, of n trials

• Just use this formula from here on out

pnEX

Page 91: Last Time

Expected Value

For X ~ Bi(n,p),

• Makes sense:

“Expect” to win proportion p, of n trials

• Just use this formula from here on out

• E.g. to capture “shifting mean”

pnEX

Page 92: Last Time

Expected Value

For X ~ Bi(n,p),

HW:

5.28a, mean part only (900)

5.29a, mean part only

pnEX

Page 93: Last Time

Properties of Expected Value

Linearity:

For X ~ f(x) and Y ~ g(y)

E(aX + bY) =

Page 94: Last Time

Properties of Expected Value

Linearity:

For X ~ f(x) and Y ~ g(y)

E(aX + bY) = Σx Σy (ax + by) f(x) g(y)

Weighted average, where

weights

are probabilities

Page 95: Last Time

Properties of Expected Value

Linearity:

For X ~ f(x) and Y ~ g(y)

E(aX + bY) = Σx Σy (ax + by) f(x) g(y) =

= Σx Σy (ax f(x) g(y) + by f(x)

g(y))

(Distributive Rule)

Page 96: Last Time

Properties of Expected Value

Linearity:

For X ~ f(x) and Y ~ g(y)

E(aX + bY) = Σx Σy (ax + by) f(x) g(y) =

= Σx Σy (ax f(x) g(y) + by f(x) g(y)) =

= Σx Σy axf(x)g(y) + Σx Σy axf(x)g(y)

(Associative Property of Addition)

Page 97: Last Time

Properties of Expected Value

Linearity:

For X ~ f(x) and Y ~ g(y)

E(aX + bY) = Σx Σy (ax + by) f(x) g(y) =

= Σx Σy (ax f(x) g(y) + by f(x) g(y)) =

= Σx Σy axf(x)g(y) + Σx Σy axf(x)g(y) =

= (Σxaxf(x)) Σyg(y) + (Σxf(x)) Σybyg(y)

(Distributive Rule)

Page 98: Last Time

Properties of Expected Value

Linearity: For X ~ f(x) and Y ~ g(y)

E(aX + bY) =

= (Σxaxf(x)) Σyg(y) + (Σxf(x)) Σybyg(y)

Page 99: Last Time

Properties of Expected Value

Linearity: For X ~ f(x) and Y ~ g(y)

E(aX + bY) =

= (Σxaxf(x)) Σyg(y) + (Σxf(x)) Σybyg(y) =

= Σx a x f(x) + Σy b y g(y)

(Since Σx f(x) = Σy y g(y) = 1)

Page 100: Last Time

Properties of Expected Value

Linearity: For X ~ f(x) and Y ~ g(y)

E(aX + bY) =

= (Σxaxf(x)) Σyg(y) + (Σxf(x)) Σybyg(y) =

= Σx a x f(x) + Σy b y g(y) =

= a Σx x f(x) + b Σy y g(y)

(Distributive Rule)

Page 101: Last Time

Properties of Expected Value

Linearity: For X ~ f(x) and Y ~ g(y)

E(aX + bY) =

= (Σxaxf(x)) Σyg(y) + (Σxf(x)) Σybyg(y) =

= Σx a x f(x) + Σy b y g(y) =

= a Σx x f(x) + b Σy y g(y) =

= a E(X) + b E(Y)

Page 102: Last Time

Properties of Expected Value

Linearity: For X ~ f(x) and Y ~ g(y)

E(aX + bY) = a E(X) + b E(Y)

i.e. E(linear combo) = linear combo (E)

Page 103: Last Time

Properties of Expected Value

HW:

4.81 (mean part only)

4.84 (mean part only)

Page 104: Last Time

Properties of Expected Value

HW: C18 An insurance company sells 1378

policies to cover bicycles against theft for 1

year. It costs $300 to replace a stolen

bicycle and the probability of theft is

estimated at 0.08. Suppose there is no

chance of more than one theft per

individual.

Page 105: Last Time

Properties of Expected Value

HW: C18 (cont.)

a. Calculate the expected payout for each

policy, to give a break even price for each

policy. ($24)

b. If 2 times the break even price is actually

charged, what is the company’s expected

profit per policy, if the theft rate is actually

0.10? ($18)

Page 106: Last Time

Research Corner

Recall Hidalgo Recall Hidalgo

StampData &StampData &

Movie over binwidthMovie over binwidth

Page 107: Last Time

Research Corner

Recall Hidalgo Recall Hidalgo

StampData &StampData &

Movie over binwidthMovie over binwidth

Main point:Main point:

Binwidth drives Binwidth drives

histogram performancehistogram performance

Page 108: Last Time

Research Corner

Less known fact:Less known fact:

Bin Bin locationlocation also has also has

Serious effectSerious effect

(even for fixed width)(even for fixed width)

Page 109: Last Time

Research Corner

How many bumps?How many bumps?

~2?~2?

Page 110: Last Time

Research Corner

How many bumps?How many bumps?

~3?~3?

Page 111: Last Time

Research Corner

How many bumps?How many bumps?

~7?~7?

Page 112: Last Time

Research Corner

How many bumps?How many bumps?

~7?~7?

Page 113: Last Time

Research Corner

Explanation?Explanation?

Compare with “smoothedCompare with “smoothed

version” called version” called

““Kernel Density Estimate”Kernel Density Estimate”

Page 114: Last Time

Research Corner

Compare with “smoothedCompare with “smoothed

version” called version” called

““Kernel Density Estimate”Kernel Density Estimate”

Peaks appear:Peaks appear:

when when entirely in entirely in a bina bin

Page 115: Last Time

Research Corner

Compare with “smoothedCompare with “smoothed

version” called version” called

““Kernel Density Estimate”Kernel Density Estimate”

Peaks disappear:Peaks disappear:

when split betweenwhen split between

two bins bintwo bins bin

Page 116: Last Time

Research Corner

Question: If understand problem with Question: If understand problem with histogram, using histogram, using Kernel Density EstimateKernel Density Estimate

Then why not use Then why not use KDEKDE for data analysis? for data analysis?

Will explore Will explore KDEKDE later. later.

Page 117: Last Time

Notions of Center

Caution about mean:

Works well for ~symmetric distributions

Page 118: Last Time

Notions of Center

Caution about mean:

Works well for ~symmetric distributions

E.g. Buffalo Snowfalls

Page 119: Last Time

Notions of Center

Caution about mean:

Works well for ~symmetric distributions

E.g. Buffalo Snowfalls

Analyzed in:http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg6.xls

Page 120: Last Time

Notions of Center

Caution about mean:

Works well for ~symmetric distributions

E.g. Buffalo Snowfalls

Mean = 80.3

(from Excel)

Page 121: Last Time

Notions of Center

Caution about mean:

Works well for ~symmetric distributions

E.g. Buffalo Snowfalls

Mean = 80.3

(from Excel)

Page 122: Last Time

Notions of Center

Caution about mean:

Works well for ~symmetric distributions

E.g. Buffalo Snowfalls

Mean = 80.3

Visually sensible

Notion of “Center”

Page 123: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

Page 124: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Page 125: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

• Time (in days) to suicide attempt

• Of Suicide Patients

• After Initial Treatment

Page 126: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Analyzed in:http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg6.xls

Page 127: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Page 128: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Clearly not mound shaped

Page 129: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Clearly not mound shaped

Very asymmetric

Page 130: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Clearly not mound shaped

Very asymmetric

Called “right skewed”

Page 131: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Mean = 122.3

Page 132: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Mean = 122.3

Page 133: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Mean = 122.3

Sensible as “center”??

Page 134: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Mean = 122.3

Sensible as “center”??

%(data ≥) = 30.2%

Page 135: Last Time

Notions of Center

Caution about mean:

But poorly for asymmetric distributions

E.g. British Suicides Data

Mean = 122.3

Sensible as “center”??

%(data ≥) = 30.2%

Too Small…

Page 136: Last Time

Notions of Center

Perhaps better notion of “center”:

• Take center to be point in middle

• I.e. have 50% of data smaller

• And 50% of data larger

This is called the “median”

Page 137: Last Time

Notions of Center

Median: = Value in middle (of sorted list)

Page 138: Last Time

Notions of CenterMedian: = Value in middle (of sorted list)

Unsorted E.g: Sorted E.g:

3 0

1 1

27 2

2 3

0 27

Page 139: Last Time

Notions of CenterMedian: = Value in middle (of sorted list)

Unsorted E.g: Sorted E.g:

3 0

1 1

27 2

2 3

0 27

One in middle???

Page 140: Last Time

Notions of CenterMedian: = Value in middle (of sorted list)

Unsorted E.g: Sorted E.g:

3 0

1 1

27 2

2 3

0 27

One in middle??? NO, must sort

Page 141: Last Time

Notions of CenterMedian: = Value in middle (of sorted list)

Unsorted E.g: Sorted E.g:

3 0

1 1

27 2

2 3

0 27

Sensible version of “middle”

Page 142: Last Time

Notions of CenterWhat about ties?

Sorted E.g:

0

1

2

3

Page 143: Last Time

Notions of CenterWhat about ties?

Sorted E.g:

0

Tie for point in 1

middle 2

3

Page 144: Last Time

Notions of CenterWhat about ties?

Sorted E.g:

0

Tie for point in 1

middle 2

3

Break by taking average (of two tied values):

Page 145: Last Time

Notions of CenterWhat about ties?

Sorted E.g:

0

Tie for point in 1

middle 2

3

Break by taking average (of two tied values):

e.g. Median = 1.5

Page 146: Last Time

Notions of CenterMedian: = Value in middle (of sorted list)

Unsorted E.g: Sorted E.g:

3 0

1 1

27 2

2 3

0 27

EXCEL: use function “MEDIAN”

Page 147: Last Time

Notions of CenterEXCEL: use function “MEDIAN”

Very similar to other functions

E.g. see:http://www.stat-or.unc.edu/webspace/courses/marron/UNCstor155-2009/ClassNotes/Stor155Eg6.xls

Page 148: Last Time

Notions of Center

E.g. Buffalo Snowfalls

Mean = 80.3

Page 149: Last Time

Notions of Center

E.g. Buffalo Snowfalls

Mean = 80.3

Median = 79.6

(from Excel)

Page 150: Last Time

Notions of Center

E.g. Buffalo Snowfalls

Mean = 80.3

Median = 79.6

Very similar

Page 151: Last Time

Notions of Center

E.g. Buffalo Snowfalls

Mean = 80.3

Median = 79.6

Very similar

(expected from

symmetry)

Page 152: Last Time

Notions of Center

E.g. British Suicides Data

Mean = 122.3

Median = 77.5

Substantially different

Page 153: Last Time

Notions of Center

E.g. British Suicides Data

Mean = 122.3

Median = 77.5

Substantially different

Page 154: Last Time

Notions of Center

E.g. British Suicides Data

Mean = 122.3

Median = 77.5

Substantially different

But which is better?

Page 155: Last Time

Notions of Center

E.g. British Suicides Data

Mean = 122.3

Median = 77.5

Substantially different

But which is better?

Goal 1: ½ - ½ middle

Page 156: Last Time

Notions of Center

E.g. British Suicides Data

Mean = 122.3

Median = 77.5

Substantially different

But which is better?

Goal 1: ½ - ½ middle

Goal 2: long run average


Recommended