chapter 8 the shape of data: probability distributions

25
Chapter 8 The shape of data: probability distributions

Upload: jocelyn-brooks

Post on 26-Mar-2015

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 8 The shape of data: probability distributions

Chapter 8The shape of data: probability distributions

Page 2: Chapter 8 The shape of data: probability distributions

2

The Binomial Distribution

Is a discrete probability distribution and is appropriate when:

• A variable can only take on one of two values

• The probability of the two outcomes are constant from trial to trail

• Successive events are independent

Page 3: Chapter 8 The shape of data: probability distributions

3

Binomial formula

The formula for the binomial distribution is

Where nCr =

n is the number of trials and r is the number of successes

rnr

r

n PPCrP )1()(

r)!-(nr!n!

Page 4: Chapter 8 The shape of data: probability distributions

4

Example

The probability that an invoice will be returned because of an error is 0.1. If there are 20 invoices what is the probability that

(a) exactly 2 invoices will be returned

(b) at least 2 invoices will be returned

Page 5: Chapter 8 The shape of data: probability distributions

5

(a) Probability of exactly two invoices in error

20C2 =

= 190

P(r = 2) = .12.918

= 0.285

)!220(!2!20

Page 6: Chapter 8 The shape of data: probability distributions

6

(b) Probability of at least two invoices will be returned

P(r > 2) = 1 – [P(r = 0) + P(r = 1) + P(r = 2)]P(r = 0) = 1 .10 .920

= 0.1216P(r = 1) = 20 .11 .919

= 0.2702P(r > 2) = 1 – (.1216 +.2702 +.285)

= 0.6768

Page 7: Chapter 8 The shape of data: probability distributions

7

Mean and standard deviation of the binomial distribution

• The mean of a binomial distribution is np.

• The standard deviation is given by the formula: )1( pnp

Page 8: Chapter 8 The shape of data: probability distributions

8

The Poisson Distribution

• Another discrete probability distribution • It is good at modelling events that occur at

random (e.g. arrivals at a supermarket checkout).

• The formula is:

• Where r is the number of events occurring in a given unit (of time or length etc.) and m is the mean number of events in the same unit and e is the constant 2.7182818…

!)(

rme

rPrm

Page 9: Chapter 8 The shape of data: probability distributions

9

Example

Visitors to a museum arrive at random with a mean of 2.5 per minute. What is the probability that there will be

(a) No visitors in a one minute interval?

(b) Less than 2 visitors in a 2 minute interval?

Page 10: Chapter 8 The shape of data: probability distributions

10

(a) No visitors in 1 minuteP(0) =

= 0.0821(b) Less than 2 visitors in 2 minutesm = 2 2.5 = 5.0P(r<2) = P(0) + P(1)P(0) = e-5 = 0.0067P(1) = 0.0067 5= 0.0337

!05.2 05.2 e

Page 11: Chapter 8 The shape of data: probability distributions

11

Mean and standard deviation of a Poisson distribution

The mean is m and the variance is equal to the mean. So the standard deviation, which is the square root of the variance is equal to the square root of the mean. In symbols this becomes:

m

Page 12: Chapter 8 The shape of data: probability distributions

12

Using the Poisson distribution as an approximation to the binomial

distribution

1. The number of trials, n, is large (greater than 30).

2. The probability of a success, p, is small (less than 0.1).

3. The mean number of successes, n p, is less than 5.

Page 13: Chapter 8 The shape of data: probability distributions

The Normal Distribution

Page 14: Chapter 8 The shape of data: probability distributions

14

Number of loaves baked

0

10

20

30

40

20 21 22 23 24 25 26 27 28

NUMBER LOAVES BAKED

FREQUENCY

Is a discrete probability distribution

Page 15: Chapter 8 The shape of data: probability distributions

15

Weight of a loaf

0

40

80

120

160

200

780 790 800 810 820 830

WEIGHT (g)

FREQUENCY

770

Is a continuous probability distribution

Page 16: Chapter 8 The shape of data: probability distributions

16

Shape of the normal distribution

meanmedianmode

Page 17: Chapter 8 The shape of data: probability distributions

17

The standard normal distribution

Z

0 1 2 3-1-2-3

= 1

Has a mean of 0 and a standard deviation of 1

Page 18: Chapter 8 The shape of data: probability distributions

18

The normal tables

Tables are used to solve normal distribution problems

Page 19: Chapter 8 The shape of data: probability distributions

19

Area between Z of 1 and -1

P(Z>1) = 0.1587

P(Z<-1) = 0.1587

P(-1<Z<1) = 1 – 2 x 0.1587

= 0.6826

Or about 68%

Page 20: Chapter 8 The shape of data: probability distributions

20

Z value if upper tail is 5%

5% represents a probability of 0.05

Using tables in reverse we find that a Z value of 1.64 gives a probability of 0.0505 and a Z value of 1.65 gives a probability of 0.0495

Taking an average gives us 1.645

Page 21: Chapter 8 The shape of data: probability distributions

21

Example

The weight of a standard loaf is normally distributed with a mean of 800g and a standard deviation of 10g.

 1. Find the proportion of loaves that weigh

more than 815 g 2. The baker wishes to ensure that no more

than 5% of loaves are less than a certain weight. What is this weight?

Page 22: Chapter 8 The shape of data: probability distributions

22

Solution 1

800g 815g

Proportion ofloaves weighing

more than 815g

Page 23: Chapter 8 The shape of data: probability distributions

23

Need to find the value of Z corresponding to an ‘x’ of 815

Z = 815-800 = 1.5

10

P(Z>1.5) = 0.0668

Or 6.68%

6.68% of loaves will weigh more than 815g

Page 24: Chapter 8 The shape of data: probability distributions

24

Solution 2

5%

X 800

Page 25: Chapter 8 The shape of data: probability distributions

25

What is the Z value corresponding to the lower 5%?Same as upper 5% but negative i.e –1.645-1.645 = x-800

10-1.645 x 10 = x –800x = 800-16.45

=783.6gSo no more than 5% of loaves will weigh less than 783.6g