Distributions Marc H. Mehlman marcmehlman@yahoo.com University of - - PowerPoint PPT Presentation

distributions
SMART_READER_LITE
LIVE PREVIEW

Distributions Marc H. Mehlman marcmehlman@yahoo.com University of - - PowerPoint PPT Presentation

Distributions Marc H. Mehlman marcmehlman@yahoo.com University of New Haven Marc Mehlman Marc Mehlman (University of New Haven) Distributions 1 / 49 Table of Contents Distributions 1 Discrete Random Variables 2 Common Discrete


slide-1
SLIDE 1

Marc Mehlman

Distributions

Marc H. Mehlman

marcmehlman@yahoo.com

University of New Haven

Marc Mehlman (University of New Haven) Distributions 1 / 49

slide-2
SLIDE 2

Marc Mehlman

Table of Contents

1

Distributions

2

Discrete Random Variables

3

Common Discrete Distributions Discrete Uniform, X ∼ DU(n) Binomial, X ∼ BIN(n, p) Geometric, X ∼ GEO(p)

4

Continuous Distributions

5

Common Continuous Distributions Uniform Distribution, UNIF(a, b) Normal Distribution, X ∼ N(µ, σ)

6

Sampling Distributions

7

Central Limit Theorem, CLT

8

Is it Normal?

9

Chapter #4 and #5 R Assignment

Marc Mehlman (University of New Haven) Distributions 2 / 49

slide-3
SLIDE 3

Marc Mehlman

Distributions

Distributions

Distributions

Marc Mehlman (University of New Haven) Distributions 3 / 49

slide-4
SLIDE 4

Marc Mehlman

Distributions

Definition Random Variable, r.v. X is a hypothetical outcome of an occurrence that

  • ccurs by chance. Example: X = # of heads after flipping a

fair coin 10 times. Probability Distribution is a graph, table or formula that gives the probability of each value of x coming from X. Discrete Random Variable a random variable with its values associated with a counting process. Continuous Random Variable a random variable with its values being associated with an interval.

Marc Mehlman (University of New Haven) Distributions 4 / 49

slide-5
SLIDE 5

Marc Mehlman

Distributions

Example X = Number of gas fill ups in July 2010 by CT car owners – discrete random variable. Example X = Number of kittens a house cat gives birth to – discrete random variable. Example X = High temp in Hartford on a July 16’s – continuous random variable. Example X = Time spent in line at DMV – continuous random variable.

Marc Mehlman (University of New Haven) Distributions 5 / 49

slide-6
SLIDE 6

Marc Mehlman

Discrete Random Variables

Discrete Random Variables

Discrete Random Variables

Marc Mehlman (University of New Haven) Distributions 6 / 49

slide-7
SLIDE 7

Marc Mehlman

Discrete Random Variables

Definition Define P(x)

def

= P(X = x) = probability of X = x. P(x) is called the density function. A probability histogram is a relative frequency histogram where the vertical scale shows probabilities instead of relative frequences. Note: that 0 ≤ P(x) ≤ 1 and P(x) = 1. Example

Marc Mehlman (University of New Haven) Distributions 7 / 49

slide-8
SLIDE 8

Marc Mehlman

Discrete Random Variables

Expectations

Theorem (Expectation) Given a discrete random variable, X, µ =

  • xP(x),

σ2 =

  • (x − µ)2P(x) =
  • x2P(x)
  • − µ2

and σ = √ σ2. Notice: If all outcomes of X are equally likely, then summing over all outcomes, µ =

  • xP(X) =
  • x

1 N

  • P(x)

= 1 N

  • x.

Definition Unusual values of X lie within 2σ of µ c is an unusually high value of X ⇔ c ≥ µX + 2σX. c is an unusually low value of X ⇔ c ≤ µX − 2σX.

Marc Mehlman (University of New Haven) Distributions 8 / 49

slide-9
SLIDE 9

Marc Mehlman

Discrete Random Variables

Example Getting 9 or more heads when flipping a fair coin 10 times is unusual. We will soon see µ = 5 and σ =

  • 10(0.25)0.25 = 1.581. Since

