lecture 5: random variables and discrete probability...

25
Business Statistics Lecture 5: Random Variables and Discrete Probability Distributions

Upload: others

Post on 09-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

Business Statistics

Lecture 5: Random Variables and Discrete Probability Distributions

Page 2: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

2

Agenda

Discrete probability distributions

random variables and probability distributions

expected value and variance (discrete random variable)

some specific discrete probability distributions: binomial distribution and Poisson distribution

Page 3: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

3

Random variables

Random experiment:

a process that produces an outcome

actual outcome is uncertain, but whose possible outcomes are known in advance

Random variable:

A variable whose numerical value is determined by the outcome of a random experiment.

Page 4: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

4

Discrete and continuous random variables

Random variables may be either discrete or continuous a random variable is discrete if it can assume only a finite or

countable number of values

a random variable is continuous if it can assume an uncountable (infinite) number of values

0 1 1/2 1/4 1/16 0 1 2 3 ...

Therefore, the number of values is countable

Therefore, the number of values is uncountable

After the first value is defined, the second value and any value thereafter are known

After the first value is defined, any number can be the next one

Page 5: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

5

Probability distribution A probability distribution is a distribution of the

probabilities associated with each of the values that a random variable can take

Each random variable has a probability mass function (discrete) or probability density function (PDF: continuous) associated with it, describing the probability distribution of the random variable

Page 6: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

Probability distributions

6

Continuous Probability Distributions

Binomial (이항)

Poisson

(포아송)

Probability Distributions

Discrete Probability Distributions

Normal

Exponential

Page 7: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

7

