The goal of this post is to present an example to illustrate the law of total probability and to use this example to motivate the definition of a random variable that is a mixture. To state the finite form of the law of total probability, let be events such that

- for and

Then for any event , we have:

According to the Bayes’ theorem, . Thus the total law of probability can be stated as follows:

**Example**

In a random experiment, a box is chosen based on a coin toss. If the toss is head, Box 1 is chosen. If the toss is tail, Box 2 is chosen. Box 1 has 3 white balls and 1 red ball. Box 2 has 1 white ball and 4 red balls. The probability of the coin turning up head is 0.75. Once the box is chosen, two balls are drawn successively with replacement. Let be the number of red balls drawn. Find the probability function and the distribution function of the discrete random variable .

**Alternative Description of The Example**

We can couch the same example as a risk classification problem in insurance. For example, an auto insurer has two groups of policyholders. On the basis of historical data, the insurer has determined that the claim frequency during a policy year for a policyholder classified as good risk follows a binomial distribution with and . The claim frequency for a policyholder classified as bad risk follows a binomial distribution with and . In this block of policies, 75% are classified as good risks and 25% are classified as bad risks. A new customer, whose risk class is not yet known with certainty, has just purchased a new policy. What distribution should be used to model the claim frequency for this new customer?

**Discussion of Example**

Let be the following indicator variable.

By the law of total probability, for , we have:

.

The following calculation derives the probability function and the distribution function.

**Comment**

Note that in our example here, the unconditional probability function is a weighted sum of two conditional probability functions (based on the conditioning on the indicator variable). It also follows from the total law of probability that the unconditional distribution function is also a weighted sum of the conditional distribution functions. For , we have:

A random variable whose distribution function is the weighted sum of a family of distribution functions is called a mixture. The example is this post is called a discrete mixture since the set of weights is a discrete set. We end this post with the following definition.

**Definition of Mixtures**

Motivated by the example above, a random variable is said to be a mixture if its distribution function is of the form

for some sequence of random variables and some sequence of positive real numbers that sum to 1. The numbers are the mixing weights. In this case, is said to be a discrete mixture.

The concept of mixture (or mixing) does not need to be restricted to a countable number of distributions. We can mix a family of distributions indexed by the real numbers or some interval of real numbers and use a continuous probability density function as the mixing wieghts. A random variable is said to be a continuous mixture if

for some family of random variables and some density function . Note that the family of random variables is indexed by the real numbers or some interval of real numbers .

Mixtures arise in many settings. The notion of mixtures is important in insurance applications. For example, the claim frequency or amount of a random loss may have an uncertain risk parameter that varies from insured to insured. By mixing the conditional distribution of the claim frequency (or random loss amount) with the distribution of the uncertain risk parameter, we have a model that can describe the claim experience.

Discrete mixture arises when the risk parameter is discrete (e.g. the risk classifications is discrete). Continuous mixture is important for the situations where the risk parameter of the random loss distribution follows a continuous distribution. Examples of continuous mixtures and basic properties of mixtures will be discussed in subsequent posts (see Examples of mixtures, Basic properties of mixtures).