5 + 2(1.581) < 9, one concludes that 9 is an unusually high value for flipping a fair coin ten times and counting how many heads one has. Note: If after making an assumption about the probability distribution of a random variable, one observes an unusual event, one should question

  • riginal assumption.

“The statistician says that “rare events do happen – but not to me!”” – Stuart Hunter

Marc Mehlman (University of New Haven) Distributions 9 / 49

slide-10
SLIDE 10

Marc Mehlman

Common Discrete Distributions

Common Discrete Distributions

Common Discrete Distributions

Marc Mehlman (University of New Haven) Distributions 10 / 49

slide-11
SLIDE 11

Marc Mehlman

Common Discrete Distributions Discrete Uniform, X ∼ DU(n)

Discrete Uniform, X ∼ DU(n)

Discrete Uniform, X ∼ DU(n) X = outcome of rolling a fair n–sided die. Theorem If X ∼ DU(n) and if j is a nonnegative integer between 1 and n inclusive P(j) =

  • 1

n

for j = 1, 2, · · · , n

  • therwise

. Furthermore µ = n + 1 n , σ2 = n2 − 1 12 and σ =

  • n2 − 1

12 .

Marc Mehlman (University of New Haven) Distributions 11 / 49

slide-12
SLIDE 12

Marc Mehlman

Common Discrete Distributions Binomial, X ∼ BIN(n, p)

Binomial, X ∼ BIN(n, p)

Bernoulli Distribution, X ∼ BIN(1, p) Model: X = # heads after tossing a coin once, that has a probability of heads on each toss equal to p. Binomial Distribution, X ∼ BIN(n, p) Model: X = # heads after tossing a coin n times, that has a probability of heads on each toss equal to p. Theorem If X ∼ BIN(n, p) and j is a nonnegative integer between 0 and n inclusive P(j) = P(X = j) =

  • n

j

  • pj(1 − p)n−j.

Furthermore µX = np, σ2

X = np(1 − p)

and σX =

  • np(1 − p).

Marc Mehlman (University of New Haven) Distributions 12 / 49

slide-13
SLIDE 13

Marc Mehlman

Common Discrete Distributions Binomial, X ∼ BIN(n, p)

Rational for P(j)

1 probability of getting H · · · H

j

T · · · T

n−j

is pj(1 − p)n−j.

2 # ways to get j heads is

n

j

  • .

So P(X = j) = P(1st way of getting j heads) = + P(2nd way of getting j heads) = + P( n

j

  • st way of getting j heads)

= pj(1 − p)n−j + pj(1 − p)n−j + · · · + pj(1 − p)n−j

  • (n

j)pj(1−p)n−j Marc Mehlman (University of New Haven) Distributions 13 / 49

slide-14
SLIDE 14

Marc Mehlman

Common Discrete Distributions Binomial, X ∼ BIN(n, p)

Example The probability of 3 heads when a coin with a probability of heads is 1/7 is flipped 10 times is P(3) = 10! 3!7! 1 7 3 6 7 4 = 0.1888425. One can also obtain P(3) by using a table (A-1 in book though 1/7 is not in book table) or using a computer (R-command is dbinom(j, n, p)). Furthermore, µ = 10 1 7

  • ,

σ2 = 10 1 7 6 7

  • = 60

49, σ =

  • 60

49 = √ 60 7 .

Marc Mehlman (University of New Haven) Distributions 14 / 49

slide-15
SLIDE 15

Marc Mehlman

Common Discrete Distributions Geometric, X ∼ GEO(p)

Geometric, X ∼ GEO(p)

Geometric, X ∼ GEO(p) X = # flips of a coin with probability of heads = p before getting a head. Theorem If X ∼ GEO(p) and j is a positive integer P(j) = p(1 − p)j−1 j = 1, 2, 3, · · · . Furthermore µ = 1 p, σ2 = 1 − p p2 and σ =

  • 1 − p

p2 .

Marc Mehlman (University of New Haven) Distributions 15 / 49

slide-16
SLIDE 16

Marc Mehlman

Common Discrete Distributions Geometric, X ∼ GEO(p)

Poisson, X ∼ POI(µ)

