63
Preparatory Program in Mathematics Module-II Amit Vatsa [email protected]

prep.ppt

Embed Size (px)

Citation preview

Page 1: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 1/63

Preparatory Program in Mathematics

Module-II

Amit Vatsa

[email protected]

Page 2: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 2/63

Introduction to Probability Theory

• Probability: Quantitative measure of chance.

 –  0.0 Absolutely no chance

 –  1.0 Absolute certainty

• Some terminology

 –  Experiment Tossing a die

 –  Event (Experimental outcome) 1,2,3,4,5,6

• Elementary Event 1,2,3,4,5,6

• Composite Event < 3, even, odd –  A composite event includes more than one elementary outcomes.

 –  Sample Space: A complete or exhaustive listing (set) of elementary events.{1,2,3,4,5,6}

 –  All elements in the sample space are mutually exclusive and collectively exhaustive.

(Composite events need not be mutually exclusive).

Page 3: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 3/63

Example

1. Distributing 3 distinguishable balls in 2 cells. How many

 possible outcomes? What is the sample space?

Let a, b, c be the 3 balls. Possible outcomes are:

{a b c| -}

{a b| c}{a c| b}

{b c| a}

{a | b c}

{b | c a}

{c | a b}

{- | a b c}

Event : 1

st

cell is not empty?Event: 1st cell contains two balls?

Page 4: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 4/63

Example

1. Distributing 3 indistinguishable balls in 2 cells. How many

 possible outcomes? What is the sample space?

Possible outcomes are:

{- | ***}

{*| **}{**| *}

{***| -}

Event : 1st cell is not empty?

Event: 1st cell contains two balls?

Page 5: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 5/63

Example

• What is the sample space for two coin toss?

• What is the sample space for two dice throws?• In a family of two children

 –  Sample space of number of girls in the family

 –  Are all outcomes equally likely??

Page 6: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 6/63

• Assumption: All elements in the sample space are equally likelyto occur???

 –  How valid is this?

• Throwing a die: sample space {1,2,3,4,5,6}

• What is the chance of each elementary event occurring?

• Can we now determine probabilities of composite events? How?

Page 7: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 7/63

Composite Events

• Event A: outcome of the toss is an even number.

 –  Which elementary outcomes are favorable to event A? 2,4,6.

 –  Since each of these has a 1 in 6 chance, P(A) = 3/6 = 0.5

• Event B: outcome is divisible by 3

 –  Favorable outcomes: 3, 6. P(B) = 2/6 = 0.333.

• Complementary Event: The event in question does not occur.

 – Complement of event A is designated A‟. 

 – What is P(A‟) ? Clearly 1-P(A). Why?

• Sum of probabilities of events that are mutually exclusive and

col lectively exhaustive is always 1.0.

• Odds: ratio of favorable to unfavorable outcomes.

 –  What are the odds that the outcome is divisible by 3? 2:4

• If the odds of an event are a:b , then its probability is a/(a+b).

Page 8: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 8/63

Joint or Non-exclusive Events

• Two events are non-exclusive if they have one or more elementrary outcomes 

common between them, i.e. they can occur together.

 –  A: outcome is even.

 –  B: outcome is divisible by 3.

 –  Are they exclusive or non-exclusive? Why?

• A Venn Diagram is useful

1

23

4 56Sample space

A B

Another example: Draw one card from a deck of 52 cards.

Event A: A Heart is drawn

Event B: A King is drawn

Are they exclusive?

A Black King is drawn

Page 9: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 9/63

Probability of Union of Events

• P(A or B) or P(AB)

• If A and B are mutually exclusive events, P(A or B) = P(A)+P(B)

• A – Outcome of die toss is less then 3

• B – Outcome is divisible by 3

1

234 56

AB

1

2

3

4

56P(A or B) = 2/6+2/6 = 4/6 = 0.667

What if they are non-exclusive?

A – Even number 

B – Divisible by 3

P(AB) = P(A)+P(B)-P(AB)  General Rule of addition

