special mathematics discrete random variables
TRANSCRIPT
Special Mathematics
Discrete random variables
April 2018
ii
βExpose yourself to as much randomness as possible.β
Ben Casnocha
6Discrete random variables
Texas Holdem Poker:
In Holdβem Poker players make the best hand they can combining the twocards in their hand with the 5 cards (community cards) eventually turned upon the table. The deck has 52 and there are 13 of each suit: β£ β¦ β₯ β
Open problem: Until he finally won a WSOP event in 2008, Erick Lind-gren was often called one of the greatest players never to have won a WSOPtournament. Before his win, he played in many WSOP events and finished in
1
the top 10 eight times. Suppose you play in one tournament per week. Forsimplicity, assume that each tournamentβs results are independent of the oth-ers and that you have the same probability p of winning each tournament. Ifπ = 0.01, then what is the expected amount of time before you win your firsttournament?
Open problem: During Episode 2 of Season 5 of High Stakes Poker, DoyleBrunson was dealt pocket kings twice and pocket jacks once, all within abouthalf an hour. Suppose we consider a high pocket pair to mean 10-10, J-J, Q-Q,K-K, or A-A. Let π be the number of hands you play until you are dealt ahigh pocket pair for the third time. What is the expected number of hands ?
Open problem: Many casinos award prizes for rare events called jackpothands. These jackpot hands are defined differently by different casinos. Supposein a certain casino jackpot hands are defined so that they tend to occur aboutonce every 50, 000 hands on average. If the casino deals about 10, 000 handsper day, what are the expected value and standard deviation of the number ofjackpot hands dealt in a 7-day period?
Open problem: On the last hand of the 1998 WSOP Main Event, with theboard 8 β£ 9 β¦ 9 β₯ 8 β₯ 8 β , Scotty Nguyen went all-in. While his opponent,Kevin McBride, was thinking, Scotty said, βYou call, itβs gonna be all over,baby.β McBride said, βI call. I play the board.β It turned out that Scotty hadJ β¦ 9 β£ and won the hand. Assuming you never fold in the next 100 hands,what would be the expected value of X = the number of times in these 100hands that you would play the board after all five board cards are dealt ?
2
Discrete random variables
Bernoulliβs random variable π βΌ π΅ππ(π)
β it is the simplest discrete random variable, it models an experiment inwhich only two possible outcomes can occur, often designated success, andfailure.
It can be used to represent a coin toss (we consider the appearence of a tailas being a succes ). We assign the value 1 to success with the probabilityπ β (0, 1)and the value 0 to failure with probability π = 1 β π. Thus weobtain a Bernoulli random variable π with parameter π (probability of asuccess) π βΌ π΅ππ(π):
π :
ββ 0 1
1 β π π
ββ Of course, in our example π = 1
2 .οΏ½
Example:
Uniform discrete random variable π βΌ π°(π)
It represents a mathematical model which generalizes the experiment ofthrowing a die (case π = 6)
β if an experiment has π equally possibile outcomes denoted {1, 2, . . . , π},then the experiment can be modelled using a uniform random variable of theform :
π :
ββ1 2 . . . π
1π
1π . . . 1
π
ββ Binomial random variable π βΌ π΅ππ(π, π)
A random variable with a binomial distribution is the right model when thefollowing assumptions hold (we have a binomial experiment):
β the modelled phemenon consists of π independent trials of the same ex-periment
β there are only two possible outcomes at each trial ( success - failure)β the probability π of a success is the same at each trialThe random variable which counts the number of successes in π trials of a
binomial experiment is called a binomial random variable:
π :
ββ 0 1 . . . π . . . π
ππ πΆ1πππ
πβ1 . . . πΆπππ
πππβπ . . . ππ
ββ 3
where π and π = 1 β π are the probabilities of a success, respectively failure ateach independent trial.
Geometric random variable π βΌ πΊππ(π)
It is the appropriate model if in a binomial experiment we count the numberof failures until the first success occurs.
π :
ββ0 1 . . . π . . .
π π(1 β π) . . . π(1 β π)π . . .
ββ Hypergeometric random variable π βΌ π»ππ(π,π,π)
Consider the problem of drawing objects from a box which contains π ob-jects, with π of them being defective.
β if the draws are with replacement (the extracted object is put back in thebox before the next draw), then the number of the defective objects drawn in πdraws is a binomial random variable with parameters π and π = π
π (probabilityof drawing a defective object)
β if the draws are without replacement, then the probability to draw adefective object is not the same in each of those π draws, thus the number ofthe defective objects drawn is no more a binomial random variable.
=β one obtains a random variable having the probability mass function
π (π = π) =
{οΈπΆπ
ππΆπβππβπ
πΆππ
, if π β {0, 1, 2, . . . , π}0, otherwise
and it is called a hipergeometric random variable with parameters π,π andπ.
Poissonβs random variable π βΌ ππ(π)
First of all, according to Poissonβs law:
π (π = π) = πΆπππ
πππβπ β ππ
π!πβπ, for π = ππ
we can approximate the distribution series of a binomial distribution when theprobability π of a success at each trial is small and the number of trials π is big.In practice we usually apply it for π < 0, 05 and π β₯ 100
β this law generates a probability distribution that expresses the probabilityof a given number of events occurring in a fixed interval of time or space ifthese events occur with a known constant rate and independently of the timesince the last event. The Poisson distribution can also be used for the numberof events in other specified intervals such as distance, area or volume.
β the Poisson distribution is usually used for rare events and it is also calledthe law of rare events.
π :
ββ 0 1 . . . π . . .
πβπ π1!π
βπ . . . ππ
π! πβπ . . .
ββ
4
Negative binomial random variable π βΌ ππ΅(π, π)
β is a discrete probability distribution of the number of successes in binomialexperiment before a specified number of failures denoted r occurs.
π :
ββ 0 1 . . . π . . .
(1 β π)π πΆ11+πβ1π(1 β π)π . . . πΆπ
π+πβ1ππ(1 β π)π . . .
ββ β sometimes we want to count the number of trials needed to produce the
π-th successβ such a random variable π will have the probability mass function:
π (π = π) = πΆπβ1πβ1π
π(1 β π)πβπ, π = π, π + 1, π = 2, . . .
The above identity is interpreted as: β the probability to obtain in the π-thtrail the π-th success is...β
Numerical characteristics of random variables
β for a discrete random variable:
π :
ββπ₯π
ππ
ββ πβπΌ
the expected valued or mean πΈ(π) or π(π) is defined as:
οΏ½ΜοΏ½ = πΈ(π) = π(π) =βοΈπβπΌ
πππ₯π
β the moments ππ and the central moments ππ of order π are defined by:
ππ(π) = π(ππ) =βοΈπβπΌ
πππ₯ππ ,
ππ(π) = π((π β οΏ½ΜοΏ½)π) =βοΈπβπΌ
ππ(π₯π β οΏ½ΜοΏ½)π
β the variance is defined as:
π£ππ(π) =βοΈπβπΌ
ππ(π₯π β οΏ½ΜοΏ½)2
and the standard deviation is:
π(π) =βοΈ
π£ππ(π)
β for π βΌ π΅ππ(π, π) =β πΈ(π) = ππ and π£ππ(π) = ππ(1 β π)β for π β π΅ππ(π) =β πΈ(π) = π and π£ππ(π) = π(1 β π)β for π β πΊππ(π) =β πΈ(π) = 1
π and π£ππ(π) = 1βππ2
β for π β ππ(π) =β πΈ(π) = π and π£ππ(π) = π
β for π β ππ΅(π, π) =β πΈ(π) = ππ and π£ππ(π) = π(1βπ)
π2
5
β the following identities hold:
πΈ(π + ππ ) = πΈ(π) + ππΈ(π )
π£ππ(ππ + πΆ) = π2π£ππ(π)
where πΆ is the constant random variable.β if π and π are independent:
πΈ(ππ ) = πΈ(π)πΈ(π )
π£ππ(π + ππ ) = π£ππ(π) + π2π£ππ(π ).
6
Solved problems
Problem 1. Three shooters shoot a target. The random variable πwhich counts the number of hits has the distribution series
π =
ββ 0 1 2 3
π2
411π24
14
124
ββ .
a) After one finds the value of π, compute the probability that π takes avalue smaller or equal with 2.b) Find the probability of hitting the target for each shooter.
Solution: a) The sum of all probabilities in a distribution seris of a randomvaribale must be 1, thus
π2
4+
11π
24+
1
4+
1
24= 1 β 6π2 + 11πβ 17 = 0 β π = 1
π (π β€ 2) = 1 β π (π = 3) = 1 β π (π > 2) = 1 β 1
24=
23
24
b) Let π1, π2, π3 be these probabilities. Hence we have for π = 1:
π =
ββ 0 1 2 3
14
1124
14
124
ββ But:
1
4= π (π = 0) = (1 β π1) (1 β π2) (1 β π3)
(because π = 0 means: all the shooters missed the target)
= 1 β (π1 + π2 + π3) + π1π2 + π1π3 + π2π3 β π1π2π3
11
24= π (π = 1) = π1 (1 β π2) (1 β π3) + π2 (1 β π1) (1 β π3) + π3 (1 β π1) (1 β π2)
(because π = 1 means: one of the shooter hit and the others missed the target)
= π1 + π2 + π3 β 2 (π1π2 + π1π3 + π2π3) + 3π1π2π3
1
4= π (π = 2) = π1π2 (1 β π3) + π1π3 (1 β π2) + π2π3 (1 β π1)
= π1π2 + π1π3 + π2π3 β 3π1π2π3
1
24= π (π = 3) = π1π2π3.
7
One gets the linear systemβ§βͺβͺβͺβ¨βͺβͺβͺβ©π1 + π2 + π3 = 13
12
π1π2 + π1π3 + π2π3 = 38
π1π2π3 = 124
which leads to the equation
24π₯3 β 26π₯2 + 9π₯β 1 = 0
with the roots
π1 =1
2; π2 =
1
3; π3 =
1
4.
Problem 2. The random variables π and π have the distribution series
π =
ββ 1 2 3
0, 1 0, 2 0, 7
ββ , π =
ββ 4 5 6
0, 4 0, 5 0, 1
ββ .
Compute:a) The distribution series of π + π,b) The distribution series of π Β· π,c) The distribution series of π2.
Solution: a) The distribution series of π + π is:
π + π :
ββ 5 6 7 8 9
0, 04 0, 13 0, 39 0, 37 0, 07
ββ ,
For example when π + π = 6 then:
π (π + π = 6) = π (π = 1 si π = 5) + π (π = 2 and π = 4)
= π (π = 1) Β· π (π = 5) + π (π = 2) Β· π (π = 4)
(the random variables are considered independent)
= 0, 1 Β· 0, 5 + 0, 2 Β· 0, 4 = 0, 05 + 0, 08 = 0, 13
b) The distribution series of π Β· π is:
π Β· π :
ββ 4 5 6 8 10 12 15 18
0, 04 0, 05 0, 01 0, 08 0, 1 0, 3 0, 35 0, 07
ββ ,
For example when π Β· π = 4:
π (π Β· π = 4) = π (π = 1 and π = 4)
= π (π = 1) Β· π (π = 4)
= 0, 1 Β· 0, 4 = 0, 04
8
again using the independence of π and π we were able to compute straightfor-ward π (π = 1 and π = 4) = π (π = 1) Β· π (π = 4).
c) For the random variable π2 the distribution series is:
π2 =
ββ 1 4 9
0, 1 0, 2 0, 7
ββ .
Generally for a function π the distribution series of π := π(π) can becomputed using the formula:
π (π = π¦) =βοΈ
π₯: π(π₯)=π¦
π (π = π₯)
adding all the probabilities π (π = π₯) for those π₯ with the property π(π₯) = π¦.In the above example the function π(π₯) = π₯2 is injective for positive values andthe sum in that formula will contain only one term. Thus, for example:
π (π = 4) =βοΈ
π₯: π₯2=4
π (π = π₯) = π (π = 2) = 0, 2
Problem 3. There are 3 traffic barriers along a street. The probabilitythat a car which drives along that street finds any of these three barriersopen is π = 0, 8. We suppose that any of these barriers work indepen-dently. Compute:a) The distribution series of the random variable which counts the numberof barriers passed until the first closed barrier met.b) Find its cummulative distributionn function.c) Which is the expected number of barriers found open before the car hasto stop in front of a closed one?
Solution: a) We denote by π the desired random variable, which has adistribution series:
π =
ββ 0 1 2 3
π0 π1 π2 π3
ββ ,
where ππ = π (π = π), π = 0, 1, 2, 3. By the way we defined the random variableone gets easily:
π0 = π (π = 0) = 0, 2
π1 = π (π = 1) = 0, 8 Β· 0, 2 = 0, 16
π2 = π (π = 2) = 0, 8 Β· 0, 8 Β· 0, 2 = 0, 128
π3 = π (π = 3) = 0, 8 Β· 0, 8 Β· 0, 8 = 0, 512
Hence:
π =
ββ 0 1 2 3
0, 2 0, 16 0, 128 0, 512
ββ .
9
b) When π₯ β€ 0 we get πΉ (π₯) := π (π < π₯) = 0 because in the interval(ββ, 0) there are no values of π.
When 0 < π₯ β€ 1 one gets:
πΉ (π₯) = π (π < π₯) = π (π = 0) = 0, 2.
When 1 < π₯ β€ 2 one gets:
πΉ (π₯) = π (π < π₯) = π (π = 0) + π (π = 1)
= 0, 2 + 0, 16 = 0, 36.
When 2 < π₯ β€ 3 one gets:
πΉ (π₯) = π (π < π₯) = π (π = 0) + π (π = 1) + π (π = 2) = 0, 2 + 0, 16 + 0, 128 = 0, 488.
When π₯ > 3 we have πΉ (π₯) = 1.Thus the cummulative distribution function of π is:
πΉ (π₯) =
β§βͺβͺβͺβͺβͺβͺβͺβͺβͺβ¨βͺβͺβͺβͺβͺβͺβͺβͺβͺβ©
0 , π₯ β€ 0
0, 2 , 0 < π₯ β€ 1
0, 36 , 1 < π₯ β€ 2
0, 488 , 2 < π₯ β€ 3
1 , 3 < π₯
.
Remark: Some authors define the cummulative distribution function asπΉ (π₯) := π (πβ€π₯) then the above result looks differently but we think in asimilar manner discussing the cases πβ€π₯ < π + 1.
c) The driver expects to find 2 barriers open because the expected value ofπ is πΈ(π) = 0 Β· 0, 2 + 1 Β· 0, 16 + 2 Β· 0, 128 + 3 Β· 0, 512 β 1.95
10
Proposed problems
Problem 1. From a lot of 100 items, of which 10 are defective a random sampleof size 5 is selected for quality control. Construct the distribution series of therandom number π of defective items contained in the sample.
Problem 2. A car has four traffic lights on its route. Each of them allows itto move ahead or stop with the probability 0.5. Sketch the distribution polygonof the probabilities of the numbers of lights passed by the car before the first stophas occurred.
Problem 3. Births in a hospital occur randomly at an average rate of 1.8 birthsper hour. What is the probability of observing 4 births in a given hour at thehospital?
Problem 4. It is known that 3% of the circuit boards from a production line aredefective. If a random sample of 120 circuit boards is taken from this productionline estimate the probability that the sample contains:
i) Exactly 2 defective boards.
ii) At least 2 defective boards.
Problem 5. Four different prizes are randomly put into boxes of cereal. One ofthe prizes is a free ticket to the local zoo. Suppose that a family of four decides tobuy this cereal until obtaining four free tickets to the zoo. What is the probabilitythat the family will have to buy 10 boxes of cereal to obtain the four free ticketsto the zoo? What is the probability that the family will have to buy 16 boxes ofcereal to obtain the four free tickets to the zoo?
Problem 6. An automatic line in a state of normal adjustment can produce adefective item with probability π. The readjustment of the line is made immedi-ately after the first defective item has been produced. Find the average numberof items produced between two readjustments of the line.
Problem 7. For two independent random variables:
π :
ββ0 1 2 3
18
38
28
28
ββ and:
π :
ββ0 1 2
12
14
14
ββ compute π + π, 2π, π(π) and show that π(ππ ) = π(π)π(π ). Computeπ£ππ(π + 2π ).
11
Problem 8. A student takes a multiple-choice test consisting of two problems.The first one has 3 possible answers and the second one has 5. The studentchooses, at random, one answer as the right one from each of the two pro-blems. Find the expected number πΈ(π) of right answers π of the student. Findthe variance π£ππ(π). Generalize.
Problem 9. The number of calls coming per minute into a hotels reservationcenter is a Poisson random variable of parameter π = 3.
(a) Find the probability that no calls come in a given 1 minute period.(b) Assume that the number of calls arriving in two different minutes are
independent. Find the probability that at least two calls will arrive in a giventwo minute period.
(c) What is the expected number of calls in a given period of 1 minute ?
Problem 10. As a result of experiments with two devices π΄ and π΅, one finds theprobability of observing a noise whose level is evaluated in a three-point system:
Noise level 1 2 3
Device A 0.20 0.06 0.04
Device B 0.06 0.04 0.10
Using the table select the device with lower noise level.
12