The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma...

24
The Gamma and Normal Distributions 3.2, 3.3

Transcript of The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma...

Page 1: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

The Gamma and NormalDistributions

3.2, 3.3

Page 2: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

The Gamma DistributionConsider a Poisson process with rate ๐œ†๐œ†:Let a random variable, ๐‘‹๐‘‹, denote the waiting time until the ๐›ผ๐›ผth occurrence.

๐‘‹๐‘‹ follows a Gamma Distribution.

2

Page 3: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

The Gamma Function, ฮ“

3When n is an integer,

This is the definition of the gamma function

Page 4: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Gamma Distribution X~Gamma(๐›ผ๐›ผ,๐œƒ๐œƒ)

๐‘“๐‘“ ๐‘ฅ๐‘ฅ = 1ฮ“(๐›ผ๐›ผ)๐œƒ๐œƒ๐›ผ๐›ผ

๐‘ฅ๐‘ฅ๐›ผ๐›ผโˆ’1๐‘’๐‘’โˆ’๐‘ฅ๐‘ฅ/๐œƒ๐œƒ, 0 โ‰ค x < โˆž

๐ธ๐ธ[๐‘‹๐‘‹] = ๐›ผ๐›ผ๐œƒ๐œƒ

๐‘‰๐‘‰๐‘‰๐‘‰๐‘‰๐‘‰[๐‘‹๐‘‹] = ๐›ผ๐›ผ๐œƒ๐œƒ2

4

Page 5: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Gamma ExampleCustomers arrive in a shop according to a Poisson process with a mean rate of 20 per hour. What is the probability that the shopkeeper will have to wait more than 10 minutes for the arrival of the 4th customer?

๏ฟฝ10

โˆž1

ฮ“ 4 34๐‘ฅ๐‘ฅ4โˆ’1๐‘’๐‘’โˆ’๐‘ฅ๐‘ฅ/3 ๐‘‘๐‘‘๐‘ฅ๐‘ฅ = 0.57

5

Page 6: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Gamma ExampleCustomers arrive in a shop according to a Poisson process with a mean rate of 20 per hour. What is the probability that the shopkeeper will have to wait more than 10 minutes for the arrival of the 4th customer?

๏ฟฝ10

โˆž1

ฮ“ 4 34๐‘ฅ๐‘ฅ4โˆ’1๐‘’๐‘’โˆ’๐‘ฅ๐‘ฅ/3 ๐‘‘๐‘‘๐‘ฅ๐‘ฅ = 0.57

6

Page 7: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Normal Distribution

Page 8: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Normal Distributionโ–ซ Most important distribution in statisticsโ–ซ Fits many natural phenomena such as IQ,

measurement error, height, etc.โ–ซ A symmetric distribution with a central peak, and tails

that taper off.

8

Page 9: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Normal Distribution โ€“ Empirical Rule

9

In a normal distribution, approximately 68/95/99.7% of the data falls within 1/2/3 standard deviations of the mean.

Page 10: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Normal Distribution X~N(๐œ‡๐œ‡,๐œŽ๐œŽ2)

๐‘“๐‘“(๐‘ฅ๐‘ฅ) = 12๐œ‹๐œ‹๐œŽ๐œŽ2

๐‘’๐‘’โˆ’(๐‘ฅ๐‘ฅโˆ’๐œ‡๐œ‡)2

2๐œŽ๐œŽ2 , -โˆž < ๐‘ฅ๐‘ฅ < โˆž

๐ธ๐ธ[๐‘‹๐‘‹] = ๐œ‡๐œ‡

๐‘‰๐‘‰๐‘‰๐‘‰๐‘‰๐‘‰[๐‘‹๐‘‹] = ๐œŽ๐œŽ2

10

Page 11: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Normal DistributionLet X ~ Normal(๐œ‡๐œ‡,๐œŽ๐œŽ2)โ–ซ To find the P[a < X < b], one would need to evaluate

the integral:

๏ฟฝ๐‘Ž๐‘Ž

๐‘๐‘1

2๐œ‹๐œ‹๐œŽ๐œŽ2๐‘’๐‘’โˆ’

(๐‘ฅ๐‘ฅโˆ’๐œ‡๐œ‡)22๐œŽ๐œŽ2 ๐‘‘๐‘‘๐‘ฅ๐‘ฅ.