P(AB) = 3/6+2/6-1/6 = 4/6 

Page 10: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 10/63

Example

• Two dice are thrown

 –  Probability both of them show 6?

 –  Probability none of them show 6?

 –  Probability at least one of them show 6?

 –  Probability exactly one of them show 6?

• Cell and ball problems

Page 11: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 11/63

 

Page 12: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 12/63

Independent Events

• Draw a card from a deck.

• Put it aside.•  Now draw another card.

• What is the probability that first card is a King?

• What is the probability that second card is a King?

• Does it depend of the first draw? Why?

• What if the first card is put back in the deck before the second

draw? Does it still depend on the first draw? Why?

• Two events are independent if the occurrence of non-occurrence

of one event has no effect on the probability of the other event.

• They are dependent when the occurrence of one event does affect  

the probability of the other event.

Page 13: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 13/63

Probability of Intersection of Events

• P(AB) = ?

• Toss a coin twice –  A : Head on first toss P(A) = 0.5

 –  B : Head on second toss P(B) = 0.5

• AB : Head on both tosses (Joint event)

• P(AB) = P(A).P(B) (Joint probability)• This is true only when the two events are independent  .

• What if A and B are dependent?

Page 14: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 14/63

Conditional Probability

• Event A : A King on the first draw.

• Event B : A King on the second draw.

• P(A) = 4/52

• What about of P(B)? It depends on whether first draw was a King or not.

 –  If A occurred, probability of B = 3/51

 –  If A did not occur, probability of B = 4/51.

•  Notice that there is a condition attached to the probability in each case. –  P(B/A) = 3/51

 – P(B/A‟) = 4/51. 

• Why is the probability different in the two cases? Dependence! 

• Test of Independence

 –  Events A and B are independent  if P(A/B) = P(A/B‟) = P(A) and

P(B/A) = P(B/A‟) = P(B). 

 –  Here P(A) and P(B) are unconditional probabilities of the two events.

Page 15: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 15/63

 New Sample Space

Joint Probability

• For two events A and B, what is the probability that both events

take place. P(A and B) or P(AB)

• If A and B are independent events, P(A and B) = P(A).P(B)

• What if they are dependent?

• View this as a two step process:

 –  A occurs. –  Given that A has occurred, B occurs.

• P(A and B) = P(A). P(B/A).

• A die toss example:

 –  A : outcome is less than 5 –  B : outcome is a multiple of 3

• P(A) = 4/6, P(B) = 2/6, P(B/A) = ?

26

4

1

53

A B

1/4

P(A and B) = (4/6).(1/4) = 1/6 P(B/A) = P(A and B) / P(A)

Page 16: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 16/63

Total Probability Formula

• Consider dependent events A and B.

 –  P(B) = P(AB) + P(A B)

 –  = P(B/A)P(A) + P(B/A)P(A)

• Consider a mutually exclusive and collectively exhaustive set of 

events: A1, A2, A3,…An

• Let B be some event in the same sample space.

• P(B) = P(BA1)+P(BA2)…..+P(BAn)

• = P(A1)P(B/A1)+P(A2)P(B/A2)….+P(An)P(B/An)

A1

A2

A4

A3

Page 17: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 17/63

Unconditional (Marginal) Probability of B

• Revisit the Card experiment

 –  A: King on first draw

 –  B: King on second draw

• We know the following probabilities: –  P(A) = 4/52 P(A‟) = 1-P(A) = 48/52

 –  P(B/A) = 3/51 P(B/A‟) = 4/51 

• Given these, can we compute P(B)?• Consider the following two joint events:

 –  (A and B) P(A and B) = P(A).P(B/A) = (4/52)(3/51)

 – (A‟ and B)  P(A‟ and B) = (A‟).P(B/A‟) = (48/52)(4/51) 

 –  These two are mutually exclusive events

 –  They include all possible outcomes favorable to event B.

 – P(B) = P(A and B) + P(A‟ and B) 

 – P(B) = P(A).P(B/A) + P(A‟).P(B/A‟) = 0.0045+0.0724 = 0.0769