Poisson, X ∼ POI(µ) X = # defects in a unit length of freshly made wire, where average # of defects per unit length is µ. Define the constant e def = 2.71828182845904523536028747135266249775724709369995.... Theorem If X ∼ POI(µ) and j is a nonnegative integer P(j) = µje−µ j! for j = 0, 1, 2, 3, · · · . Furthermore µ = µ σ2 = µ and σ = √µ.

Marc Mehlman (University of New Haven) Distributions 16 / 49

slide-17
SLIDE 17

Marc Mehlman

Common Discrete Distributions Geometric, X ∼ GEO(p)

Example Let X = # times a year a light bulb needs to be replaced. Assume that on average, the number of times a light bulb has to be replaced is 2. Then X ∼ POI(2). Then µ = 2, σ2 = 2, σ = √ 2. Furthermore, P(3) = 23e−2

3!

= 0.1804470 (calculated using R–command, dpoi(3,2)).

Marc Mehlman (University of New Haven) Distributions 17 / 49

slide-18
SLIDE 18

Marc Mehlman

Continuous Distributions

Continuous Distributions

Continuous Distributions

Marc Mehlman (University of New Haven) Distributions 18 / 49

slide-19
SLIDE 19

Marc Mehlman

Continuous Distributions 40

A density curve is a curve that:

  • is always on or above the horizontal axis
  • has an area of exactly 1 underneath it

A density curve describes the overall pattern of a

  • distribution. The area under the curve and above any

range of values on the horizontal axis is the proportion

  • f all observations that fall in that range.

A density curve is a curve that:

  • is always on or above the horizontal axis
  • has an area of exactly 1 underneath it

A density curve describes the overall pattern of a

  • distribution. The area under the curve and above any

range of values on the horizontal axis is the proportion

  • f all observations that fall in that range.

Density Curves

Marc Mehlman (University of New Haven) Distributions 19 / 49

slide-20
SLIDE 20

Marc Mehlman

Common Continuous Distributions

Common Continuous Distributions

Common Continuous Distributions

Marc Mehlman (University of New Haven) Distributions 20 / 49

slide-21
SLIDE 21

Marc Mehlman

Common Continuous Distributions Uniform Distribution, UNIF(a, b)

Uniform Distribution, UNIF(a, b)

Uniform Distribution, UNIF(a, b) X = a value chosen randomly from [a, b]. Theorem If X ∼ UNIF(a, b) fX(x) =

  • 1

b−a

if a ≤ x ≤ b

  • therwise

. Furthermore µ = b − a 2 σ2 = (b − a)2 12 and σ =

  • (b − a)2

12 .

Marc Mehlman (University of New Haven) Distributions 21 / 49

slide-22
SLIDE 22

Marc Mehlman

Common Continuous Distributions Uniform Distribution, UNIF(a, b)

Example A ship runs aground somewhere between NYC and New Haven. The probability it ran aground at any point of the 100 mile coast is equal to another point. What is the probability it ran aground in Milford (17 miles

  • f coast)?

Answer:

17 100.

Marc Mehlman (University of New Haven) Distributions 22 / 49

slide-23
SLIDE 23

Marc Mehlman

Common Continuous Distributions Normal Distribution, X ∼ N(µ, σ)

43

One particularly important class of density curves are the Normal curves, which describe Normal distributions.

  • All Normal curves are symmetric, single-peaked, and bell-shaped.
  • A Specific Normal curve is described by giving its mean µ and

standard deviation σ.

Normal Distributions

Marc Mehlman (University of New Haven) Distributions 23 / 49

slide-24
SLIDE 24

Marc Mehlman

Common Continuous Distributions Normal Distribution, X ∼ N(µ, σ)

44

A Normal distribution is described by a Normal density curve. Any particular Normal distribution is completely specified by two numbers: its mean µ and standard deviation σ.

  • The mean of a Normal distribution is the center of the

symmetric Normal curve.

  • The standard deviation is the distance from the center to the

change-of-curvature points on either side.

  • We abbreviate the Normal distribution with mean µ and

standard deviation σ as N(µ,σ). A Normal distribution is described by a Normal density curve. Any particular Normal distribution is completely specified by two numbers: its mean µ and standard deviation σ.

  • The mean of a Normal distribution is the center of the

symmetric Normal curve.

  • The standard deviation is the distance from the center to the

