7-1 Random Variables and Discrete probability Distributions Chapter 7.

Post on 20-Dec-2015

242 views 0 download

Transcript of 7-1 Random Variables and Discrete probability Distributions Chapter 7.

7-1

Random Variables and Discrete probability Distributions

Random Variables and Discrete probability Distributions

Chapter 7

7-22007會計資訊系統計學 ( 一 )上課投影片

Random Variables A random variable(隨機變數) is a function or

rule that assigns a number to each outcome of an experiment.

Alternatively, the value of a random variable is a numerical event.

A random variable reflects the aspect of a random experiment that is of interest for us.

Instead of talking about the coin flipping event as {heads, tails} think of it as

“the number of heads when flipping a coin” {1, 0} (numerical events)

7-32007會計資訊系統計學 ( 一 )上課投影片

Two Types of Random Variables There are two types of random variables:

Discrete random variable Continuous random variable.

Discrete Random Variable(間斷、離散型隨機變數)– one that takes on a countable number of values– E.g. values on the roll of dice: 2, 3, 4, …, 12

Continuous Random Variable (連續型隨機變數)– one whose values are not discrete, not countable– E.g. time (30.1 minutes? 30.10000001 minutes?)

Analogy: Integers are Discrete, while Real Numbers are Continuous

7-42007會計資訊系統計學 ( 一 )上課投影片

A random variable is discrete if it can assume a countable(可數) number of values.

A random variable is continuous if it can assume an uncountable (不可數) number of values.

0 11/21/41/16

Continuous random variableAfter the first value is definedthe second value, and any valuethereafter are known.

Therefore, the number of values is countable

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

Discrete random variable

Therefore, the number of values is uncountable

0 1 2 3 ...

Two Types of Random Variables

7-52007會計資訊系統計學 ( 一 )上課投影片

Probability Distributions A probability distribution(機率分配) is a

table, formula, or graph that describes the values of a random variable and the probability associated with these values.

Since we’re describing a random variable (which can be discrete or continuous) we have two types of probability distributions:– Discrete Probability Distribution, (this chapter) and– Continuous Probability Distribution (Chapter 8)

7-62007會計資訊系統計學 ( 一 )上課投影片

Probability Notation An upper-case letter will represent the name of the

random variable, usually X.

Its lower-case counterpart will represent the value of the random variable.

The probability that the random variable X will equal x is: P(X = x)

or more simply P(x)

7-72007會計資訊系統計學 ( 一 )上課投影片

A table, formula, or graph that lists all possible values a discrete random variable can assume, together with associated probabilities, is called a discrete probability distribution.

To calculate the probability that the random variable X assumes the value x, P(X = x), add the probabilities of all the simple events for which X

is equal to x, or use probability calculation tools (tree diagram), apply probability definitions

Discrete Probability Distributions

7-82007會計資訊系統計學 ( 一 )上課投影片

Requirements for a Discrete Distribution The probabilities of the values of a discrete random

variable may be derived by means of probability tools such as tree diagrams or by applying one of the definitions of probability, so long as these two conditions apply:

1)x(P 2.

x all for 1)x(P0 1.

x all

7-92007會計資訊系統計學 ( 一 )上課投影片

In practice, probability distributions can be estimated from relative frequencies.

Example 7.1 A survey reveals the following frequencies (1,000s) for the

number of color TVs per household.1,218 ÷ 101,501 = 0.012

e.g. P(X=4) = P(4) = 7,714÷101,501 = 0.076 = 7.6%

Discrete Probability Distributions

7-102007會計資訊系統計學 ( 一 )上課投影片

Example 7.1 The probability distribution can be used to calculate

the probability of different events Calculate the probability of the following events: P(The number of color TVs is 3) = P(X=3) =.191 P(The number of color TVs is two or more)= P(X2) = P(X=2)+P(X=3)+P(X=4)+P(X=5) =.374 +.191 +.076 +.028 = .669

7-112007會計資訊系統計學 ( 一 )上課投影片

Example 7.1 E.g. what is the probability there is at least one television but

no more than three in any given household? P(The number of color TVs is at least one but no more than

three ) = P(≤X≤ = P(X=1)+P(X=2)+P(X=3) =.319 +.374 +.191 = .884

7-122007會計資訊系統計學 ( 一 )上課投影片

Developing a Probability Distribution

Probability calculation techniques can be used to develop probability distributions.

ExampleFind the probability distribution of the random variable describing the number of heads that face-up when a coin is flipped twice.

Sample space x ProbabilityHH 2 1/4HT 1 1/4TH 1 1/4TT 0 1/4

x p(x)0 1/41 1/22 1/4

7-132007會計資訊系統計學 ( 一 )上課投影片

Example 7.2 A mutual fund sales person knows that there is 20%

chance of closing a sale on each call she makes. What is the probability distribution of the number of

sales if she plans to call three customers?

Let S denote success, i.e. closing a sale P(S)=.20 Thus SC is not closing a sale, and P(SC)=.80 Let X denote the number of sales , X=0,1,2,3.

7-142007會計資訊系統計學 ( 一 )上課投影片

Solution Use probability rules and trees Define event S = {A sale is made}.

P(S)=.2

P(SC)=.8P(S)=.2

P(S)=.2

P(S)=.2

P(S)=.2

P(SC)=.8

P(SC)=.8

P(SC)=.8

P(SC)=.8

S S S

S S SC

S SC S

S SC SC

SC S S

SC S SC

SC SC S

SC SC SC

P(S)=.2

P(SC)=.8

P(SC)=.8

P(S)=.2

X P(x)3 .23 = .0084 3(.032)=.0965 3(.128)=.3840 .83 = .512

(.2)(.2)(.8)= .032

Example 7.2

Sales Call 1

Sales Call 2

Sales Call 3

7-152007會計資訊系統計學 ( 一 )上課投影片

Additional Example The number of cars a dealer is selling daily were recorded in the

last 100 days. This data was summarized in the table below. Estimate the probability distribution, and determine the probability

of selling more than 2 cars a day.

Daily sales Frequency0 51 152 353 254 20

100

Developing Probability Distribution and Finding the Probability of an Event

7-162007會計資訊系統計學 ( 一 )上課投影片

0 1 2 3 4

Solution From the table of frequencies we can calculate the

relative frequencies, which becomes our estimated probability distribution

Daily sales Relative Frequency0 5/100=.051 15/100=.152 35/100=.353 25/100=.254 20/100=.20

1.00

.05

.15

.35.25

.20

X

P(X>2) = P(X=3) + P(X=4) =.25 + .20 = .45

Developing Probability Distribution and Finding the Probability of an Event

7-172007會計資訊系統計學 ( 一 )上課投影片

Population/Probability Distribution The discrete probability distribution represents a

population(母體)• Example 7.1 the population of number of TVs per household• Example 7.2 the population of sales call outcomes

Since we have populations, we can describe them by computing various parameters(參數) .

E.g. the population mean and population variance.

7-182007會計資訊系統計學 ( 一 )上課投影片

Population Mean (Expected Value) The population mean(母體平均數) is the

weighted average(加權平均) of all of its values. The weights are the probabilities.

This parameter is also called the expected value(期望值) of X and is represented by E(X) or µ.

Recall:

x all

)x(xP)X(E

N

XN

1ii

7-192007會計資訊系統計學 ( 一 )上課投影片

Population Variance The population variance(母體變異數) is calculated

similarly. It is the weighted average of the squared deviations from the mean.

Recall:

The standard deviation(標準差) is the same as before: 2

2

x all

2

x all

22 )x(Px)x(P)x()X(V

N

)X(N

1i

2i

2

7-202007會計資訊系統計學 ( 一 )上課投影片

Example 7.3 Find the mean, variance, and standard deviation for the

population of the number of color televisions per household (from Example 7.1)

= 2.084

)028(.5)076(.4)191(.3)374(.2)319(.1)012(.0

)5(P5)1(P1)0(P0)x(xP)X(Ex all

7-212007會計資訊系統計學 ( 一 )上課投影片

Example 7.3 Find the mean, variance, and standard deviation for the

population of the number of color televisions per household (from Example 7.1)

= 1.107

)028(.)084.25()319(.)084.21()012(.)084.20(

)x(P)x()X(V

222

x all

22

7-222007會計資訊系統計學 ( 一 )上課投影片

Example 7.3 Find the mean, variance, and standard deviation for the

population of the number of color televisions per household (from Example 7.1)

052.1107.12

7-232007會計資訊系統計學 ( 一 )上課投影片

Laws of Expected Value E(c) = c E(X + c) = E(X) + c E(cX) = cE(X)

Laws of Variance V(c) = 0 V(X + c) = V(X) V(cX) = c2V(X)

Laws of Expected Value and Variance

where X is a random variable c is a constant

7-242007會計資訊系統計學 ( 一 )上課投影片

Laws of Expected Value 1. E(c) = c

The expected value of a constant (c) is just the value of the constant.

2. E(X + c) = E(X) + c

3. E(cX) = cE(X) We can “pull” a constant out of the expected value

expression (either as part of a sum with a random variable X or as a coefficient of random variable X).

7-252007會計資訊系統計學 ( 一 )上課投影片

Example 7.4 The monthly sales at a computer store have a mean of

$25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000.

Find the mean monthly profit.

Describe the problem statement in algebraic terms: sales have a mean of $25,000 E(Sales) = 25,000 profits are calculated by

Profit = .30(Sales) – 6,000

7-262007會計資訊系統計學 ( 一 )上課投影片

Example 7.4 The monthly sales at a computer store have a mean of

$25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000.

Find the mean monthly profit.

E(Profit) =E[.30(Sales) – 6,000] =E[.30(Sales)] – 6,000[by rule #2. E(X+c)=E(X)+c] =.30E(Sales) – 6,000 [by rule #3. E(cX)=cE(X)] =.30(25,000) – 6,000 = 1,500

Thus, the mean monthly profit is $1,500

7-272007會計資訊系統計學 ( 一 )上課投影片

Laws of Variance 1. V(c) = 0

The variance of a constant (c) is zero.

2. V(X + c) = V(X) The variance of a random variable and a constant is just the

variance of the random variable.

3. V(cX) = c2V(X) The variance of a random variable and a constant

coefficient is the coefficient squared times the variance of the random variable.

7-282007會計資訊系統計學 ( 一 )上課投影片

Example 7.4 The monthly sales at a computer store have a mean of

$25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000.

Find the standard deviation of monthly profit.

Describe the problem statement in algebraic terms: sales have a standard deviation of $4,000

V(Sales) = 4,0002 = 16,000,000 (remember the relationship between standard deviation and

variance ) profits are calculated by… Profit = .30(Sales) – 6,000

2

7-292007會計資訊系統計學 ( 一 )上課投影片

Example 7.4The monthly sales at a computer store have a mean of $25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000.

Find the standard deviation of monthly profit.

The variance of profit = V(Profit)=V[.30(Sales) – 6,000]=V[.30(Sales)] [by rule #2. V(X+c)=V(X)]=(.30)2V(Sales) [by rule #3. V(cX)=c2V(X)]=(.30)2(16,000,000) = 1,440,000

Again, standard deviation is the square root of variance,so standard deviation of Profit = (1,440,000)1/2 = $1,200

7-302007會計資訊系統計學 ( 一 )上課投影片

Example 7.4 (summary) The monthly sales at a computer store have a mean of

$25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000. Find the mean and standard deviation of monthly

profits.

The mean monthly profit is $1,500

The standard deviation of monthly profit is $1,200

7-312007會計資訊系統計學 ( 一 )上課投影片

V(X + c) = V(X)

V(cX) = c2V(X)

E(cX) = cE(X)

E(X + c) = E(X) + c

Laws of Expected Value and Variance Solution

V(Profit) = V(.30(Sales) – 6,000] = V[(.30)(Sales)] = (.30)2V(Sales) = 1,440,000

Profit = .30(Sales) – 6,000

E(Profit) = E[.30(Sales) – 6,000] = E[.30(Sales)] – 6,000 = .30E(Sales) – 6,000 = .(30)(25,000) – 6,000 = 1,500

= [1,440,000]1/2 = 1,200

7-322007會計資訊系統計學 ( 一 )上課投影片

Additional Example The total number of cars to be sold next week

is described by the following probability distribution

Determine the expected value and standard deviation of X, the number of cars sold.

x 0 1 2 3 4p(x) .05 .15 .35 .25 .20

Laws of Expected Value and Variance

7-332007會計資訊系統計學 ( 一 )上課投影片

40.2

)20.0(4)25.0(3)35.0(2)15.0(1)05.0(0

)x(xp)X(E4

0x

x 0 1 2 3 4p(x) .05 .15 .35 .25 .20

Laws of Expected Value and Variance

Solution

11.124.1

24.1)20(.)4.24()25(.)4.23(

)35(.)4.22()15(.)4.21()05(.)4.20(

)x(p)4.2x()X(V

22

222

4

0x

22

7-342007會計資訊系統計學 ( 一 )上課投影片

Additional example - continued With the probability distribution of cars sold per week,

assume a salesman earns a fixed weekly wages of $150 plus $200 commission for each car sold.

What is his expected wages and the variance of the wages for the week?

Solution The weekly wages is Y = 200X + 150 E(Y) = E(200X+150) = 200E(X)+150= 200(2.4)+150=630$. V(Y) = V(200X+150) = 2002V(X) = 2002(1.24) = 49,600$2

Laws of Expected Value and Variance

7-352007會計資訊系統計學 ( 一 )上課投影片

Up to now, we have looked at univariate distributions, i.e. probability distributions in one variable.

As you might guess, bivariate distributions(二元分配) are probabilities of combinations of two variables.

The bivariate (or joint) distribution is used when the relationship between two random variables is studied.

A joint probability distribution of X and Y is a table or formula that lists the joint probabilities for all pairs of values x and y, and is denoted P(x,y).

The probability that X assumes the value x, and Y assumes the value y is denoted

7.2 Bivariate Distributions

)yYxX(P)y,x(P

7-362007會計資訊系統計學 ( 一 )上課投影片

Discrete Bivariate Distribution As you might expect, the requirements for a bivariate

distribution are similar to a univariate distribution, with only minor changes to the notation:

1)y,x(P 2.

y)(x, pairs all for 1)y,x(P0 1.

y allx all

7-372007會計資訊系統計學 ( 一 )上課投影片

Example 7.5 Xavier and Yvette are real estate agents; let’s use X

and Y to denote the number of houses each sells in a month. The following joint probabilities are based on past sales performance:

We interpret these joint probabilities as before.E.g the probability that Xavier sells 0 houses and Yvette sells 1 house in the month is P(0, 1) = .21

7-382007會計資訊系統計學 ( 一 )上課投影片

p(x,y)

Bivariate Distributions

X

YX=0 X=2X=1

y=1

y=2

y=0

0.42

0.120.21

0.070.06

0.02

0.06

0.03

0.01

Example 7.5 – continued

7-392007會計資訊系統計學 ( 一 )上課投影片

Marginal Probabilities

Example 7.5 – continued Sum across rows and down columns

XY 0 1 2 p(y)0 .12 .42 .06 .601 .21 .06 .03 .302 .07 .02 .01 .10p(x) .40 .50 .10 1.00

p(0,0)p(0,1)p(0,2)

The marginal probability P(X=0)

P(Y=1),The marginal probability.

7-402007會計資訊系統計學 ( 一 )上課投影片

Marginal Probabilities As before, we can calculate the marginal

probabilities by summing across rows and down columns to determine the probabilities of X and Y individually:

E.g the probability that Xavier sells 1 house = P(X=1) =0.40

7-412007會計資訊系統計學 ( 一 )上課投影片

Describing the Bivariate Distribution The joint distribution can be described by the mean,

variance, and standard deviation of each variable. This is done using the marginal distributions.

same formulae as for univariate distributions

7-422007會計資訊系統計學 ( 一 )上課投影片

Describing the Bivariate Distribution

To describe the relationship between the two variables we compute the covariance and the coefficient of correlation Covariance(共變數)

Coefficient of Correlation(相關係數)

To describe the relationship between the two variables we compute the covariance and the coefficient of correlation Covariance(共變數)

Coefficient of Correlation(相關係數)

YXy allx all

y allYX

x all

)y,x(xyP

)y,x(P)y)(x()Y,X(COV

YXXY

)Y,X(COV

7-432007會計資訊系統計學 ( 一 )上課投影片

Example 7.6 Compute the covariance and the coefficient of

correlation between the numbers of houses sold by Xavier and Yvette.

There is a weak, negative relationship between the two variables.

15.0

)01)(.5.2)(7.2(

)42)(.5.0)(7.1()12)(.5.0)(7.0(

)y,x(P)y)(x()Y,X(COVy all

YXx all

35.0)67)(.64(.

15.0)Y,X(COV

YXXY

7-442007會計資訊系統計學 ( 一 )上課投影片

1.30.

03.

)1Y(P

)1Y2X(P)1Y|2X(P

2.30.

06.

)1Y(P

)1Y1X(P)1Y|1X(P

7.30.

21.

)1Y(P

)1Y0X(P)1Y|0X(P

Example 7.5 - continued

The sum is equal to 1.0

Conditional Probability (Optional)

)yY(P

)yYxX(P)yYxX(P

7-452007會計資訊系統計學 ( 一 )上課投影片

Two random variables are said to be independent(獨立) when

Example 7.5 - continued Since P(X=0|Y=1)=.7 P(X=0)=.4, The variables X and Y

are not independent.

Conditions for Independence (optional)

y)x)P(YP(Xy)YxP(X or

y)P(Y)xXyP(Y or

)xX(P)yYxX(P

7-462007會計資訊系統計學 ( 一 )上課投影片

Sum of Two Variables The bivariate distribution allows us to develop the

probability distribution of any combination of the two variables, of particular interest is the sum of two variables.

to answer questions like “what is the probability that two houses are sold”?

P(X+Y=2) = P(0,2) + P(1,1) + P(2,0) = .07 + .06 + .06 = .19 If we consider our example of Xavier and Yvette selling

houses, we can create a probability distribution.

7-472007會計資訊系統計學 ( 一 )上課投影片

P(X+Y=0) = P(X=0 Y=0) = .12P(X+Y=1) = P(X=0 Y=1)+ P(X=1 Y=0) =.21 + .42

= .63P(X+Y=2) = P(X=0 Y=2)+ P(X=1 Y=1)+ P(X=2 Y=0)

= .07 + .06 + .06 = .19

The probabilities P(X+Y)=3 and P(X+Y) =4 are calculated the same way. The distribution follows

XY 0 1 2 p(y)0 .12 .42 .06 .601 .21 .06 .03 .302 .07 .02 .01 .10p(x) .40 .50 .10 1.00

The Probability Distribution of X+Y

7-482007會計資訊系統計學 ( 一 )上課投影片

Sum of Two Variables The distribution of X+Y

Likewise, we can compute the expected value, variance, and standard deviation of X+Y in the usual way.

E(X + Y) = 0(.12) + 1(.63) + 2(.19) + 3(.05) + 4(.01) = 1.2

V(X + Y) = (0 – 1.2)2(.12) + … + (4 – 1.2)2(.01) = .56

75.56.)YX(VYX

x + y 0 1 2 3 4p(x+y) .12 .63 .19 .05 .01

7-492007會計資訊系統計學 ( 一 )上課投影片

The Expected Value and Variance of X+Y We can derive laws of expected value and variance

for the sum of two variables as follows:

E(X + Y) = E(X) + E(Y) V(X + Y) = V(X) + V(Y) + 2COV(X, Y) If X and Y are independent, COV(X, Y) = 0 and thus

V(X + Y) = V(X) + V(Y)

Generally, for constant a and b, E(aX + bY) = aE(X) + bE(Y) V(aX + bY) = a2V(X) + b2V(Y) + 2abCOV(X, Y)

7-502007會計資訊系統計學 ( 一 )上課投影片

7.4 Binomial Distribution

The binomial distribution (二項分配) is the probability distribution that results from doing a “binomial experiment(二項實驗)” . Binomial experiments have the following properties:

Fixed number of trials, represented as n. Each trial has two possible outcomes, a “success” and a

“failure”. P(success)=p (and thus: P(failure)=1–p), for all trials. The trials are independent, which means that the outcome

of one trial does not affect the outcomes of any other trials.

7-512007會計資訊系統計學 ( 一 )上課投影片

Success and Failure …are just labels for a binomial experiment, there is no value

judgment implied.

For example a coin flip will result in either heads or tails. If we define “heads” as success then necessarily “tails” is considered a failure (inasmuch as we attempting to have the coin lands heads up).

Other binomial experiment notions: A coin flipped results in heads or tails An election candidate wins or loses An employee is male or female A car uses 87octane gasoline, or another gasoline.

7-522007會計資訊系統計學 ( 一 )上課投影片

Binomial Random Variable The random variable of a binomial experiment is defined as

the number of successes in the n trials, and is called the binomial random variable(二項隨機變數) .

E.g. flip a fair coin 10 times.1) Fixed number of trials n=102) Each trial has two possible outcomes {heads (success), tails

(failure)} 3) P(success)= 0.50; P(failure)=1–0.50 = 0.50 4) The trials are independent (i.e. the outcome of heads on the first

flip will have no impact on subsequent coin flips).