It is exactly the same as 4/52 = 0.0769. Why?

Page 18: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 18/63

Bayes‟ Theorem 

• Revisit the Card drawing experiment again.

 –  Event A : King on first draw

 –  Event B : King on second draw

• P(A), P(B/A) are easily determined. P(A) = 4/52, P(B/A) = 3/51.

• Suppose we are interested in P(A/B)!!! How to find it?

• Bayes‟ theorem comes to our rescue. 

• Recall the joint probability formula –  P(A and B) = P(A).P(B/A)

• Reversing the role of events A and B, the following must also be true:

 –  P(A and B) = P(B).P(A/B)

• Combining the two, we get

 –  P(A).P(B/A) = P(B).P(A/B)

 –  Or P(A/B) = [P(A).P(B/A)]/P(B) Baye‟s Formula 

• Let us substitute P(B) = P(A)P(B/A) + P(A‟)P(B/A‟) 

• P(A/B) = [P(A).P(B/A)] / [P(A)P(B/A) + P(A‟)P(B/A‟)] 

Page 19: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 19/63

Female Male Total

Admin (A) 20 30 50

Operations (O) 60 170 230

Sales (S) 100 70 170Totals 180 270 450

An employee is chosen at random:

What is the probability that the person is female?

that he is male working in administrative division?

works in operations, if the person is female?

is a female if the person works in operations?

Are S and M independent?

Are A and F independent?

Female Male Total

Admin (A) 0.0444 0.0666 0.111

Ops. (O) 0.1333 0.3777 0.511

Sales (S) 0.2222 0.1555 0.3777Totals 0.4 0.6 1.0

A bl l t i t f th li B B d B Fift

Page 20: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 20/63

• An assembly plant receives parts from three suppliers B1, B2 and B3. Fifty

 percent of supply comes from B1, and 25 percent from B2 and B3 each. Parts

supplied by these three suppliers contain 5%, 10% and 12% defective parts

respectively.

 –  If a part is chosen at random from the stock room, what is the probability

that it is defective?

 –  If a randomly selected part was found to be good, what is the probability

that it came from B2?

Page 21: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 21/63

 

Page 22: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 22/63

Random Variable• Experiment Outcome Numerical Value

• A random variable X maps the experimental outcome to a real number.

• Consider tossing a coin 3 times.• Possible outcomes:

 –  HHH, HHT, HTH, THH, HTT, THT, TTH, TTT

 –  X – No. of heads appearing in three tosses, X = 0,1,2,3

 –  P(X = 0) = 1/8, P(X = 1) = 3/8, P(X=2) = 3/8, P(X=3) = 1/8

• Random Variables are of two types:

 –  Discrete: can take a finite number of fixed values

•  No. of empolyees absent, No. of cars sold

 –  Continuous:

• Qty. of cement produced

• Diameter of the hole drilled.

• weight of fertilizer packed in a bag. –  Sometimes it is o.k. to approximate a discrete variable as a continuous one.

•  No. of customers visiting a bank branch.

•  No. of cars passing through a toll booth.

• Bags of cement produced in a day by a cement plant.

Page 23: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 23/63

Probability Distribution

• Discrete Random variable

 –  Assigns a probability value to each possible value of the random variable.

 –   No. of head in 2 tosses 0 1 2

 –  Probability 0.25 0.5 0.25

 –  Sum of all probabilities must be 1.0.

• Continuous Random variable

 –  Can we assign a probability to each possible value? Why not?

 –  Suppose X has a specific range of values (0,10)? Is it meaningful to talk about

P(X=3.71)?

 –  We can assign a probability density.

 –  It is only meaningful to talk about probability of X lying in an interval.

 –  P(a X b) is given by the area under the density function curve between a and b.

a b

Page 24: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 24/63

Binomial Distribution

• The production process of a company produces 5% defective

items. If a random sample of 20 items is taken from the day‟s

 production, what is the probability that

 –  There are no defective items in the sample.

 –  There is only one defective item in the sample.

 – There are „k‟ defective items in the sample 