change-of-curvature points on either side.

  • We abbreviate the Normal distribution with mean µ and

standard deviation σ as N(µ,σ).

Normal Distributions

Definition A continuous random variable, X, has a normal distribution, X ∼ N(µ, σ) if its density is f (x) = 1 √ 2πσ e−(x−µ)2/2σ2.

Marc Mehlman (University of New Haven) Distributions 24 / 49

slide-25
SLIDE 25

Marc Mehlman

Common Continuous Distributions Normal Distribution, X ∼ N(µ, σ)

45

The 68-95-99.7 Rule In the Normal distribution with mean µ and standard deviation σ:

  • Approximately 68% of the observations fall within σ of µ.
  • Approximately 95% of the observations fall within 2σ of µ.
  • Approximately 99.7% of the observations fall within 3σ of µ.

The 68-95-99.7 Rule In the Normal distribution with mean µ and standard deviation σ:

  • Approximately 68% of the observations fall within σ of µ.
  • Approximately 95% of the observations fall within 2σ of µ.
  • Approximately 99.7% of the observations fall within 3σ of µ.

The 68-95-99.7 Rule

Marc Mehlman (University of New Haven) Distributions 25 / 49

slide-26
SLIDE 26

Marc Mehlman

Common Continuous Distributions Normal Distribution, X ∼ N(µ, σ)

47

All Normal distributions are the same if we measure in units of size σ from the mean µ as center. If a variable x has a distribution with mean µ and standard deviation σ, then the standardized value of x, or its z-score, is If a variable x has a distribution with mean µ and standard deviation σ, then the standardized value of x, or its z-score, is

σ μ x z

  • =

The standard Normal distribution is the Normal distribution with mean 0 and standard deviation 1. That is, the standard Normal distribution is N(0,1). The standard Normal distribution is the Normal distribution with mean 0 and standard deviation 1. That is, the standard Normal distribution is N(0,1).

Standardizing Observations

Marc Mehlman (University of New Haven) Distributions 26 / 49

slide-27
SLIDE 27

Marc Mehlman

Common Continuous Distributions Normal Distribution, X ∼ N(µ, σ)

48

Because all Normal distributions are the same when we standardize, we can find areas under any Normal curve from a single table. The Standard Normal Table Table A is a table of areas under the standard Normal curve. The table entry for each value z is the area under the curve to the left

  • f z.

The Standard Normal Table Table A is a table of areas under the standard Normal curve. The table entry for each value z is the area under the curve to the left

  • f z.

The Standard Normal Table

Marc Mehlman (University of New Haven) Distributions 27 / 49

slide-28
SLIDE 28

Marc Mehlman

Common Continuous Distributions Normal Distribution, X ∼ N(µ, σ)

Example Given X ∼ N(5, 3), what is the probability 4 ≤ X ≤ 7? Solution: Using Table: P(4 ≤ X ≤ 7) = P 4 − 5 3 ≤ X − 5 3 ≤ 7 − 5 3

  • =

P (−0.33 ≤ Z ≤ 0.67) = P(Z ≤ 0.67) − P(Z ≤ −0.33) = 0.7486 − 0.3707 = 0.3779

  • r

> pnorm(7,5,3) - pnorm(4,5,3) [1] 0.3780661

Marc Mehlman (University of New Haven) Distributions 28 / 49

slide-29
SLIDE 29

Marc Mehlman

Common Continuous Distributions Normal Distribution, X ∼ N(µ, σ)

Example According to the National Health and Nutrition Examination Study 1976–1980, the heights (in inches) of adult men aged 18–24 are N(70, 2.8). What is the tallest a man aged 18–24 can be and still be in the bottom 10% of all such men of that height? Solution: Using Table: 0.1 = P(X ≤ x) = P X − 70 2.8 ≤ x − 70 2.8

  • = P
  • Z ≤ x − 70

2.8

  • .

Using reverse table lookup one has −1.28 = x − 70 2.8 ⇒ x = 66.416. Or, using R: > qnorm(0.1,70,2.8) [1] 66.41166

Marc Mehlman (University of New Haven) Distributions 29 / 49

slide-30
SLIDE 30

Marc Mehlman

Sampling Distributions

Sampling Distributions