Hence flipping a coin ten times is a binomial experiment since all conditions were met.

7-532007會計資訊系統計學 ( 一 )上課投影片

Binomial Random Variable The binomial random variable counts the number of

successes in n trials of the binomial experiment. It can take on values from 0, 1, 2, …, n. Thus, its a discrete random variable.

7-542007會計資訊系統計學 ( 一 )上課投影片

S1

S2

S2

F2

F1

F2

S3

S3

S3

S3

F3

F3

F3

F3

P(SSS)=p3

P(SSF)=p2(1-p)

P(SFS)=p(1-p)p

P(SFF)=p(1-p)2

P(FSS)=(1-p)p2

P(FSF)=(1-p)p(1-p)P(FFS)=(1-p)2p

P(FFF)=(1-p)3

P(S 1)=p

P(S2|S1)

P(F1 )=1-p

P(F2 |S

1)

P(S2|F1)

P(F2 |F

1)

P(S2)=p

P(F2)=1-p

P(S2)=p

P(F2 )=1-p

P(S3|S2,S1)

P(F3|S2,S1)

P(S3|F2,S1)

P(F3|F2,S1)

P(S3|S2,F1)

P(S3|F2,F1)

P(F3|F2,F1)

P(F3|S2,F1)

P(S3)=p

P(S3)=p