• Define random variable X as the number of defective items in asample of n (=20 in this case). What is the probability distribution

of random variable X?

Page 25: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 25/63

Binomial Distribution

• Bernoulli Trial

 –  An experiment that has only two possible outcomes (Success/Failure)

• e.g. tossing a coin –  P(S) = p, P(F) = 1-p

 –  Probability p is unchanged from one trial to next.

 –  All trials are independent of each other.

• Suppose that n such trial are conducted.

 –  What is the number of successes in n trials? –  It is a random variable. Range : 0 – n.

 –  What is the probability distribution of this random variable?

• Consider a specific sequence of Successes and Failures: FSSFF

 –  There are 2 Successes? X = 2

 –  What is the probability of this specific sequence?

 –  (1-p)pp(1-p)(1-p) = p2(1-p)3

 – Is this the only sequence with 2 successes? SSFFF, SFSFF, SFFSF, SFFFS, …… 

 –  How many? (52). The probability of occurrence for each one is  p2(1-p)3

 –  What is the total probability of getting 2 Successes out of 5 trials?

 –  (52) p

2(1-p)3 

Page 26: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 26/63

Binomial Distribution

• f(x) = P(X=x) = p(x;n,p) = (nx) p

x(1-p)n-x

• n and p are the parameters of the distribution.• Expected Value of a Random Variable. (Mean value)

• E(X) = x.f(x)

• For Binomial distribution E(X) = x = n.p

• Variance V(X)• V(X) = (x – E(x))2.f(x)

• Variance of Binomial Distribution: V(X) = x2 = [n.p.(1-p)]

• x=[n.p.(1-p)]

• How is the variance affected by n and p?

Page 27: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 27/63

Binomial

Probabilities

 N = 10, p = 0.05

x p(x)

0 0.5987

1 0.3152

2 0.0746

3 0.0105

4 0.0009

5 0.0001

6 0.0000

7 0.0000

8 0.0000

9 0.0000

10 0.0000

Binomial

Probabilities

 N = 10, p = 0.50

x p(x)

0 0.0010

1 0.0097

2 0.0440

3 0.1172

4 0.2051

5 0.2460

6 0.2051

7 0.1172

8 0.0440

9 0.0097

10 0.0010

Binomial

Probabilities

 N = 10, p = 0.95x p(x)

0 0.0000

1 0.0000

2 0.0000

3 0.0000

4 0.0000

5 0.0001

6 0.0009

7 0.0105

8 0.0746

9 0.3152

10 0.5987

Page 28: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 28/63

Applications of Binomial Distribution

• The production process of a particular product produces 5% defective units. Acustomer has ordered a batch of 20 units. If the batch contains 3 or more

defective units, the customer will reject the entire batch, and cancel the order. –  What is probability that the order will be cancelled?

 –  What is the maximum permissible percentage of defectives in the production process so that the probability of rejection is reduced to less than 1%?

• P(Rejection) = 1- P(X 2) = 1- [P(X=0)+P(X=1)+P(X=2)]

• P(X 2) = (20

0

) p0(1-p)20 +(20

1

) p1(1-p)19 +(20

2

) p2(1-p)18

•   = 0.3585+0.3774+0.1887 = 0.9246

• P(rejection) = 0.0754

• The management of a restaurant that operates on reservations

Page 29: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 29/63

• The management of a restaurant that operates on reservations

only, knows from experience that 15% of persons making table

reservations will not show up. If the restaurant accepts 25

reservations, but has only 20 tables, what is the probability that all

who show up will be accomodated?

• The management of a restaurant that operates on reservations

Page 30: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 30/63

• The management of a restaurant that operates on reservations

only, knows from experience that 15% of persons making table

reservations will not show up. If the restaurant accepts 25

reservations, but has only 20 tables, what is the probability that all

who show up will be accomodated?

i i ib i

Page 31: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 31/63

Poisson Distribution

• Consider n  and p 0

• But Lim n.p =  

