Combinatorics 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Probability Calculations

You Discover Maths


April 11, 2024

1 Expected Value
You probably already know how to calculate the expected value of an independent variable from
school. Calculating the expected value of several independent variables is no harder: you simply add
the expected values for each of the variables together. For example, we know that the expected value
of a single die is 1+2+3+4+5+6
6 = 3.5. Therefore, the expected value for n dice will be 3.5n.
However, not all variables are independent. Consider picking colours to paint 4 balls from red,
green, blue, and yellow, where multiple balls can be painted the same colour. If we want to find the
expected value of the number of unique colours, then the colours are obviously depend on each other:
if we have many red balls, then the probability of us having a green balls naturally decreases. To deal
with this situation, we can introduce a powerful tool: linearity of expectation.

1.1 Linearity of Expectation


Let us define the expected value of a variable X as E[X]. Then linearity of expectation says that
E[X + Y ] = E[X] + E[Y ]. We know that this is obviously true for independent variables: however,
the powerful part of this is that it is true for dependent variables as well. As a result, if we can define
our problem in terms of variables which are easy to calculate, we can add them up and calculate the
expected value that way.

1.2 Four Balls, Four Variaballs


We are counting the expected number of colours. One variable we can try is counting the expected
number of balls of each colour. However, this does not work: we don’t care about the number of balls
of a certain colour at all, since we are only interested in whether it appears or not. Therefore, our
variable should be binary.
Therefore, we settle on counting whether a ball of a certain colour appears in the group. Note
that this is a binary variable. As a result, if the ball of that colour appears, we let the variable be 1;
otherwise, it is 0. Therefore, the variable we want to find (the number of unique colours) is equal to
the sum of the binary variable for each colour.
Therefore we want to calculate E[no. colours] = E[R + G + B + Y ] = E[R] + E[G] + E[B] + E[Y ]
by Linearity of Expectation. Note that E[R] is equal to the probability of a red ball occurring. The
probability of a red ball not occurring is ( 34 )4 , since all the balls need to be colours other than red.
Therefore the probability of a red ball occurring is 1 − ( 43 )4 . That will also be the value of E[R].
Finishing the problem is left as an exercise for the reader.

1.3 Another Example


Five balls are arranged around a circle. Chris chooses two adjacent balls at random
and interchanges them. Then Silva does the same, with her choice of adjacent balls to
interchange being independent of Chris’s. What is the expected number of balls that occupy
their original positions after these two successive transpositions?

A common pattern in these types of questions is that we should look at the objects outlined
in the problem statement. In this case, there are five balls in the problem, so we may focus our
attention on these balls, which we’ll call b1 , b2 , b3 , b4 , and b5 . Let X1 be a variable which equals 1

1
if b1 ends in the same position as it starts, and 0 otherwise. Let X2 , X3 , X4 , and X5 be defined
similarly. We want to find the expected number of balls that are situated in their original positions, or
E[X1 + X2 + X3 + X4 + X5 ]. The key step is realising that by Linearity of Expectation, E[X1 + X2 +
X3 + X4 + X5 ] = E[X1 ] + E[X2 ] + E[X3 ] + E[X4 ] + E[X5 ]. Then, by symmetry, E[Xi ] is equal for all
1 ≤ i ≤ 5, so we only need to find E[X1 ]. To do this, notice that a ball only stays in its original position
if one of two things happen: either Chris and Silva both pick the same pair of balls (with b1 being
one of the two balls), or neither Chris nor Silva pick a pair containing b1 . The probability of the first
case happening is P (Chris picking a pair containing b1 ) × P (Silva picking the same pair as Chris) =
3 1 3
5 × 5 = 25 . The probability of the second case happening is P (Chris not picking a pair containing b1 )×
P (Silva not picking a pair containing b1 ) = 35 × 35 = 25
9
. Thus we see that the probability of b1 staying
3 9 12 12
in its original spot is 25 + 25 = 25 , so E[X1 ] = 25 . Therefore the answer to the question is E[X1 +
12
X2 + X3 + X4 + X5 ] = E[X1 ] + E[X2 ] + E[X3 ] + E[X4 ] + E[X5 ] = 5E[X1 ] = .
5

2 Geometric Probability
Sometimes, we may wish to represent probabilities related to two distinct variables on the coordinate
plane. This can be applied when the problem is phrased in terms of distance, or we are looking at the
distance between two points on a geometric object.

Alice and Bob want to meet up at a coffee shop. However, they only know that the time
to meet up is between 6pm and 7pm. Each of them will arrive at a random time between
6pm and 7pm, wait for 15 minutes, then depart if the other has not arrived by then. What
is the probability that they successfully meet up?

Note that the times of arrival are uniformly distributed along the interval. Therefore, traditional
methods of probability will not work here, as the outcomes are not discrete.
We can represent the probability space as a square. On the x-axis is the range of times Alice can
arrive, and on the y-axis is the range of times Bob can arrive. For each point, we take its coordinates
and if they fufil the condition that their difference is less than 15 minutes, we shade it in. Then note
that the region is bounded by the two lines y=x+15 and y=x-15.

Figure 1: Overlap = valid points.

2
Therefore, we simply want to calculate the area of that overlap. Since all the shapes are straight,
this is quite easy: we can subtract the area of the two triangles from the total square. We get that the
7
area of the overlap is 1 − (3/4)2 = 16 .

2.1 Weirder Shapes


Let S be a square of side length 1. Two points are chosen independently at random on the
1
sides of S. The probability that the straight-line distance between the points is at least
2
a − bπ
is , where a, b, and c are positive integers with gcd(a, b, c) = 1. What is a + b + c?
c

We will solve by doing casework. WLOG, assume that one point is on the top side. Then the other
point is either on the same side, an adjacent side, or an opposite side. We do these cases separately.
If the two points are on the same side, then note that this is similar to the problem we did before.
We want to find the probability that they are within 21 of each other, so we want to calculate the area
of the overlap, which is 1 − (1/2)2 = 34 . The probability that they are at least 12 away is therefore 41 .
If the two points are on adjacent sides, we can graph them on the xy-plane in a similar fashion to
the last problem. If they are not within 21 units of each other, we shade the point. Otherwise, the
point is left unshaded. Let the distance of one point from the corner the two pedges are adjacent to be
x, and the other be y. Then we know that the distance between them is x2 + y 2 , which must be
≥ 21 . So we want the region outside the quarter-circle with radius f rac12 centered at the origin, but
π
within the unit square. This is 1 − 16 .
If the two points are on opposite sides, they must be at least 1 away from each other, so the
probability that the distance is at least 12 is 1.
1
Therefore our total probability is 16 + 16−π 1
32 + 4 =
26−1π
32 . So a + b + c = 59.
In this problem, we defined two variables in a way such that we could place them onto a two-
dimensional plane. Of course, we knew that geometry was going to play into this solution somehow
since the problem concerned points on a square. Other problems may not be as easy to visualise, but
a large hint that we should use geometric probability if the variables we are examining are continuous.

You might also like