โ–ซ A closed-form expression for this integral does not exist, so we need to use numerical integration techniques.

11

Page 12: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Notes about the Normal DistributionThe Normal Distribution is symmetric with a central peak:

โ–ซ P[X > c] = P[X < -c]โ–ซ Mean = Median = Modeโ–ซ Half of the area is to the left/right of 0.

Examples: if ๐‘‹๐‘‹ ~ ๐‘๐‘(0,1)โ–ซ ๐‘ƒ๐‘ƒ[๐‘‹๐‘‹ โ‰ค 0.2] = 0.5 + ๐‘ƒ๐‘ƒ[0 โ‰ค ๐‘‹๐‘‹ โ‰ค 0.2]โ–ซ ๐‘ƒ๐‘ƒ[๐‘‹๐‘‹ โ‰ค 0.3] = ๐‘ƒ๐‘ƒ[๐‘‹๐‘‹ โ‰ฅ 0.7]

12

Page 13: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

ExamplesLet ๐‘๐‘ ~ ๐‘๐‘(0,1)

a) Find P[Z >2] (0.0228)b) Find P[ -2 < Z < 2] (0.9544)c) Find P[0 < Z < 1.73] (0.4582)

13

Page 14: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

14

Page 15: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Linear Transformation TheoremLet X โˆผ N(ยต, ฯƒ2). Then Y = ฮฑX + ฮฒ follows also a normal distribution.

๐‘Œ๐‘Œ โˆผ ๐‘๐‘(ฮฑยต+ฮฒ, ฮฑ2ฯƒ2) Can convert any normal distribution to standard normal by subtracting mean and dividing sd:

โ–ซ Z = ๐‘‹๐‘‹โˆ’๐œ‡๐œ‡๐œŽ๐œŽ

Using this theorem, we can see that ๐‘๐‘ ~ ๐‘๐‘(0,1)

15(Recall) Let ๐‘‹๐‘‹ have mean, ๐ธ๐ธ[๐‘‹๐‘‹], and variance, ๐œŽ๐œŽ2.Let Y = ๐‘‰๐‘‰๐‘‹๐‘‹ + ๐‘๐‘. Then, ๐‘Œ๐‘Œ has mean ๐‘‰๐‘‰๐ธ๐ธ[๐‘‹๐‘‹] + ๐‘๐‘, and variance ๐‘‰๐‘‰2๐œŽ๐œŽ2.

Page 16: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Example

Suppose the mass of Thorโ€™s hammers in kg (he has an infinite number) are distributed X โˆผ N(10, 32). Find the proportion of Thorโ€™s hammers that have mass larger than 13.4 kg. (if we randomly select a hammer, find the probability that its mass > 13.4 kg).

ans. P[X > 13.4] = P[Z > 1.13] = 0.129216

Page 17: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

What is z?โ–ซ The value of z gives the number of standard

deviations the particular value of X lies above or below the mean ยต.

17

Page 18: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

Examples

Normal Distribution

Page 19: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

1 Cream and Fluttr knows that the daily demand for cupcakes is a random variable which follows the normal distribution with mean 43.3 cupcakes and standard deviation 4.6. They would like to make enough so that there is only a 5% chance of demand exceeding the number of cupcakes made. (How many should they make?)

z=1.645 x = 5119

Page 20: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

20

Page 21: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

21

Page 22: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

2 Suppose again that Thorโ€™s hammers are normally distributed with: E[X] = 10, Var[X] = 9.

Find the 25th percentile of X. (How much mass should a hammer have, in order to have more than 25% of all hammers)

Ans. z = -0.675 ๐œ‹๐œ‹0.25 = 7.975 22

Page 23: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

3 Stapletonโ€™s Auto Park of Urbana believes that total sales for next month will follow the normal distribution, with mean, ๐œ‡๐œ‡, and a standard deviation, ๐œŽ๐œŽ= $300,000. What is the probability that Stapletonโ€™s sales will fall within $150000 of the mean next month?

Ans. 0.6915 โˆ’ 0.3085 = .38323

Page 24: The Gamma and Normal DistributionsThe Gamma and Normal Distributions. 3.2, 3.3. The Gamma Distribution. Consider a Poisson process with rate ๐œ†๐œ†: Let a random variable, ๐‘‹๐‘‹,

24