• There are 100000 vehicles on the streets of Ahmedabad

• On a given day, probability of a vehicle meeting with an accident is

0.00005.

• n.p = = 5 accidents per day (accident rate )

• The actual values of n and p are not important, as long as is known.

• A Bank has 10000 customers. The probability of customer arriving on a

given day is 0.005.

• = 50. Customer arrive at a rate of 50 per day (arr ival rate ).

• The actual number of customers arriving may range from 0 to (actually10000).

• A machine produces 50000 parts per day, with 0.001 probability of a part

 being defective. What is the number of defective parts produced in a day?

Page 32: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 32/63

Random variable X : No. of customer arriving in one hour.

 No. of accidents taking place in a day.

 No. of defective parts produced in a day.

What is the probability distribution of X?Can we use Binomial here? What is the difficulty?

Poisson Distribution is a limiting case of Binomial

as n  and p 0 Lim n.p =  

P i Di ib i

Page 33: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 33/63

Poisson Distribution

P(x, ) =

e-   x

----------x!

E(X) = , V(X) =  

n = 10

 p = 0.2

0.1074

0.2684

0.3020

0.2013

0.0881

0.02640.0055

0.0008

0.0001

0.0000

n=20

 p = 0.1

0.1216

0.2702

0.2852

0.1901

0.0898

0.03190.0089

0.0020

0.0004

0.0001

n = 40

 p = 0.05

0.1285

0.2706

0.2777

0.1851

0.0901

0.0342

0.0105

0.0027

0.0006

0.0001

n = 100

 p = 0.02

0.1326

0.2707

0.2734

0.1823

0.0902

0.0353

0.0114

0.0031

0.0007

0.0002

X

0

1

2

3

4

56

7

8

9

Poisson

= 2

0.1353

0.2707

0.2707

0.1804

0.0902

0.0361

0.0120

0.0034

0.0009

0.0002

Poisson Tables

Poisson approximation of 

Binomial,

n>20 and p<0.05

N i Bi i l Di ib i

Page 34: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 34/63

 Negative Binomial Distribution

• Consider a sequence of Bernoulli trials.

• Binomial : X - No. of successes in n trials.•  Negative Binomial

 –  Suppose you wish to continue conducting trials until a desired number of 

successes are achieved.

 –  Random Variable X  – How many failures take place before the desired

number, k , of successes occur?

 –  If k = 3, and the sequence FFSFSFFFS results, then X = 6.

• Last trial must be a success. Why?

• x+k-1 trials are conducted before the last one.

• What is the number of possible sequences with x failure and k-1 

successes? x+k-1Cx.

• Each one has probability pk (1-p)x

• P(X=x) = P(x;k,p) = x+k-1Cx pk (1-p)x

N ti Bi i l Di t ib ti

Page 35: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 35/63

 Negative Binomial Distribution

k(1-p)

-------

 p2 

V(X) =

k(1-p)

-------

 p

E(X) =

A machine has a 60% chance that it will be able to produce a

 part of acceptable quality. If five parts are to be produced, whatis the probability that no more than 7 attempts are required to

 produce them? What is the average number of attempts

required?

G t i Di t ib ti

Page 36: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 36/63

Geometric Distribution

Geometric Distribution : A special case of Negative Binomial Dist.

Let k = 1

How many failures before the first success?

x+k-1Cx pk (1-p)x

P(x;p) = p(1-p)x

(1-p)

-------

 pE(X) =

(1-p)

-------

 p2 V(X) =

k(1-p)

-------

 p2 V(X) =

k(1-p)

-------

 pE(X) =

Page 37: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 37/63

• ISRO is testing a new design of satellite launching rocket. The

 probability of a successful test launch is 0.7. What is the

 probability that they will achieve a successful launch within 4

attempts?

• P(X=0) + P(X=1) + P(X=2) + P(X=3)

H t i Di t ib ti

Page 38: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 38/63

Hypergeometric Distribution

• Binomial

 –  Select sample of size n from a potentially infinite population.

 –  View selection of n items as a sequential process.

 –  Probability p is unaffected by previous selections.

