# A Lovely Introduction to Bivariate Probability Distribution

## Looking at a pretty little problem about two independent random variables

One of the key differences between elementary statistics and advanced statistics is that elementary statistics often focuses on a single event or random variable. In more advanced statistics, and often in real life, we practitioners have to deal with problems involving multiple events or variables, sometimes independent, sometimes not.

It’s rare that I see a problem that introduces two independent variables to students in a neat way where they can engage with how they relate to each other. Here is one I tackled recently which I thought I’d share with you all.

## The problem

Just to lay out the situation a bit more. The die can only land on one of two values, and it’s clear that the probability of it landing on A is one-quarter and the probability of it landing on B is three-quarters.

The question mentions two events. One event is that the die lands on A for its first *m* throws. This event is realized by the random variable *M*. The second event is that, when the die lands on *B *for the first time, it is the beginning of a run of *n* throws of B in a row (and no more than *n* throws of B in a row). This event is realized by the random variable *N*.

Note that, of course, *m *is allowed to be zero, meaning that there is a scenario where the die immediately lands on *B* without landing on *A *first (and of course this is the most likely scenario)*.*

The probability distribution for the combined event is pretty easy to construct. We know that each throw is independent, and so we just need to multiply the probability of each throw to get the combined probability. So if we have *m* throws that land on *A* followed by *N* throws that land on *B* followed by a final throw that lands again on *A*, then we have *m+1 *throws of *A*, each with a probability of one-quarter* *and* n* throws of *B*, each with a probability of three-quarters, so:

so, for example, the probability of 3 throws of A followed by 4 throws of B before A is thrown again is 81/65536.