P(S3)=p

P(S3)=p

P(F3)=1-p

P(F3)=1-p

P(F3)=1-p

P(F3)=1-p

Since the outcome of each trial is independent of the previous outcomes, we can replace the conditional probabilities with the marginal probabilities.

Since the outcome of each trial is independent of the previous outcomes, we can replace the conditional probabilities with the marginal probabilities.

P(S2|S1)

Developing the Binomial Probability Distribution (n = 3)

7-552007會計資訊系統計學 ( 一 )上課投影片

P(SSS)=p3

P(SSF)=p2(1-p)

P(SFS)=p(1-p)p

P(SFF)=p(1-p)2

P(FSS)=(1-p)p2

P(FSF)=(1-p)p(1-p)P(FFS)=(1-p)2p

P(FFF)=(1-p)3

Let X be the number of successes in three trials. Then,

X = 3

X =2

X = 1

X = 0

P(X = 3) = p3

P(X = 2) = 3p2(1-p)

P(X = 1) = 3p(1-p)2

P(X = 0) = (1- p)3

This multiplier is calculated in the following formula

SSS

SS

S S

SS

Developing the Binomial Probability Distribution (n = 3)

7-562007會計資訊系統計學 ( 一 )上課投影片

Calculating the Binomial Probability

In general, The binomial probability is calculated by:

n)1n(21!n

)!xn(!x

!nC where

n,,1,0x

)p1(pC)x(p)xX(P

nx

xnxnx

7-572007會計資訊系統計學 ( 一 )上課投影片

Example 7.9 & 7.10 Pat Statsdud is registered in a statistics course and intends

to rely on luck to pass the next quiz. The quiz consists on 10 multiple choice questions with 5

possible choices for each question, only one of which is the correct answer.

Pat will guess the answer to each question Find the following probabilities

• Pat gets no answer correct• Pat gets two answer correct• Pat fails the quiz

Calculating the Binomial Probability

7-582007會計資訊系統計學 ( 一 )上課投影片

Pat Statsdud Pat Statsdud is a student taking a statistics course. Pat’s exam

strategy is to rely on luck for the next quiz. The quiz consists of 10 multiple-choice questions. Each question has five possible answers, only one of which is correct. Pat plans to guess the answer to each question.

Is this a binomial experiment? Check the conditions: There is a fixed finite number of trials (n=10). An answer can be either correct or incorrect (two possible

outcomes). The probability of a correct answer (P(success)=.20) does not

change from question to question. Each answer is independent of the others.

7-592007會計資訊系統計學 ( 一 )上課投影片

Pat Statsdud n=10, and P(success) = .20

What is the probability that Pat gets no answers correct?

I.e. # success, x, = 0; hence we want to know P(x=0)

Pat has about an 11% chance of getting no answers correct using the guessing strategy.

1074.)8)(.1(1

)2.1()2(.)!010(!0

!10)0(P

10

0100

7-602007會計資訊系統計學 ( 一 )上課投影片

Pat Statsdud n=10, and P(success) = .20

What is the probability that Pat gets two answers correct?

I.e. # success, x, = 2; hence we want to know P(x=2)

Pat has about a 30% chance of getting exactly two answers correct using the guessing strategy.

3020.)1678)(.04(.45

)2.1()2(.)!210(!2

!10)2(P 2102

7-612007會計資訊系統計學 ( 一 )上課投影片

Cumulative Probability Thus far, we have been using the binomial probability

distribution to find probabilities for individual values of x. To answer the question:

“Find the probability that Pat fails the quiz”

If a grade on the quiz is less than 50% (i.e. 5 questions out of 10), that’s considered a failed quiz.

Thus, we want to know what is: P(X ≤ 4) to answer

requires a cumulative probability(累積機率) , that is, P(X ≤ x)

7-622007會計資訊系統計學 ( 一 )上課投影片

Pat Statsdud P(X ≤ 4) = P(0) + P(1) + P(2) + P(3) + P(4)

We already know P(0) = .1074 and P(2) = .3020. Using the binomial formula to calculate the others:

P(1) = .2684 , P(3) = .2013, and P(4) = .0881

We have P(X ≤ 4) = .1074 + .2684 + … + .0881 = .9672

Thus, its about 97% probable that Pat will fail the test using the luck strategy and guessing at answers.

7-632007會計資訊系統計學 ( 一 )上課投影片

Mean and Variance of Binomial Variable

As you might expect, statisticians have developed general formulas for the mean, variance, and standard deviation of a binomial random variable. They are:

)p1(np

)p1(np)X(V

np)X(E2

7-642007會計資訊系統計學 ( 一 )上課投影片

Example 7.11 If all the students in Pat’s class intend to guess

the answers to the quiz, what is the mean and the standard deviation of the quiz mark?

Solution

Mean and Variance of Binomial Variable

26.16.1)p1(np

6.1)8)(.2(.10)p1(np)X(V

2)2(.10np)X(E2

7-652007會計資訊系統計學 ( 一 )上課投影片

Binomial Table Calculating binomial probabilities by hand is tedious

and error prone. There is an easier way. Refer to Table 1 in Appendix B. For the Pat Statsdud example, n=10, so the first important step is to get the correct table!

7-662007會計資訊系統計學 ( 一 )上課投影片

Binomial Table The probabilities listed in the tables are cumulative, i.e. P(X ≤ k) – k is the row index; the columns of the

table are organized by P(success) = p

7-672007會計資訊系統計學 ( 一 )上課投影片

Binomial Table What is the probability that Pat fails the quiz?i.e. what is P(X ≤ 4), given P(success) = .20 and n=10 ?

P(X ≤ 4) = .967

7-682007會計資訊系統計學 ( 一 )上課投影片

Binomial Table The binomial table gives cumulative probabilities for P(X ≤ k), but as we’ve seen in the last example,

P(X = k) = P(X ≤ k) – P(X ≤ [k–1])

Likewise, for probabilities given as P(X ≥ k), we have: P(X ≥ k) = 1 – P(X ≤ [k–1])

7-692007會計資訊系統計學 ( 一 )上課投影片

Binomial Table What is the probability that Pat gets no answers correct?i.e. what is P(X = 0), given P(success) = .20 and n=10 ?

P(X = 0) = P(X ≤ 0) = .107

7-702007會計資訊系統計學 ( 一 )上課投影片

Binomial Table What is the probability that Pat gets two answers correct?i.e. what is P(X = 2), given P(success) = .20 and n=10 ?

P(X = 2) = P(X≤2) – P(X≤1) = .678 – .376 = .302remember, the table shows cumulative probabilities.

7-712007會計資訊系統計學 ( 一 )上課投影片

=BINOMDIST() Excel Function There is a binomial distribution function in Excel that can also be used

to calculate these probabilities. For example: What is the probability that Pat gets two answers correct?

# successes

# trials

P(success)

cumulative(i.e. P(X≤x)?)

P(X=2)=.3020

7-722007會計資訊系統計學 ( 一 )上課投影片

=BINOMDIST() Excel Function There is a binomial distribution function in Excel that can also be used

to calculate these probabilities. For example: What is the probability that Pat fails the quiz?

# successes

# trials

P(success)

cumulative(i.e. P(X≤x)?)

P(X≤4)=.9672

7-732007會計資訊系統計學 ( 一 )上課投影片

Binomial Distribution

Additional Example Records show that 30% of the customers in a shoe store

make their payments using a credit card. This morning 20 customers purchased shoes. Use Table 1 of Appendix B to answer some questions

stated in the next slide. This is a binomial experiment with n=20 and p=.30. Let X be the number of customers who use a credit

card.

7-742007會計資訊系統計學 ( 一 )上課投影片

pk .01……….. .300..

11

What is the probability that at least 12 customers used a credit card? (n=20 and p=.30)

.995

P(At least 12 used credit card) = P(X≥12)=1 - P(X≤11)= 1-.995 = .005

Binomial Distribution

7-752007會計資訊系統計學 ( 一 )上課投影片

pk .01……….. .30

What is the probability that at least 3 but not more than 6 customers used a credit card? (n=20 and p=.30)

.608

P(3 ≤ X ≤ 6)=P(X=3 or 4 or 5 or 6)=P(X ≤ 6) - P(X ≤ 2)=.608 - .035 = .573

02.6

.035

Binomial Distribution

7-762007會計資訊系統計學 ( 一 )上課投影片

What is the expected number of customers who used a credit card?

E(X) = np = 20(.30) = 6

Find the probability that exactly 14 customers did not use a credit card.

Let Y be the number of customers who did not use a credit card.P(Y=14) = P(X=6) = P(X6) - P(x5) = .608 - .416 = .192

Find the probability that at least 9 customers did not use a credit card. P(Y9) = P(X11) = .995

Binomial Distribution

7-772007會計資訊系統計學 ( 一 )上課投影片

The Poisson distribution, named for Simeon Poisson, is a discrete probability distribution

It refers to the number of events (a.k.a. successes) within a specific time period or a specific region of space.

7.5 Poisson Distribution

7-782007會計資訊系統計學 ( 一 )上課投影片

The number of errors a typist makes per page. The number of flaws in a bolt of cloth. The number of telephone calls received by a

switchboard in an hour. The number of customers entering a service station

per day. The number of cars arriving at a service station in a

week. The number of accidents in 1 day on a particular

stretch of highway. (The interval is defined by both time, 1 day, and space, the particular stretch of highway.)

Examples of Poisson Distribution

7-792007會計資訊系統計學 ( 一 )上課投影片

Like a binomial experiment, a Poisson experiment has four defining characteristic properties: 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 of a success in an interval is• the same for all intervals of the same size,• proportional to the size of the interval.

The probability that two or more successes will occur in an interval approaches 0 as the interval becomes smaller.

Properties of the Poisson Experiment

7-802007會計資訊系統計學 ( 一 )上課投影片

The Poisson random variable is the number of successes that occur in a period of time or an interval of space in a Poisson experiment.

E.g. On average, 96 trucks arrive at a border crossing every hour.

E.g. The number of typographic errors in a new textbook edition averages 1.5 per 100 pages.

Poisson Distribution

successes

time period

successes (?!) interval

7-812007會計資訊系統計學 ( 一 )上課投影片

The Poisson Random Variable indicates the number of successes that occur during a given time interval or in a specific region in a Poisson experiment

Probability Distribution of the Poisson Random Variable.

The Poisson Variable and Distribution

V(X)E(X)

base logarithm natural is e and

interval the in successesof number mean the is μ where

0,1,2,x for !x

e)x(p)xX(P

x

7-822007會計資訊系統計學 ( 一 )上課投影片

As mentioned on the Poisson experiment slide:

The probability of a success is proportional to the size of the interval

Thus, knowing an error rate of 1.5 typos per 100 pages, we can determine a mean value for a 400 page book as:

=1.5(4) = 6 typos / 400 pages.

Poisson Distribution

7-832007會計資訊系統計學 ( 一 )上課投影片

Poisson Distributions (Graphs)

3678.e!01e

)0(p)0X(P 101

3678.e!11e

)1(p)1X(P 111

1839.2

e!21e

)2(p)2X(P121

0613.6

e!31e

)3(p)3X(P131

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

7-842007會計資訊系統計學 ( 一 )上課投影片

Poisson Distributions (Graphs)

0

0.05

0.1

0.15

0.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

0

0.05

0.1

0.15

0.2

1 2 3 4 5 6 7 8 9 10 11

00.050.1

0.150.2

0.250.3

1 2 3 4 5 6 7 8 9 10 11

Poisson probability distribution with =2

Poisson probability distribution with =5

Poisson probability distribution with =7

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7 8 9 10

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

7-852007會計資訊系統計學 ( 一 )上課投影片

Poisson Distribution

Example 7.12 The number of Typographical errors in new editions of

textbooks is Poisson distributed with a mean of 1.5 per 100 pages.

100 pages of a new book are randomly selected. What is the probability that there are no typos? That is, what is P(X=0) given that =1.5?

Solution.2231

!0

5.1e

!x

e)0X(P

0-1.5x

“ There is about a 22% chance of finding zero errors”

7-862007會計資訊系統計學 ( 一 )上課投影片

Example 7.13 For a 400 page book, what is the probability that there

are no typos?

Solution

“ there is a very small chance there are no typos”

.002479!0

6e

!x

e)0X(P

0-6x

Important!A mean of 1.5 typos per100 pages, is equivalent to 6 typosper 400 pages.

7-872007會計資訊系統計學 ( 一 )上課投影片

For a 400 page book, what is the probability that there are five or less typos?

This is rather tedious to solve manually. A better alternative is to refer to Table 2 in Appendix B.

k=5, μ =6, and P(X ≤ k) = .446

Example 7.13

“ there is about a 45% chance there are 5 or less typos”

.446!5

6e

!1

6e

!0

6e

)5(P)1(P)0(P)5X(P561606-

7-882007會計資訊系統計學 ( 一 )上課投影片

Example 7.13 Excel is an even better alternative:

7-892007會計資訊系統計學 ( 一 )上課投影片

Additional Example Cars arrive at a tollbooth at a rate of 360 cars per hour. What is the probability that only two cars will arrive during

a specified one-minute period? (Use the formula) Solution

The probability distribution of arriving cars for any one-minute period is Poisson with = 360/60 = 6 cars per minute. Let X denote the number of arrivals during a one-minute period.

0446.!2

6e)2X(P

26

Poisson Distribution

7-902007會計資訊系統計學 ( 一 )上課投影片

What is the probability that only two cars will arrive during a specified one-minute period? (Use Table 2, Appendix B.)

P(X = 2) = P(X2) - P(X1) = .062 - .017 = .045

K 0.1 …………… 3 …………. 6 …….0 0.905 0.05 0.0021 0.995 0.199 0.0172 1 0.423 0.062

selectedafor)kX(PprobabiltytheprovidestableThe

Poisson Distribution - Using a Table

7-912007會計資訊系統計學 ( 一 )上課投影片

What is the probability that at least four cars will arrive during a one-minute period? (Use table 2 , Appendix B)

P(X4) = 1 - P(X3) = 1 - .151 = .849

Poisson Distribution - Using a Table

7-922007會計資訊系統計學 ( 一 )上課投影片

Example A warehouse has a policy of examining 50 sunglasses

from each incoming lot, and accepting the lot only if there are no more than two defective pairs.

What is the probability of a lot being accepted if, in fact, 2% of the sunglasses are defective?

Solution This is a binomial experiment with n = 50, p = .02. Tables for n = 50 are not available; p<.05; thus, a Poisson approximation is appropriate [ =

(50)(.02) =1] P(Xpoisson2) = .920 (true binomial probability = .922)

Poisson Approximation of the Binomial (Optional)