• What if the population is finite?

 –  In a population of 10 items, 5 are defective.

 –   p = 0.5 for the first item.

 –  For second item, p depends on the outcome of first selection.

• First item defective p = 4/9

•  Not defective p = 5/9

• Given a population of  N items containing k=Np defectives, if n 

items are selected at random, what is the probability of getting x 

defective items? Hypergeometric Distribution.

 –  Range of x is from 0 to min(n,k)

H t i Di t ib ti

Page 39: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 39/63

Hypergeometric Distribution

• Red/Black Balls.

 –   N – total number of balls

 –   Np  – No. of black balls (defective items)

 –   N-Np  – No. of red balls (good items)

P(x; N,n,p) =

( Npx) (

 N-Np n-x)

----------------( Nn)

As N becomes large, or n/N becomes small, these probabilities

tend to Binomial probabilities.

E l

Page 40: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 40/63

Example

• A box has 3 red and 4 black balls. If four balls are selected at

random, what is the probability of getting two red and two black 

 balls.

C ti P b bilit Di t ib ti

Page 41: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 41/63

Continuous Probability Distributions

• Uniform Distribution (Rectangular Distribution)

 –  Random Variable X lies in the interval (a,b), i.e. a≤X≤b 

 –  All values of X are equally likely. (Uniform )

 –  Probability Density is the same everywhere.

a  b

1/(b-a)

f(x;a,b) =

1/(b-a) a≤ x ≤b 