Sampling Distributions

Marc Mehlman (University of New Haven) Distributions 30 / 49

slide-31
SLIDE 31

Marc Mehlman

Sampling Distributions

As we begin to use sample data to draw conclusions about a wider population, we must be clear about whether a number describes a sample or a population.

4

Parameters and Statistics

A parameter is a number that describes some characteristic of the

  • population. In statistical practice, the value of a parameter is not

known because we cannot examine the entire population. A statistic is a number that describes some characteristic of a

  • sample. The value of a statistic can be computed directly from the

sample data. We often use a statistic to estimate an unknown parameter. A parameter is a number that describes some characteristic of the

  • population. In statistical practice, the value of a parameter is not

known because we cannot examine the entire population. A statistic is a number that describes some characteristic of a

  • sample. The value of a statistic can be computed directly from the

sample data. We often use a statistic to estimate an unknown parameter.

Remember s and p: statistics come from samples and parameters come from populations. x We write µ (the Greek letter mu) for the population mean and σ for the population standard deviation. We write (x-bar) for the sample mean and s for the sample standard deviation.

Marc Mehlman (University of New Haven) Distributions 31 / 49

slide-32
SLIDE 32

Marc Mehlman

Sampling Distributions

5

Statistical Estimation

The process of statistical inference involves using information from a sample to draw conclusions about a wider population. Different random samples yield different statistics. We need to be able to describe the sampling distribution of possible statistic values in order to perform statistical inference. We can think of a statistic as a random variable because it takes numerical values that describe the outcomes of the random sampling process. Population Population Sample Sample Collect data from a representative Sample... Make an Inference about the Population.

Marc Mehlman (University of New Haven) Distributions 32 / 49

slide-33
SLIDE 33

Marc Mehlman

Sampling Distributions

6

Sampling Variability

Different random samples yield different statistics. This basic fact is called sampling variability: the value of a statistic varies in repeated random sampling. To make sense of sampling variability, we ask, “What would happen if we took many samples?” Population Population

Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Sample Marc Mehlman (University of New Haven) Distributions 33 / 49

slide-34
SLIDE 34

Marc Mehlman

Sampling Distributions

7

Sampling Distributions

The law of large numbers assures us that if we measure enough subjects, the statistic x-bar will eventually get very close to the unknown parameter µ. If we took every one of the possible samples of a certain size, calculated the sample mean for each, and graphed all of those values, we’d have a sampling distribution. The population distribution of a variable is the distribution of values of the variable among all individuals in the population. The sampling distribution of a statistic is the distribution of values taken by the statistic in all possible samples of the same size from the same population. The population distribution of a variable is the distribution of values of the variable among all individuals in the population. The sampling distribution of a statistic is the distribution of values taken by the statistic in all possible samples of the same size from the same population.

Marc Mehlman (University of New Haven) Distributions 34 / 49

slide-35
SLIDE 35

Marc Mehlman

Sampling Distributions

Mean of a sampling distribution of a sample mean There is no tendency for a sample mean to fall systematically above or below µ, even if the distribution of the raw data is skewed. Thus, the mean of the sampling distribution is an unbiased estimate of the population mean µ. Standard deviation of a sampling distribution of a sample mean The standard deviation of the sampling distribution measures how much the sample statistic varies from sample to sample. It is smaller than the standard deviation of the population by a factor of √n.  Averages are less variable than individual observations.

Mean and Standard Deviation of a Sample Mean

8

Marc Mehlman (University of New Haven) Distributions 35 / 49

slide-36
SLIDE 36

Marc Mehlman

Sampling Distributions

9

The Sampling Distribution of a Sample Mean

When we choose many SRSs from a population, the sampling distribution

  • f the sample mean is centered at the population mean µ and is less

spread out than the population distribution. Here are the facts. Note: These facts about the mean and standard deviation of x are true no matter what shape the population distribution has.

The Sampling Distribution of Sample Means The Sampling Distribution of Sample Means

The st andard deviation of the sampling distribution of x is σ x = σ n The mean of the sampling distribution of x is µx

= µ

Suppose that x is the mean of an SRS of size n drawn from a large population with mean µ and standard deviation σ. Then : If individual observations have the N(µ,σ) distribution, then the sample mean

  • f an SRS of size n has the N(µ, σ/√n) distribution regardless of the sample