1)(.2

allfor1)(0 .1

al l

ix

i

ii

xp

xxp

A (discrete) probability distribution can be used to calculate probabilities of different events

e.g.,

4

3

4

1

2

1)2()1()21( XPXPXP

Requirements of discrete probability distr.

If a discrete random variable can take values xi, then the following must be true:

Page 8: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

8

Expected value and variance Researchers usually have an interest in specific

characteristics of the outcomes of a random variable, e.g. the average of all possible (future) outcomes

They can not calculate these characteristics, but they may form expectations about them

Two specific characteristics (parameters) of a random variable: expected value variance

Page 9: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

9

ix

ii xpxXEa l l

)()(

weighted average of the possible values of X, where the weights are the corresponding probabilities of each xi

interpretation: long-run average if random experiment is repeated a large number of times

Expected value – definition Expected value:

given a discrete random variable X with values xi, that occur with probabilities p(xi), the expected value of X is

Page 10: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

10

ix

ii xpxXEa l l

222)(

weighted average of the squared deviations of the possible values of X from the expected value , where the weights are the corresponding probabilities

Standard Deviation () is the square root of the variance (2)

Variance – definition Variance:

given a discrete random variable X with values xi, that occur with probabilities p(xi), and with expected value E(X) = , the variance V(X) = 2 of X is

2

al l

2222 )(

:ncalculatioShortcut

ix

ii xpxXE

Page 11: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

11

Discrete probability distributions

Following discrete probability distributions and their properties will hereafter be explained: Binomial distribution

Poisson distribution

Insight into random experiment determines appropriate probability function (e.g. the probability distribution for the tossing experiment)

Page 12: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

12

Binomial distribution

Used when interested in the number of favorite or successful outcomes in a series with a given number of repeated trials

Examples: number of defective items in a series of 200 produced number of ‘heads’ when flipping a coin 3 times number of even numbers when rolling a die 10 times

Page 13: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

13

Binomial distribution – Bernoulli experiment

Binomial (Bernoulli) experiment: a series of n independent trials with only two possible outcomes, and the same probability of ‘success’ (and ‘failure’)

there are n trials (n is finite and fixed)

all trials are independent

each trial results either in ‘success’ or in ‘failure’

the probability of success (p) is the same in all trials

Page 14: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

14

Binomial distribution – definition

A binomial random variable (X) counts the number of successful outcomes in a binomial (Bernoulli) experiment

Notation: X ~ Bin(n, p)

By definition X is a discrete random variable

By definition X has possible outcomes x = 0, 1, …, n

Page 15: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

15

1!0 and 1)1(! w ith

t)coefficien (binom ial )!(!

!where

nnn

xnx

nC n

x

Binomial distribution – expression

In general, the binomial probability is calculated by the following probability function:

1n xn x

xP X x p x C p p

Page 16: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

16

Binomial distribution – application

conditions required for a binomial experiment are met:

converter can be either defective (‘success’) or good (‘failure’)

there is a fixed number of trials (n = 3)

we assume that the converter state is independent on one another

the probability of a converter being defective does not change from converter to converter (p = .05)

Page 17: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

17

x P(X) 0 .8574 1 .1354 2 .0071 3 .0001

Binomial distribution – application

Solution (cont.): define a ‘success’ as ‘item is defective’

define X = number of defective items in sample

then X ~ Bin(n = 3, p = .05)

hence 0 3 0

1 3 1

2 3 2

3 3 3

3!( 0) (0) (.05) (.95) .8574

0!(3 0)!

3!( 1) (1) (.05) (.95) .1354

1!(3 1)!

3!( 2) (2) (.05) (.95) .0071

2!(3 2)!

3!( 3) (3) (.05) (.95) .0001

3!(3 3)!

P X p

P X p

P X p

P X p

Page 18: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

18

Mean and variance of a binomial rand. var.

)1()( a n d )( 2 pn pXVn pXE

If X ~ Bin(n, p), then the mean and variance of X are found as

Page 19: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

19

Poisson distribution

Used when interested in the number of occurrences in an interval (e.g., a fixed amount of time or within a specified region)

Examples:

number of customers entering a shop per hour

number of defects in a production process per hour

Page 20: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

20

Poisson distribution – experiment

Properties of the Poisson experiment:

the number of successes (events) that occur in any interval is independent of the number of successes that occur in any other interval

the probability that a success will occur in an interval

is the same for all intervals of equal size

varies with the size of the interval [the average number of successes is proportional to the size of the interval]

Page 21: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

21

Poisson distribution – definition

A random variable (X) counts the number of successes that occur during a given interval (of time, length, area, etc.) in a Poisson experiment

Notation: X ~ Poisson(), where is the average number of successes in this interval

By definition X is a discrete random variable

By definition X has possible outcomes x = 0, 1, …

Page 22: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

22

( ) 0,1,2,!

xeP X x p x x

x

Poisson distribution – expression

According to the Poisson probability distribution, the probability of x occurrences in an interval is:

If X ~ Poisson(), then both the mean and the variance of X are:

where is the mean number of occurrences in that interval & the value of e = 2.71828…, the base of the natural logarithm

) ( and ) ( X V X E

Page 23: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

23

1 2 11

2 (2) .18392! 2

e eP X p

Poisson distribution – calculation

0

0.1

0.2

0.3

0.4

1 2 3 4 5 6 7 8 9 10 11 0 1 2 3 4 5

Poisson probability function with = 1:

1 0

110 (0) .3679

0!

eP X p e

Page 24: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

24

Example Example

cars arrive at a tollbooth at a rate of 360 cars per hour

what is the probability that exactly two cars will arrive during a specified one-minute period? (use formula)

Solution: let X denote the number of arrivals per one-

minute period the mean number of arrivals per minute is µ =

360/60 = 6 cars it follows that X ~ Poisson(6)

Page 25: Lecture 5: Random Variables and Discrete Probability Distributionscontents.kocw.net/KOCW/document/2013/kyunghee/jungsunho/... · 2016. 9. 9. · Each random variable has a probability

25

6 26

2 (2) .04462!

eP X p

Cont’d

Example (cont.):

since X ~ Poisson(6) the desired probability can be found as

follows