0 elsewhere{

F(x;a,b) = {0 x < a

(x-a)/(b-a)  a≤ x ≤b 

1  x > b 

t

P(x≤t) 

E pectation and Variance

Page 42: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 42/63

Expectation and Variance

• E(X) = = a b x.f(x).dx

• V(X) = 2 = a

 b (x-)2.f(x).dx

• For Uniform Distribution

 –  E(X) = (a+b)/2

 –  V(X) = (b-a)2/12, x = (b-a)/23

 –  A special case : a = 0, b = 1 Uniform(0,1)

 –  E(X) = 0.5, V(X) = 1/12, x = 1/23

Digression to “Moments” and “Kurtosis”

Page 43: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 43/63

Digression to “Moments” and “Kurtosis” 

• E(X) = 1 = - x.f(x).dx

• V(X) = 2 = - (x-1)2 .f(x).dx

•   3 = - (x-1)3 .f(x).dx

•   4 = - (x-1)4 .f(x).dx

First Moment about zero (Mean)

Second central Moment (Variance)

Third Central Moment (Skewness)

Fourth Central Moment (Kurtosis)

• First moment defines the location

• Higher Moments define the shape

• Relative Values are more meaningful.

 –  Coefficient of Variation / • Relative Kurtosis 4 = 4/2

2

Relevance of Kurtosis

Page 44: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 44/63

Relevance of Kurtosis

Mesokurtic (Normal Dist.) 4 =3

Leptokurtic 4 >3 

Platykurtic 4 < 3

Kurtosis indicates the “Peakedness” of the distribution. 

 Normal Distribution is viewed as a reference point, neither very

high, nor very low in terms of peakedness.

Leptokurtic  – Higher Peakedness compared to Normal.

Platykurtic  – Lower Peakedenss compared to Normal.

Uniform Distribution? Leptokurtic or Platykurtic?

4 =1.8

Normal Distribution

Page 45: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 45/63

 Normal Distribution

• Also called Gaussian Disribution.

• Most important and most widely used.

• Symmetrical, bell shaped, extends infinitely in both directions.

• Many naturally occurring data follows Normal Distribution

 –  Temperature, rainfall, measurements of living organisms.

 –  Measurements of manufactured parts, errors and deviations from norms.

• Density Function

  

  

2

2

1exp2

1),;( 

 

  

   x x f 

• Two parameters: - mean,  - standard deviation

dx x

 x X  E 

.

2

2

1

exp2

1

.)(

 

 

 

 

 

 

  

dx x

 x X V  .2

21exp

2

1.2)()(

 

  

 

 

 

   

=  

= 2 

2

2exp2

1

)1,0;(

x x f 

 

Standard Normal Dist.

X

Page 46: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 46/63

= 5

= 15

= 0

= 10

Distribution shifts by , if  is added to random variable X.

Distribution shrinks or expands if X is multiplied by . The mean stays at zero.

= 10

X

= 5

X-5

= 15

X+5

Computing Normal Probabilities

Page 47: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 47/63

F(b)

Computing Normal Probabilities

• How to find P(ax b)?

• Evaluate the integral of f(x) from a to b.

• Alternatively, P(ax b) = F(b)  – F(a)

a  bF(a)

•  No closed form solution to integral of f(x).

•  Numerical integration by computer is only way.

• Tables of F(x) available in text books are useful.

• What about the parameters and ?

• Do we need a separate table for each and combination?

• One table is enough for all. How?

Standard Normal Distribution

Page 48: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 48/63

Standard Normal Distribution

• Suppose X ~ N(,)

• Consider Z = X- as a random variable.

• What is the mean and variance of Z? What is the distribution of Z?

• Z ~ N(0,)• P(X a) = ?

• Substitute X = Z+ 

• P(X a) = P(Z+  a) = P(Z a-)

aa-10 = 10

X

= 0

Z

Standard Normal Distribution

Page 49: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 49/63

Standard Normal Distribution

• X ~ N(0,)

• Consider Z = X/ as a random variable.

• What is the mean and variance of Z? What is the distribution of Z?

• Z ~ N(0,1)• P(X a) = ?

• Substitute X = Z 

• P(X a) = P(Z  a) = P(Z a/)

= 2

= 1

aa/2

Standard Normal Distribution

Page 50: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 50/63

Standard Normal Distribution

• Given X~N(,), define Z = (X- )/.

• Then Z ~ N(0,1)

• P(X a) = P(Z (a- )/)

• Table of F(z) = P(Z z) are available and can be used to findcumulative probability for Normal distribution with any mean andstandard deviation.

 N(,) N(0,1)

aZa= (a- )/ 

z value corresponding to a

Page 51: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 51/63

• Daily cement production of a plant follows normal distribution

with mean of 50 tons and standard deviation of 3.5 tons. On how

many days in a year the production exceeds 58 tons.

• =50, =3.5

• X ~ N(50,3.5)

• Z58

= (55-50)/3.5 = 1.43

• P(X 55) = P(Z 1.43)

• = 1- P(Z 1.43)

Page 52: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 52/63

P(Z 1.43) = 0.9236

P(Z 1.43) = 0.0764 = P(X 55)

Ans = 365*0.0764 = 28 days

Page 53: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 53/63

Th f i bl i ll di ib d

Page 54: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 54/63

The amount of time to assemble a computer is normally distributed

with a mean of 50 minutes and standard deviation of 10 minutes.

Find the probability that the computer is assembled between 45

and 60 minutes.

Mensa is an organization whose members possess IQs that are in

the top 2% of the population. It is known that IQs are normally

distributed with a mean of 100 and standard deviation of 16. Findthe minimum IQ needed to be a Mensa member.

The annual rate of return on a mutual fund is normally distributed

with a mean of 14% and a standard deviation of 18%.

What is the probability that the fund returns more than 25%

next year?

What is the probability that the fund loses money next

year?

Page 55: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 55/63

A automatic pesticide packing machine is used to fill 500 g.

 pesticide powder in a carton. The standard deviation of the amount

filled by the machine is 4 grams. The management wants that no

more than 2% of the cartons filled should have less than 500 grams

 pesticide in it. What amount should the machine be programmed to

fill?

The lifetime of TVs produced by a company are normally

distributed with a mean of 75 months and a standard deviation of 8

months. If the manufacturer wants to have to replace only 1% of 

the TVs, what should its warranty be?

Every day a bakery prepares its famous cup-cakes. The dailydemand for cakes is normally distributed with a mean of 850 and a

standard deviation of 90. How many cup-cakes should the bakery

make so that the chances of running short on any day is not more

than 20%.

Normal Approximation of Binomial

Page 56: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 56/63

 Normal Approximation of Binomial

• Let X ~ Binomial(n,p)

• x

= np, x

= [np(1-p)]

• Define random variable Y = (X-np)/[n.p(1-p)]

• As n, distribution of Y approaches N(0,1).

• Though X is discrete, as n increases, it approaches continuity.

•  Normal is a reasonable approximation of Binomial when –  np > 5 if p < ½

 –  n(1-p) > 5 if p > ½

1 2 3 4 5 6 7

Page 57: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 57/63

• Example: What is the probability of 3 or fewer heads in 10 tosses?

 –  n = 10, p = 0.5, np = = 5, = 2.5 = 1.58

 –  Z3.5 = (3.5-5)/1.58 = -0.95

 –  FZ (-0.95) = 0.1711

 –  From Binomial Tables, P(X <= 3) = 0.1719

Use Excel to plot the F(x) for both.

Normal Approximation of Poisson

Page 58: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 58/63

 Normal Approximation of Poisson

• If  is large, Poisson distribution may also be approximated by

 Normal.

• E(X) = V(X) = for Poisson. So = and =  .

Example: If X follows Poisson distribution with =25, find the

 probability of X=20 using normal approximation.

P(19.5<X<20.5) = P(-1.1<Z<-0.9) = F(-0.9)  –  F(-1.1)

= 0.1841 – 0.1357 = 0.0484

P(X=20) = 0.0519 using Poisson Formula

Exponential Distribution

Page 59: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 59/63

Exponential Distribution

• Also called Negative Exponential

• f(x;) = ()exp(-x) x 0

• E(X) = 1/, V(X) = 1/2, i.e. = 1/ 

• 3 = 2 (Skewed Right)

• 4 = 9 (Highly Leptokurtic) 

F(x;) = 1-exp(-x)

a

is called Arrival 

Rate or Failure Rate 

Memory-less Property

Page 60: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 60/63

Memory less Property

• Exponential distribution is used to model customer arrivals in

queuing systems (e.g. a bank window)

• What is the probability that a customer will arrive in next 5 

minutes? P(X 5).

• Suppose that no customer arrives in the 5 minutes.

• Given this, what is the probability that a customer will arrive in

next 5 minutes? P(X 10/ X 5)

• After 10 minutes? P(X 15/ X 10) 

• For exponential distribution, it is the same as P(X 5), no matter 

how long you have waited.

• P(X t+ / X t) = P(X  ) for any value of t

• A : X t+ 

• B : X t

Memory-less Property

Page 61: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 61/63

Memory less Property

• P(A) = P(X t+) = 1-e -(t+)

• P(B) = P(X t) = e -t

• P(A/B) = P(AB)/P(B)

• P(AB) = P(tXt+) = F(t+)-F(t)

• (1-e-(t+)) – (1-e-t ) = e-t - e-(t+)

• P(A/B) = 1 - e-

= P(X  )

• Conditional Distribution

Relationship between Poisson and Exponential

Page 62: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 62/63

e at o s p betwee o sso a d po e t a

• Consider Arrival of customers in bank.

• Time between two successive arrivals follows Exponential Dist.

• Consider an interval of time of duration t.

• How many customers will arrive in this interval?

• Discrete Random Variable.

• Follows Poisson distribution with parameter t.

P(x, ) =

e-   x

----------

x!P(x, t ) =

e- t (t) x

----------

x!

Poisson Process

Probability Distributions

Page 63: prep.ppt

7/27/2019 prep.ppt

http://slidepdf.com/reader/full/prepppt 63/63

Probability Distributions

Bernoulli Trial

Binomial(n,p)

 Negative

Binomial(k,p)

Geometric(p)

k = 1

Poisson()n ∞, p 0

 Normal(,)

np > 5

Exponential()

large

Uniform(a,b)

?