38.5. COUNTING AND BASIC PROBABILITY 775

there? There are 36. Thus if every outcome is as likely as any other, the probability ofrolling a 4 is 3/36 or 1/12.

Now in a succession of rolls of the dice, the probability of a particular outcome on rollk is not affected by what happened on earlier rolls of the dice. Each time the dice are rolled,the probability of rolling a four is 1/12 and the probability rolling a non four is 11/12.

What is the probability of rolling a 5 twice in a row? In this case there would be 362

possible outcomes and only 42 of them are favorable to rolling two fives in succession.(Four possibilities for the first roll of the dice and for each of these, four for the second.)Thus the probability of this occurring is

42

362 =1

81

What about the probability of a five on the first roll and a non five on the second? Thisprobability is

436· 32

36=

881

.

You can determine this the same way by counting the ways favorable to the desired outcomeand dividing this by the number of possible outcomes.

4 ·32362 =

881

Similarly, the probability of rolling a non five followed by a five would be

3236· 4

36=

881

More generally, the probability of getting k fives and n− k non fives in a particular orderwould be (

436

)k(3236

)n−k

.

More generally, you have a situation where the probability of k success with probabilityp and (n− k) failures happening with probability q ≡ (1− p) in any particular order ispkqn−k. What is the probability of having k successes in n trials? This is known as thebinomial distribution. How many ways can k success happen in n trials? It can happen

exactly the number of ways there are of selecting k of the n trials. There are

(nk

)ways

for this to happen. Therefore, since each of these has the same probability, pkqn−k, theprobability of k successes in n trials is(

nk

)pkqn−k

This motivates the following definition of the binomial distribution and the idea of arandom variable.

Definition 38.5.1 Define a “random variable” X to be the number of successes, each hav-ing probability p in n trials. Thus X has values 0,1,· · · ,n. If the probability that X hasvalue k, written

P(X = k)