size n. If individual observations have the N(µ,σ) distribution, then the sample mean

  • f an SRS of size n has the N(µ, σ/√n) distribution regardless of the sample

size n.

9

Marc Mehlman (University of New Haven) Distributions 36 / 49

slide-37
SLIDE 37

Marc Mehlman

Central Limit Theorem, CLT

Central Limit Theorem, CLT

Central Limit Theorem, CLT

“I know of scarcely anything so apt to impress the imagination as the wonderful form of cosmic order expressed by the “law of frequency of error” [the normal distribution]. The law would have been personified by the Greeks and deified, if they had known of it. It reigns with serenity and in complete self effacement amidst the wildest confusion. The huger the mob, and the greater the anarchy, the more perfect is its sway. It is the supreme law of Unreason.” – Francis Galton

Marc Mehlman (University of New Haven) Distributions 37 / 49

slide-38
SLIDE 38

Marc Mehlman

Central Limit Theorem, CLT

Central Limit Theorem

Given a normal random sample, the sampling distribution of ¯ X is depicted as:

1 with mean µ, ie unbiased. 2 with standard deviation σ/√n. 3 with normal distribution.

The first two depictions are always true, regardless of sample size or population distribution. The Central Limit Theorem (below) says the third depiction is approximately true, regardless of population distribution, for large sample sizes, n. As Francis Galton said, the averaged effects of random acts from a large mob form a familiar pattern.

Marc Mehlman (University of New Haven) Distributions 38 / 49

slide-39
SLIDE 39

Marc Mehlman

Central Limit Theorem, CLT

Central Limit Theorem

Theorem (Central Limit Theorem, CLT) Consider a random sample (not necessarily normal) of size n from a population with mean µ and standard deviation σ. For large n, the sampling distribution of ¯ X is approximately N

  • µ, σ/√n
  • .

Convention If n > 30 one assumes ¯ Xn ∼ N

  • µ, σ

√n

  • .

Facts:

1 If the Xj’s are normal then ¯

Xn is too.

2 µ ¯

Xn = µ.

3 σ ¯

Xn = σ √n.

Marc Mehlman (University of New Haven) Distributions 39 / 49

slide-40
SLIDE 40

Marc Mehlman

Central Limit Theorem, CLT

Any linear combination of independent Normal random variables is also Normally distributed. More generally, the central limit theorem notes that the distribution of a sum or average of many small random quantities is close to Normal. Finally, the central limit theorem also applies to discrete random variables.

A Few More Facts

12

Marc Mehlman (University of New Haven) Distributions 40 / 49

slide-41
SLIDE 41

Marc Mehlman

Central Limit Theorem, CLT

Central Limit Theorem

Example Let X = grams of blood a mosquito extracts with each bite. Assume the average amount of blood lost per bite is 0.5 with a standard devation of 0.5. If a caribou suffers 1,000 bites in a week, what is the approx probability that she will lose not more than 470 grams of blood? Solution: Let Xj = grams of blood lost from the jth bite and consider the random sample, X1, · · · , X1,000. CLT ⇒ P  

1,000

  • j=1

Xj ≤ 470   = P ¯ X1,000 ≤ 0.47

  • = P

¯ X1,000 − 0.5 0.5/√1, 000 ≤ 0.47 − 0.5 0.5/√1, 000 = −1.90

  • ≈ P[Z ≤ −1.90]

= Φ(−1.90) = 0.0287.

Marc Mehlman (University of New Haven) Distributions 41 / 49

slide-42
SLIDE 42

Marc Mehlman

Central Limit Theorem, CLT

Central Limit Theorem

If X1, · · · , Xn is a random sample from BIN(1, p) then Y def =

n

  • j=1

Xj ∼ BIN(n, p). Thus ¯ Xn = 1

n

n

j=1 Xj = 1 nY is approximately normal for large n

⇒ Y ∼ BIN(n, p) is approximately normal for large n. Convention If Y ∼ BIN(n, p) and if np ≥ 5 and n(1 − p) ≥ 5 then Y is approximately N(np,

  • np(1 − p)).

