discrete random variables - wordpress.com
TRANSCRIPT
β 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 a highpocket 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 had J β¦ , 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 100 hands that you would play theboard after all five board cards are dealt ?
2
Discrete Random Variables
β weβll try to model mathematically different statistical (random) experi-ments, from the previous handout
Random variables= Mathematical models for random experiments
β the posibile outcomes of such an experiment will be denoted by π₯π, π β πΌ,and will be called values of a random variable π
β the probabilities corresponding to each value will form a probability massfunction (PMF) denoted ππ(π₯)
β in general, a discrete random variable will be given by its distributionseries
π :
ββπ₯π
ππ
ββ πβπΌ
where ππ(π₯π) = π (π = π₯π) = ππ means
the probability of the value(outcome) π₯π is ππ
β since all the posible outcomes are displayed in a random variable π
=ββοΈπβπΌ
ππ = 1 (because 1 means 100%)
Bernoulliβs random variable π βΌ π΅ππ(π)
β it is the simplest discrete random variableβ it models an experiment in which only two possible outcomes can occur,
often designated success, and failure.
It can be used to represent a coin toss. We consider the appearence of atail 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 π, theprobability of a success
π :
ββ 0 1
1 β π π
ββ Of course, in our example π = 1
2 and
ππ(π) =
{οΈ1 β π, if π = 0
π, if π = 1
Example:
3
οΏ½
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
π
ββ β the general form of such a random variable starts with the value π and
ends with β, thus it has ββ π + 1 possible values, denote π βΌ π°(π, β)
π :
ββ π π + 1 . . . β
1ββπ+1
1ββπ+1 . . . 1
ββπ+1
ββ with the obvious PMF
ππ(π₯) =
{οΈ1
ββπ+1 , if π₯ = π, π + 1, . . . , π
0, else
Binomial random variable π βΌ π΅ππ(π, π)
β a random variable with a binomial distribution is the right model whenthe following 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 . . . πΆπππ
πππβπ . . . ππ
ββ where π and π = 1 β π are the probabilities of a success, respectively failure ateach independent trial.
β thus
ππ(π) =
{οΈπΆπ
πππππβπ, for π β {0, 1, 2, . . . , π}
0, else
4
Geometric random variable π βΌ πΊππ(π)
β it is the appropriate model when, in a binomial experiment, we count thenumber of failures until the first success occurs.
π :
ββ0 1 . . . π . . .
π π(1 β π) . . . π(1 β π)π . . .
ββ β one can easily see
ππ(π) =
{οΈπ(1 β π)π, for π β {0, 1, 2, . . . , π}0, else
Hypergeometric random variable π βΌ π»ππ(π,π,π)
β consider the problem of drawing objects from a box which contains πobjects, 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 a de-fective object is not the same in each of those π draws, thus the number of thedefective 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 if theseevents occur with a known constant mean 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.
5
π :
ββ 0 1 . . . π . . .
πβπ π1!π
βπ . . . ππ
π! πβπ . . .
ββ β the PMF of a Poisson random variable is
ππ(π) =
{οΈππ
π! πβπ, for π β₯ 0
0, otherwise
Negative binomial random variable π βΌ ππ΅(π, π)
β is a discrete probability distribution of the number of successes, in abinomial experiment, 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 π-th trail the π-th success is...β
The expected value πΈ(π) and the variance π£ππ(π)
β the expected value provides a measure of the location or central tendencyof a random variable
πΈ(π) =βοΈπβπΌ
π₯π Β· ππ
β the variance π£ππ(π) (measure of spread) determines the degree to whichthe values of a random variable differ from the expected value
π£ππ(πΈ) =βοΈπβπΌ
(π₯π β πΈ(π₯))2 Β· ππ
β as you can see the square distances from every possible value to the ex-pected value are added proportionally to their probability
6
Solved problems
Problem 1. Three shooters shoot a target. The random variable π whichcounts 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
24b) 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.
One gets the linear systemβ§βͺβͺβͺβ¨βͺβͺβͺβ©π1 + π2 + π3 = 13
12
π1π2 + π1π3 + π2π3 = 38
π1π2π3 = 124
7
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. When someone presses SEND on a cellular phone, the phoneattempts to set up a call by transmitting a SETUP message to a nearbybase station. The phone waits for a response and if none arrives within0.5 seconds it tries again. If it doesnβt get a response after π = 6 tries thephone stops transmitting messages and generates a busy signal.
a) Draw a tree diagram that describes the call setup procedure.
b) If all transmissions are independent and the probability is p thata SETUP message will get through, what is the PMF of π, thenumber of messages transmitted in a call attempt?
c) What is the probability that the phone will generate a busy signal?
d) As manager of a cellular phone system, you want the probability ofa busy signal to be less than 0.02. If π = 0.9, what is the minimumvalue of n necessary to achieve your goal?
Solution:a) In the setup of a mobile call, the phone will send the SETUP message up
to six times. Of course, the phone stops trying as soon as there is a success.Thus we have a geometric random variable π βΌ πΊππ(π) with success probabilityp. The first value is considered to be π₯ = 1.
Using π to denote a successful response, and π a non-response, the sampletree is
b) For this geometric random variable the distribution series will be
π :
ββ1 2 3 4 5 6
π π(1 β π) π(1 β π)2 π(1 β π)3 π(1 β π)4 (1 β π)6
ββ with the PMF
ππ(π) =
β§βͺβ¨βͺβ©π(1 β π)πβ1, for π β {1, 2, . . . , 5}(1 β π)6, for π = 6
0, else
c) Let π΅ denote the event that a busy signal is given after six failed setupattempts. The probability of six consecutive failures is π (π΅) = (1 β π)6.
8
d) To be sure that π (π΅) β€ 0.02, we need to impose the restriction
π β₯ 1 β (0.02)16 β 48%
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
ββ .
b) When π₯ < 0 we get by its very definition πΉ (π₯) := π (π β€ π₯) = 0 becausein 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.
9
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
Problem 4. The number of buses that arrive at a bus stop in π minutesis a Poisson random variable π΅ with expected value π/5.
a) What is the PMF of π΅, the number of buses that arrive in π mi-nutes?
b) What is the probability that in a two-minute interval, three buseswill arrive?
c) What is the probability of no buses arriving in a 10-minute interval?
d) How much time should you allow so that with probability 0.99 atleast one bus arrives?
Solution: a) When something happens at a constant mean rate in a fixedperiod of time, it usually leads to a mathematical modelling using a Poissonrandom variable denoted by π΅ with π, that constant mean rate. In our case weexpect π/5 buses in a period of length π minutes, thus π = π
5 and by its verydefinition the PMF will be
ππ΅(π) =
{οΈ(π
5 )π
π! πβπ5 , if π β₯ 0
0, otherwise
b) Choosing π = 2 minutes, the probability that three buses arrive in a twominute interval is
ππ΅(3) =( 25 )3
3!πβ
25 β 0.0072
c) By choosing T=10 minutes, the probability of zero buses arriving in a tenminute interval is
ππ΅(0) = πβ105 = πβ2 β 0.135 β 13%
d) The probability that at least one bus arrives in π minutes is
π (π΅ β₯ 1) = 1 β π (π΅ = 0) = 1 β πβπ/5 β₯ 0.99
Rearranging yields π β₯ 5 ln 100 β 23 minutes.
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. 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.
11
Problem 8. 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 9. 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
Bibliography
[1] R. Yates and D. Goodman. Probability and Stochastic processes,Wiley&Sons, 2005.
[2] C. Ariesanu. Lecture Notes on Special Mathematics, 2020.
13