Marc Mehlman (University of New Haven) Distributions 42 / 49

slide-43
SLIDE 43

Marc Mehlman

Central Limit Theorem, CLT

Example (without continuity correction) Untreated Varicella (chickenpox) in newborns results in probability of death equal to 0.3. What is the probability that a village with 100 newborns with chickenpox has 25 or fewer deaths? Solution: Let Xj = # number of deaths (0 or 1) for the jth newborn ∼ BIN(1, 0.3). Let Y

def

=

100

  • j=1

Xj = # of deaths ∼ BIN(100, 0.3). Since 100(0.3) ≥ 5 and 100(0.7) ≥ 5 the above convention (CLT) says P(Y ≤ 25) = P

  • Y − 100(0.3)
  • 100(0.3)(0.7)

≤ 25 − 100(0.3)

  • 100(0.3)(0.7)
  • ≈ Φ

−5 √ 21

  • = 0.1376168.

Real answer is

25

  • j=0
  • 100

j

  • (0.3)j(0.7)100−j = 0.1631301,

differs too much from the approximate answer (over 15%).

Marc Mehlman (University of New Haven) Distributions 43 / 49

slide-44
SLIDE 44

Marc Mehlman

Central Limit Theorem, CLT

Continuity Correction Let X ∼ BIN(n, p) and let j, k be integers such that 0 ≤ j ≤ k ≤ n. Then it is common practice to use the following approximation, P [j ≤ X ≤ k] ≈ Φ

  • k + 0.5 − np
  • np(1 − p)
  • − Φ
  • j − 0.5 − np
  • np(1 − p)
  • (1)

when np ≥ 5 and n(1 − p) ≥ 5. Example (Previous Example with continuity correction) P[Y ≤ 25] ≈ Φ

  • 25.5 − 30
  • 100(0.3)(0.7)
  • = Φ
  • − 4.5

√ 21

  • = 0.1630547,

which is much closer to 0.1631301 than the cruder answer obtained in the previous Example. Note: All integer discrete distributions have a continuity correction.

Marc Mehlman (University of New Haven) Distributions 44 / 49

slide-45
SLIDE 45

Marc Mehlman

Is it Normal?

Is it Normal?

Is it Normal?

Marc Mehlman (University of New Haven) Distributions 45 / 49

slide-46
SLIDE 46

Marc Mehlman

Is it Normal?

One way to assess if a distribution is indeed approximately normal is to plot the data on a normal quantile plot. The data points are ranked and the percentile ranks are converted to z- scores with Table A. The z-scores are then used for the x axis against which the data are plotted on the y axis of the normal quantile plot.

  • If the distribution is indeed normal the plot will show a straight

line, indicating a good match between the data and a normal distribution.

  • Systematic deviations from a straight line indicate a non-normal
  • distribution. Outliers appear as points that are far away from the
  • verall pattern of the plot.

55

Normal Quantile Plots

Marc Mehlman (University of New Haven) Distributions 46 / 49

slide-47
SLIDE 47

Marc Mehlman

Is it Normal?

R commands: > dat=rnorm(500,4,3) > qqnorm(dat); qqline(dat, col="red") > qqnorm(trees$Girth); qqline(trees$Girth, col="red")

  • −3

−2 −1 1 2 3 −5 5 10

Normal Q−Q Plot

Theoretical Quantiles Sample Quantiles

  • ● ● ● ● ● ● ● ●
  • ● ● ●
  • −2

−1 1 2 8 10 12 14 16 18 20

Normal Q−Q Plot

Theoretical Quantiles Sample Quantiles

Marc Mehlman (University of New Haven) Distributions 47 / 49

slide-48
SLIDE 48

Marc Mehlman

Chapter #4 and #5 R Assignment

Chapter #4 and #5 R Assignment

Chapter #4 and #5 R Assignment

Marc Mehlman (University of New Haven) Distributions 48 / 49

slide-49
SLIDE 49

Marc Mehlman

Chapter #4 and #5 R Assignment 1 Create a Normal Quantile Plot of the height of loblolly trees from the

dataset “Loblolly” and decide if the distribution of the heights came from a normal distribution.

Marc Mehlman (University of New Haven) Distributions 49 / 49