The Theory of Probability

Probability Distribution Calculator

Choose a distribution, type its parameters and the numbers in the question; decimals and fractions such as 1/6 are accepted. The calculator finds the probability, shows the formula it uses, draws the distribution with the probability shaded, and gives the expected value, the variance and the standard deviation.

$n=$ $p=$ $\lambda=$ $\mu=$ $\sigma=$ $a=$ $b=$
$x=$

What Is Probability Theory?

Probability theory is the branch of mathematics that studies random phenomena: experiments whose result cannot be predicted with certainty, although we know what results are possible. A single toss of a coin is unpredictable, but in a long series of tosses heads comes up in about half of them. Probability theory describes such regularities with numbers. When a weather forecast says that the chance of rain tomorrow is $40\%,$ it gives the probability $0.4$ of the event "rain tomorrow".

Randomness appears when the causes of a result are too many or too complicated to calculate, when the data are incomplete, or when the process itself is random, as in the thermal motion of molecules that produces noise in electronic circuits. Probability theory is the basis of statistics and is used in physics, engineering, telecommunications, finance, insurance and computer science.

On this page: Calculator · Events · Classical definition · Relative frequency · Axioms · Joint probability · Conditional probability · Bayes' formula · Independence · Random variables · Distribution and density · Expected value and variance · Functions of a random variable · Common distributions · Large numbers, CLT · Practice

Experiments, Outcomes and Events

A random experiment is an action that can be repeated under the same conditions and whose result cannot be predicted exactly: tossing a coin, rolling a die, drawing a card from a deck, measuring the lifetime of a light bulb. One performance of the experiment is called a trial, and its result is an outcome.

The sample space $\Omega$ is the set of all possible outcomes of an experiment.

An event is a set of outcomes, that is, a subset of $\Omega$ (when $\Omega$ is infinite, only the subsets of a $\sigma$-algebra, see the axioms below). The event $A$ occurs when the outcome of the trial belongs to $A.$

  • Toss a coin: $\Omega=\{H,\ T\}$ (heads or tails).
  • Roll a die: $\Omega=\{1,\ 2,\ 3,\ 4,\ 5,\ 6\}.$ The event "an even number" is $A=\{2,\ 4,\ 6\}.$ If the die shows $4,$ the event $A$ has occurred.
  • Toss a coin twice: ${\Omega}={\{HH,\ HT,\ TH,\ TT\}.}$ The event "at least one head" is $\{HH,\ HT,\ TH\}.$
  • Draw one card from a standard deck of $52$ cards (four suits ♠ ♥ ♦ ♣ with the ranks A, 2, 3, …, 10, J, Q, K in each): $\Omega$ has $52$ outcomes. The event "a spade" has $13$ outcomes, and the event "a king" has $4.$
  • Measure the waiting time for a bus in minutes: $\Omega=[0,\ \infty)$ has infinitely many outcomes.

An event with exactly one outcome, such as $\{3\}$ for the die, is called an elementary event. The whole sample space $\Omega$ is the certain event: it always occurs. The empty set $\varnothing$ is the impossible event: it never occurs.

A sample space with $n$ outcomes has $2^n$ events, because every outcome is either in the event or not. For two tosses of a coin there are $2^4=16$ events: the impossible event, the $4$ elementary events $\{HH\},$ $\{HT\},$ $\{TH\},$ $\{TT\},$ the $6$ events with two outcomes such as $\{HH,\ TT\},$ the $4$ events with three outcomes and the certain event; $1+4+6+4+1=16.$ For one card from a deck there are $2^{52}\approx 4.5\cdot 10^{15}$ events.

Operations on Events

Events are sets, so they are combined with the set operations. Let $A=\{2,\ 4,\ 6\}$ ("an even number") and $B=\{4,\ 5,\ 6\}$ ("more than $3$") for one roll of a die.

NotationNameOccurs whenExample
$A\cup B$union, "$A$ or $B$"at least one of $A,$ $B$ occurs$A\cup B=\{2,\ 4,\ 5,\ 6\}$
$A\cap B$intersection, "$A$ and $B$"both $A$ and $B$ occur$A\cap B=\{4,\ 6\}$
$\overline{A}$complement, "not $A$"$A$ does not occur$\overline{A}=\{1,\ 3,\ 5\}$
$A\setminus B$difference$A$ occurs and $B$ does not$A\setminus B=\{2\}$
$A\cap B=\varnothing$mutually exclusive (disjoint) events$A$ and $B$ cannot occur together$\{1\}$ and $\{2,\ 4\}$
$A\subseteq B$$A$ is contained in $B$whenever $A$ occurs, $B$ occurs$\{4,\ 6\}\subseteq B$
ABΩA ∪ BABΩA ∩ BAΩAABΩA ∩ B = ∅

Venn diagrams: the rectangle is the sample space $\Omega$ and the shaded part is the event.

The Classical Definition of Probability

When all outcomes of an experiment are equally likely, for example for a fair coin, a fair die or a well-shuffled deck, the probability of an event is the share of the outcomes that belong to it.

If an experiment has $n$ equally likely outcomes and $m$ of them belong to the event $A$ (the outcomes favorable to $A$), then the probability of $A$ is

$$P(A)=\frac{m}{n}$$

It follows that $0\le P(A)\le 1,$ that $P(\Omega)=1$ and that $P(\varnothing)=0.$

Example 1. A die is rolled. Find the probability of an even number and the probability of a number greater than $4.$

There are $6$ equally likely outcomes. An even number has $3$ favorable outcomes ($2,$ $4,$ $6$), so $P=\frac{3}{6}=\frac{1}{2}.$ A number greater than $4$ has $2$ favorable outcomes ($5,$ $6$), so $P=\frac{2}{6}=\frac{1}{3}.$

Example 2. A coin is tossed twice. Find the probability of at least one head.

The outcomes $HH,$ $HT,$ $TH,$ $TT$ are equally likely, and $3$ of them contain a head: $P=\frac{3}{4}.$ Note that the results "no heads", "one head" and "two heads" are not equally likely: one head can occur in two ways, $HT$ and $TH,$ so its probability is $\frac{2}{4}=\frac{1}{2}.$

Example 3. Two dice are rolled. Find the probability that the sum is $7.$

Each die has $6$ results, so there are $6\cdot 6=36$ equally likely ordered pairs. The sum $7$ comes from $(1,\ 6),$ $(2,\ 5),$ $(3,\ 4),$ $(4,\ 3),$ $(5,\ 2),$ $(6,\ 1)\text{:}$ $P=\frac{6}{36}=\frac{1}{6}.$

Example 4. One card is drawn from a deck of $52.$ Find the probability that it is a king and the probability that it is a spade.

$P(\text{king})=\frac{4}{52}=\frac{1}{13}$ and $P(\text{spade})=\frac{13}{52}=\frac{1}{4}.$

When the outcomes are hard to list, they are counted with combinations. The number of ways to choose $k$ objects out of $n$ is $\binom{n}{k}=\frac{n!}{k!\,(n-k)!}.$

Example 5. Two cards are drawn at random at the same time from a deck. Find the probability that both are aces.

There are $\binom{52}{2}=\frac{52\cdot 51}{2}=1326$ equally likely pairs of cards, and $\binom{4}{2}=6$ of them consist of two aces: ${P}={\frac{6}{1326}}={\frac{1}{221}}\approx{0.0045.}$

Relative Frequency

The classical definition needs equally likely outcomes. For a loaded die, or for the event "a light bulb works for more than $1000$ hours", there are no such outcomes. Then the probability has to be estimated from experiments. Suppose the experiment is repeated $n$ times and the event $A$ occurs $n_A$ times. The ratio $\frac{n_A}{n}$ is the relative frequency of $A.$ In a long series of trials it settles down near a fixed number, and this number is the probability of $A\text{:}$

$P(A)=\lim\limits_{n\to\infty}\frac{n_A}{n}$

0.5111010010000number of tosses nrelative frequency of heads

The relative frequency of heads in one series of $1000$ tosses of a fair coin. It fluctuates strongly at first and then settles near $0.5.$

Example 6. A card is drawn from a full deck, the card is recorded and put back; this is repeated $10{,}000$ times. Suppose the three of spades came up $188$ times and a spade came up $2512$ times. Then the relative frequencies are $\frac{188}{10{,}000}=0.0188$ and $\frac{2512}{10{,}000}=0.2512.$ They are close to the classical probabilities $\frac{1}{52}\approx 0.0192$ and $\frac{1}{4}=0.25.$

The limit above is not a definition in the strict sense: no one can repeat an experiment infinitely many times, and a different series gives different frequencies. It is the law of large numbers, a theorem proved from the axioms (see the end of this page), that proves that the frequencies approach the probability. In practice the relative frequency of a long series is used as an estimate of the probability, for example in insurance and quality control.

Relative frequencies have three simple properties: $\frac{n_A}{n}\ge 0,$ $\frac{n_\Omega}{n}=\frac{n}{n}=1,$ and for two events that cannot occur together ${\frac{n_{A\cup B}}{n}}={\frac{n_A+n_B}{n}}={\frac{n_A}{n}+\frac{n_B}{n}.}$ These properties become the axioms of probability.

The Axioms of Probability

In 1933 A. N. Kolmogorov built the modern theory on set theory and measure theory. It does not say how to find probabilities; it says what rules every probability must obey. A probability space is a triple $(\Omega,\ \mathcal{F},\ P),$ where $\Omega$ is the sample space, $\mathcal{F}$ is the collection of events and $P$ is a function that gives every event $A$ a number $P(A).$

The axioms of probability

  1. $P(A)\ge 0$ for every event $A.$
  2. $P(\Omega)=1.$
  3. If the events $A_1,$ $A_2,$ $A_3,$ … are pairwise mutually exclusive, then ${P(A_1\cup A_2\cup\ldots)}={P(A_1)+P(A_2)+\ldots}$

Taking $A_1=A_2=\ldots=\varnothing$ in axiom 3 shows that $P(\varnothing)=0.$ So axiom 3 also holds for finitely many pairwise mutually exclusive events: ${P(A_1\cup\ldots\cup A_n)}={P(A_1)+\ldots+P(A_n).}$

When $\Omega$ is finite, every subset of $\Omega$ can be an event. For an infinite sample space such as the real line, not every subset can be given a probability in a consistent way, so $\mathcal{F}$ is a smaller collection, a $\sigma$-algebra. It contains $\Omega,$ the complement of each of its sets and the union of every sequence of its sets. All events met in practice, such as intervals, belong to it.

When the outcomes are equally likely, the classical definition follows from the axioms. Take two tosses of a coin with equally likely outcomes. The four elementary events are mutually exclusive and their union is $\Omega,$ so by axiom 2 and the additivity for finitely many events

${P(\{HH\})}+{P(\{HT\})}+{P(\{TH\})+P(\{TT\})}={P(\Omega)}={1}$

The four probabilities are equal, so each is $\frac{1}{4}.$ By additivity an event with two outcomes has probability $\frac{1}{4}+\frac{1}{4}=\frac{1}{2},$ and an event with three outcomes has probability $\frac{3}{4}.$ In the same way, if $n$ outcomes are equally likely, an event with $m$ outcomes has the probability $\frac{m}{n}.$

Properties of Probability

These rules follow from the axioms:

  • $P(\varnothing)=0.$
  • $P(\overline{A})=1-P(A),$ because $A$ and $\overline{A}$ are mutually exclusive and $A\cup\overline{A}=\Omega.$
  • If $A\subseteq B,$ then $P(A)\le P(B).$ In particular $0\le P(A)\le 1.$

The addition rule. For any two events

${P(A\cup B)}={P(A)+P(B)}-{P(A\cap B)}$

For mutually exclusive events ${P(A\cup B)}={P(A)+P(B).}$

In $P(A)+P(B)$ the outcomes of $A\cap B$ are counted twice, so $P(A\cap B)$ is subtracted once. For three events the formula is

${P(A\cup B\cup C)}={P(A)+P(B)+P(C)}-{P(A\cap B)-P(A\cap C)}-{P(B\cap C)+P(A\cap B\cap C)}$

Example 7. A card is drawn from a deck. Find the probability that it is a spade or a face card (a jack, a queen or a king).

There are $13$ spades and $12$ face cards, and $3$ cards are both (the jack, queen and king of spades):

${P}={\frac{13}{52}+\frac{12}{52}-\frac{3}{52}}={\frac{22}{52}}={\frac{11}{26}}\approx{0.423}$

Example 8. A coin is tossed three times. Find the probability of at least one head.

The complement "no heads" is the single outcome $TTT$ out of $2^3=8$ equally likely outcomes. So $P=1-\frac{1}{8}=\frac{7}{8}.$ When an event is described by "at least one", its complement is usually easier to count.

Joint Probability

The probability that two events $A$ and $B$ both occur, $P(A\cap B),$ is called their joint probability. It is also written $P(A,\ B)$ or $P(AB).$

Example 9. A card is drawn from a deck. Let $A$ be "a red card" and $B$ be "a king". Find $P(A\cap B)$ and $P(A\cup B).$

The red kings are the king of hearts and the king of diamonds, so $P(A\cap B)=\frac{2}{52}=\frac{1}{26}.$ By the addition rule

${P(A\cup B)}={\frac{26}{52}+\frac{4}{52}-\frac{2}{52}}={\frac{28}{52}}={\frac{7}{13}}$

Example 10. In a class of $30$ students, $18$ study French, $12$ study German and $5$ study both languages. A student is chosen at random. Let $F$ be "studies French" and $G$ be "studies German".

The joint probability is $P(F\cap G)=\frac{5}{30}=\frac{1}{6}.$ The probability that the student studies at least one of the languages is ${P(F\cup G)}={\frac{18+12-5}{30}}={\frac{25}{30}}={\frac{5}{6},}$ so the probability of neither language is $1-\frac{5}{6}=\frac{1}{6}.$

Conditional Probability

Information about the outcome can change the probability of an event. A die is rolled and we learn that the number is even. What is now the probability that it is greater than $3?$ Only the outcomes $2,$ $4,$ $6$ remain possible, and they are still equally likely. Two of them, $4$ and $6,$ are greater than $3,$ so the answer is $\frac{2}{3}$ instead of $\frac{1}{2}$ without the information.

The conditional probability of $A$ given $B$ (the probability of $A$ when it is known that $B$ has occurred, where $P(B)\gt 0$) is

$$P(A\mid B)=\frac{P(A\cap B)}{P(B)}$$

For the die, $A=\{4,\ 5,\ 6\},$ $B=\{2,\ 4,\ 6\}$ and $A\cap B=\{4,\ 6\},$ so ${P(A\mid B)}={\frac{2/6}{3/6}}={\frac{2}{3}}.$ When the outcomes are equally likely, $P(A\mid B)$ is the number of outcomes in $A\cap B$ divided by the number of outcomes in $B\text{:}$ the sample space shrinks to $B.$ If $P(B)=0,$ the conditional probability is not defined by this formula.

Example 11. In the class of Example 10, a student is chosen at random from those who study French. Find the probability that this student also studies German. Then find the probability that a student of German also studies French.

${P(G\mid F)}={\frac{P(G\cap F)}{P(F)}}={\frac{5/30}{18/30}}={\frac{5}{18},\qquad P(F\mid G)}={\frac{5/30}{12/30}}={\frac{5}{12}}$

The two conditional probabilities are different: in general $P(A\mid B)\ne P(B\mid A).$

Example 12. A card is drawn and we learn that it is a spade. Find the probability that it is a face card.

Among the $13$ spades there are $3$ face cards, so $P=\frac{3}{13}.$ With the formula: $\frac{3/52}{13/52}=\frac{3}{13}.$

The Multiplication Rule

Multiplying the definition of conditional probability by $P(B)$ gives a rule for the probability that both events occur. It is used when an experiment happens in stages.

${P(A\cap B)}={P(A)\,P(B\mid A)}={P(B)\,P(A\mid B)}$

(the first form when $P(A)\gt 0,$ the second when $P(B)\gt 0$). For three events with $P(A\cap B)\gt 0\text{:}$ ${P(A\cap B\cap C)}={P(A)\,P(B\mid A)\,P(C\mid A\cap B).}$

Example 13. Two cards are drawn one after the other without putting the first back. Find the probability that both are aces.

The first card is an ace with probability $\frac{4}{52}.$ If it is, $3$ aces are left among $51$ cards:

${P}={\frac{4}{52}\cdot\frac{3}{51}}={\frac{12}{2652}}={\frac{1}{221}}$

This is the result of Example 5, found in a different way.

Example 14. A box contains $5$ red and $3$ blue balls. Two balls are drawn without replacement. Find the probability that the first is red and the second is blue, and the probability that the two balls have different colors.

${P(\text{red, then blue})}={\frac{5}{8}\cdot\frac{3}{7}}={\frac{15}{56}}$

The colors are different when the balls are red and then blue, or blue and then red. These two events are mutually exclusive, so their probabilities are added:

${P}={\frac{5}{8}\cdot\frac{3}{7}+\frac{3}{8}\cdot\frac{5}{7}}={\frac{30}{56}}={\frac{15}{28}}$

The Law of Total Probability

The events $B_1,$ $B_2,$ …, $B_n$ form a partition of the sample space if they are pairwise mutually exclusive, their union is $\Omega$ and $P(B_i)\gt 0$ for every $i\text{:}$ exactly one of them occurs in every trial. Then every event $A$ splits into the mutually exclusive parts $A\cap B_1,$ …, $A\cap B_n,$ and the multiplication rule gives

${P(A)}={P(B_1)\,P(A\mid B_1)}+{P(B_2)\,P(A\mid B_2)}+{\ldots+P(B_n)\,P(A\mid B_n)}$

Example 15. A factory has two machines. Machine 1 makes $60\%$ of the parts and $2\%$ of its parts are defective. Machine 2 makes $40\%$ of the parts and $5\%$ of its parts are defective. Find the probability that a randomly chosen part is defective.

Let $B_1$ and $B_2$ be "made by machine 1" and "made by machine 2", and $D$ be "defective". The tree diagram shows the probabilities at each stage. The probability of a path is the product of the probabilities along it.

0.60.40.020.980.050.95B1B2D0.012D0.588D0.020D0.380

${P(D)}={0.6\cdot 0.02}+{0.4\cdot 0.05}={0.012+0.020}={0.032}$

So $3.2\%$ of all parts are defective.

Bayes' Formula

Often we know $P(A\mid B_i)$ but need the reverse probability $P(B_i\mid A)\text{:}$ a part is defective; which machine most likely made it? The definition of conditional probability and the law of total probability give Bayes' formula:

$$P(B_i\mid A)=\frac{P(B_i)\,P(A\mid B_i)}{P(A)}$$

where $P(A)\gt 0$ is found by the law of total probability.

The probabilities $P(B_i)$ are called the prior probabilities (before the trial), and $P(B_i\mid A)$ the posterior probabilities (after we learn that $A$ has occurred).

Example 16. In Example 15 a randomly chosen part turned out to be defective. Find the probability that it was made by machine 2.

${P(B_2\mid D)}={\frac{0.4\cdot 0.05}{0.032}}={\frac{0.020}{0.032}}={0.625}$

Machine 2 makes fewer parts than machine 1, but a defective part most likely came from it.

Example 17. A disease affects $1\%$ of the population. A test detects the disease in $99\%$ of sick people, but it is also positive for $5\%$ of healthy people. A person's test is positive. Find the probability that the person is sick.

Let $S$ be "sick" and $T$ be "positive test". Then $P(S)=0.01,$ $P(T\mid S)=0.99,$ $P(\overline{S})=0.99,$ $P(T\mid\overline{S})=0.05\text{:}$

${P(S\mid T)}={\frac{0.01\cdot 0.99}{0.01\cdot 0.99+0.99\cdot 0.05}}={\frac{0.0099}{0.0099+0.0495}}={\frac{0.0099}{0.0594}}={\frac{1}{6}}\approx{0.17}$

Only one positive result in six belongs to a sick person. The disease is rare, so the healthy people with a false positive result outnumber the sick people. This is why a positive screening test is usually checked with a second test.

Independent Events

Two events are independent when the occurrence of one does not change the probability of the other: $P(A\mid B)=P(A).$ By the multiplication rule this means $P(A\cap B)=P(A)\,P(B).$ This form is used as the definition, because it also works when a probability is $0.$

The events $A$ and $B$ are independent if

$$P(A\cap B)=P(A)\,P(B)$$

If $A$ and $B$ are independent, then so are $A$ and $\overline{B},$ $\overline{A}$ and $B,$ $\overline{A}$ and $\overline{B}.$ Several events $A_1,$ …, $A_n$ are independent if for every choice of two or more of them the probability of their intersection equals the product of their probabilities; it is not enough that every two of them are independent. In particular, for independent events

${P(A_1\cap A_2\cap\ldots\cap A_n)}={P(A_1)\,P(A_2)\cdots P(A_n)}$

Example 18. A coin is tossed and a die is rolled. Find the probability of heads and a six.

The coin and the die do not affect each other, so $P=\frac{1}{2}\cdot\frac{1}{6}=\frac{1}{12}.$ Counting gives the same: $1$ favorable outcome out of $2\cdot 6=12.$

Example 19. A card is drawn. Are the events "a spade" and "an ace" independent? And "a spade" and "a black card"?

$P(\text{spade})=\frac{1}{4},$ $P(\text{ace})=\frac{1}{13}$ and ${P(\text{ace of spades})}={\frac{1}{52}}={\frac{1}{4}\cdot\frac{1}{13},}$ so these events are independent: knowing the suit says nothing about the rank. But ${P(\text{spade and black})}={P(\text{spade})}={\frac{1}{4},}$ while ${P(\text{spade})\,P(\text{black})}={\frac{1}{4}\cdot\frac{1}{2}}={\frac{1}{8}.}$ These events are dependent: a black card is a spade with probability $\frac{1}{2}.$

Do not confuse independent events with mutually exclusive events. If $A$ and $B$ are mutually exclusive and both have positive probabilities, they are dependent: when $A$ occurs, we know that $B$ did not, so ${P(A\cap B)}={0}\ne{P(A)\,P(B).}$

Example 20. A die is rolled $4$ times. Find the probability of at least one six.

The rolls are independent. The probability of no six in four rolls is $\left(\frac{5}{6}\right)^4=\frac{625}{1296},$ so

${P}={1-\frac{625}{1296}}={\frac{671}{1296}}\approx{0.518}$

Example 21. A device has three independent parts, and each part works with probability $0.9.$ Find the probability that the device works if the parts are connected in series (all must work) and if they are connected in parallel (one working part is enough).

In series: $P=0.9^3=0.729.$ In parallel the device fails only when all three parts fail: $P=1-0.1^3=0.999.$

Random Variables

Outcomes such as $HT$ or "the king of spades" are not numbers, so we cannot add them or find their average. A random variable turns every outcome into a number.

A random variable is a function $X\colon\Omega\to\mathbb{R}$ that assigns a real number $X(\omega)$ to every outcome $\omega$ and for which ${\{X}\le{x\}}={\{\omega\in\Omega : X(\omega)}\le{x\}}$ is an event for every real number $x.$

When $\Omega$ is finite and every subset is an event, every function $X\colon\Omega\to\mathbb{R}$ is a random variable.

Despite its name, a random variable is neither random nor a variable: it is an ordinary function. The randomness is in the outcome $\omega$ to which the function is applied. The argument $\omega$ is usually not written, and we write $X$ instead of $X(\omega).$

Example 22. A coin is tossed twice, and $X$ is the number of heads: $X(HH)=2,$ $X(HT)=X(TH)=1,$ $X(TT)=0.$

Example 23. A card is drawn, and $S$ is the number of the suit: $S=1$ for a spade, $2$ for a club, $3$ for a diamond and $4$ for a heart. Many outcomes can get the same number: all $13$ spades give $S=1.$

Statements about a random variable are events. For example, $\{X=1\}$ is the event $\{HT,\ TH\}$ and $\{X\le 1\}$ is the event $\{HT,\ TH,\ TT\}.$ So they have probabilities: $P(X=1)=\frac{2}{4}=\frac{1}{2}.$

A random variable is discrete if its values can be listed: a finite list or a sequence $x_1,$ $x_2,$ … It is continuous if it has a density (see below), such as the waiting time for a bus or the noise voltage in a circuit.

The Distribution of a Discrete Random Variable

A discrete random variable is described by its values and their probabilities $p_k=P(X=x_k).$ This list is its probability distribution (the probability mass function). The probabilities are nonnegative and their sum is $1\text{:}$ $\sum_k p_k=1.$

For the number of heads in two tosses (Example 22):

$x_k$$0$$1$$2$
$p_k$$\frac{1}{4}$$\frac{1}{2}$$\frac{1}{4}$

Example 24. For the suit number $S$ of Example 23, find $P(S=1),$ $P(S=2.5)$ and $P(2\le S\le 3).$

Each suit has $13$ of the $52$ cards, so $P(S=k)=\frac{1}{4}$ for $k=1,$ $2,$ $3,$ $4.$ No card gives $S=2.5,$ so ${P(S=2.5)}={P(\varnothing)}={0.}$ The event $\{2\le S\le 3\}$ is "a club or a diamond", so ${P(2\le S\le 3)}={\frac{1}{4}+\frac{1}{4}}={\frac{1}{2}.}$

Random variables $X$ and $Y$ are independent if ${P(X\le x,\ Y\le y)}={P(X\le x)\,P(Y\le y)}$ for all numbers $x$ and $y.$ For discrete random variables this means ${P(X=x_i,\ Y=y_j)}={P(X=x_i)\,P(Y=y_j)}$ for all their values. In the same way, $X_1,$ …, $X_n$ are independent if ${P(X_1\le x_1,\ \ldots,\ X_n\le x_n)}={P(X_1\le x_1)\cdots P(X_n\le x_n)}$ for all numbers $x_1,$ …, $x_n.$ For example, the results of separate rolls of a die are independent.

The Distribution Function and the Probability Density

The cumulative distribution function (CDF), or simply the distribution function, of a random variable $X$ is

$$F(x)=P(X\le x),\qquad x\in\mathbb{R}$$

Every distribution function has these properties:

  • $0\le F(x)\le 1$ and $F$ is nondecreasing: if $x_1\lt x_2,$ then $F(x_1)\le F(x_2).$
  • $F(x)\to 0$ as $x\to-\infty$ and $F(x)\to 1$ as $x\to+\infty.$
  • $F$ is continuous from the right.
  • ${P(a\lt X\le b)}={F(b)-F(a)}$ for $a\lt b.$

For a discrete random variable, $F$ is a step function: it jumps by $p_k$ at each value $x_k.$ For the number of heads in two tosses

$$F(x)=\begin{cases}0, & x\lt 0,\\ \frac{1}{4}, & 0\le x\lt 1,\\ \frac{3}{4}, & 1\le x\lt 2,\\ 1, & x\ge 2.\end{cases}$$ 1/41/21/41/21/4012xpk1/43/41120xF(x)

The distribution of the number of heads in two tosses (left) and its distribution function (right). At each jump the filled dot shows the value of $F.$

Continuous Random Variables and the Density

A random variable $X$ is continuous if its distribution function can be written as an integral of a nonnegative function $f,$ the probability density function (PDF):

$$F(x)=\int_{-\infty}^{x}f(t)\,dt$$

and $F'(x)=f(x)$ at every point where $f$ is continuous. Also

$$f(x)\ge 0,\qquad \int_{-\infty}^{\infty}f(x)\,dx=1$$

${P(a\le X\le b)}={\int_a^b f(x)\,dx}={F(b)-F(a)\quad (a\lt b)}$

So a probability is an area under the graph of the density. For a continuous random variable $P(X=a)=0$ for every number $a$ (the area over a single point is $0$), so it does not matter whether the ends of an interval are included: ${P(a\le X\le b)}={P(a\lt X\lt b).}$ The value $f(x)$ itself is not a probability and can be greater than $1;$ at a point where $f$ is continuous, for a small $\Delta x$ the probability that $X$ falls between $x$ and $x+\Delta x$ is approximately $f(x)\,\Delta x.$

Example 25. A random variable $X$ has the density $f(x)=cx$ for $0\le x\le 2$ and $f(x)=0$ otherwise. Find $c,$ the distribution function and $P(1\le X\le 2).$

The total area must be $1\text{:}$ ${\int_0^2 cx\,dx}={c\cdot\frac{2^2}{2}}={2c}={1,}$ so $c=\frac{1}{2}.$ For $0\le x\le 2$ the distribution function is $F(x)=\int_0^x\frac{t}{2}\,dt=\frac{x^2}{4};$ it is $0$ for $x\lt 0$ and $1$ for $x\gt 2.$ Then

${P(1\le X\le 2)}={F(2)-F(1)}={1-\frac{1}{4}}={\frac{3}{4}}$

0.511203/4f(x) = x/2x

Expected Value, Variance and Moments

A distribution is often summarized by a few numbers: its center (the expected value) and its spread (the variance and the standard deviation). They can be useful even when the whole distribution is not known.

The expected value (the mean) of a random variable $X$ is

$$E(X)=\sum_k x_k\,p_k\quad\text{(discrete)}$$ $$E(X)=\int_{-\infty}^{\infty}x\,f(x)\,dx\quad\text{(continuous)}$$

provided the series or the integral converges absolutely: $\sum_k |x_k|\,p_k\lt\infty$ or $\int_{-\infty}^{\infty}|x|\,f(x)\,dx\lt\infty.$

By the law of large numbers, the average of the values of $X$ in a long series of trials approaches $E(X).$ The expected value is also the center of mass of the distribution. It is also written $\mu$ or $m_X.$ Not every random variable has an expected value: for the density $f(x)=\frac{1}{\pi(1+x^2)}$ the integral $\int_{-\infty}^{\infty}|x|\,f(x)\,dx$ diverges.

Example 26. Find the expected value of the number on a die and of the number of heads in two tosses.

${E}={1\cdot\frac{1}{6}+2\cdot\frac{1}{6}}+{\ldots+6\cdot\frac{1}{6}}={\frac{21}{6}}={3.5,\qquad E(X)}={0\cdot\frac{1}{4}+1\cdot\frac{1}{2}+2\cdot\frac{1}{4}}={1}$

A die never shows $3.5\text{:}$ the expected value does not have to be a possible value.

Example 27. Find $E(X)$ for the density $f(x)=\frac{x}{2}$ on $[0,\ 2]$ of Example 25.

${E(X)}={\int_0^2 x\cdot\frac{x}{2}\,dx}={\left.\frac{x^3}{6}\right|_0^2}={\frac{8}{6}}={\frac{4}{3}}$

For a function $g(X)$ of a random variable, the expected value is found from the distribution of $X;$ the distribution of $g(X)$ is not needed:

${E\big(g(X)\big)}={\sum_k g(x_k)\,p_k,\qquad E\big(g(X)\big)}={\int_{-\infty}^{\infty}g(x)\,f(x)\,dx}$

The expected value is linear: ${E(aX+b)}={a\,E(X)+b,}$ and ${E(X+Y)}={E(X)+E(Y)}$ for any two random variables that have expected values. If $X$ and $Y$ are independent, then also $E(XY)=E(X)\,E(Y).$

Variance and Standard Deviation

The variance of $X$ with $E(X)=\mu$ is the expected value of the squared deviation from the mean, and the standard deviation is its square root:

${\operatorname{Var}(X)}={E\big((X-\mu)^2\big)}={E(X^2)-\mu^2}$

$$\sigma=\sqrt{\operatorname{Var}(X)}$$

The variance is also written $\sigma^2$ or $D(X).$ The standard deviation is measured in the same units as $X.$ The second form of the formula comes from expanding the square: ${E(X^2-2\mu X+\mu^2)}={E(X^2)-2\mu^2+\mu^2.}$ The variance has the properties ${\operatorname{Var}(aX+b)}={a^2\operatorname{Var}(X)}$ and ${\operatorname{Var}(X+Y)}={\operatorname{Var}(X)+\operatorname{Var}(Y)}$ for independent $X$ and $Y.$

Example 28. Find the variance and the standard deviation of the number on a die.

${E(X^2)}={\frac{1+4+9+16+25+36}{6}}={\frac{91}{6},\qquad \operatorname{Var}(X)}={\frac{91}{6}-3.5^2}={\frac{91}{6}-\frac{49}{4}}={\frac{35}{12}}\approx{2.92}$

So $\sigma=\sqrt{35/12}\approx 1.71.$

Example 29. A random variable has the triangular density $f(x)=1+x$ for $-1\le x\le 0,$ $f(x)=1-x$ for $0\lt x\le 1$ and $f(x)=0$ otherwise. Find $E(X),$ $\operatorname{Var}(X)$ and $E(X+\nobreak \pi).$

The density is symmetric about $0,$ so $E(X)=0.$ Then

${\operatorname{Var}(X)}={E(X^2)}={\int_{-1}^{0}x^2(1+x)\,dx}+{\int_0^1 x^2(1-x)\,dx}={\frac{1}{12}+\frac{1}{12}}={\frac{1}{6}}$

By linearity ${E(X+\pi)}={E(X)+\pi}={\pi.}$

Moments

The $n$-th moment of $X$ is $E(X^n),$ and the $n$-th central moment is $E\big((X-\nobreak \mu)^n\big),$ when they exist:

$E(X^n)=\int_{-\infty}^{\infty}x^n f(x)\,dx$

${E\big((X-\mu)^n\big)}={\int_{-\infty}^{\infty}(x-\mu)^n f(x)\,dx}$

(with sums instead of integrals for a discrete random variable). The expected value is the first moment and the variance is the second central moment. The third and the fourth central moments, divided by $\sigma^3$ and $\sigma^4,$ give the skewness (asymmetry) and the kurtosis (heaviness of the tails) of a distribution.

Functions of a Random Variable

If $X$ is a random variable and $g$ is a function, then $Y=g(X)$ is a new random variable with its own distribution. Its distribution function is found from the event $\{Y\le y\},$ written in terms of $X\text{:}$

${F_Y(y)}={P(Y\le y)}={P\big(g(X)\le y\big)}$

The density is then $f_Y(y)=F_Y'(y).$ If $X$ is continuous and $g$ is strictly increasing and differentiable, with the inverse function $g^{-1},$ then for every $y$ in the range of $g$ we have ${\{g(X)}\le{y\}}={\{X}\le{g^{-1}(y)\},}$ so

$$F_Y(y)=F_X\big(g^{-1}(y)\big)$$ $$f_Y(y)=f_X\big(g^{-1}(y)\big)\cdot\left|\big(g^{-1}\big)'(y)\right|$$

Outside the range of $g,$ $f_Y(y)=0.$ The density formula with the absolute value also holds when $g$ is strictly decreasing; then ${F_Y(y)}={1-F_X\big(g^{-1}(y)\big).}$

Examples

Example 30. $X$ is uniformly distributed on $[0,\ 1]\text{:}$ $f_X(x)=1$ for $0\le x\le 1$ and $0$ otherwise, so $F_X(x)=x$ on $[0,\ 1].$ Find the distribution of $Y=2X+1.$

The event $\{Y\le y\}$ is ${\{2X+1}\le{y\}}={\left\{X\le\frac{y-1}{2}\right\},}$ so $F_Y(y)=F_X\left(\frac{y-1}{2}\right).$ For example ${F_Y(2)}={F_X(0.5)}={0.5}$ and $F_Y(3)=F_X(1)=1.$ Altogether

$$F_Y(y)=\begin{cases}0, & y\lt 1,\\ \frac{y-1}{2}, & 1\le y\le 3,\\ 1, & y\gt 3,\end{cases}$$ $$f_Y(y)=\begin{cases}\frac{1}{2}, & 1\le y\le 3,\\ 0 & \text{otherwise.}\end{cases}$$

So $Y$ is uniformly distributed on $[1,\ 3].$ The formula for an increasing $g$ gives the same: $g^{-1}(y)=\frac{y-1}{2}$ and ${f_Y(y)}={f_X\left(\frac{y-1}{2}\right)\cdot\frac{1}{2}}={\frac{1}{2}}$ for $1\le y\le 3.$

Example 31. $X$ is uniformly distributed on $[-1,\ 1]\text{:}$ $f_X(x)=\frac{1}{2}$ there and $F_X(x)=\frac{x+1}{2}$ for $-1\le x\le 1.$ Find the distribution of $Y=X^2.$

The function $x^2$ is not monotonic on $[-1,\ 1],$ so the formula for a monotonic $g$ cannot be used; we work with the event directly. For $y\lt 0$ the event $\{X^2\le y\}$ is impossible, so $F_Y(y)=0.$ For $y\ge 0$

${F_Y(y)}={P(X^2\le y)}={P\left(-\sqrt{y}\le X\le\sqrt{y}\right)}={F_X(\sqrt{y})-F_X(-\sqrt{y})}$

−√y√yyx²xX² ≤ y

Here this is ${\frac{\sqrt{y}+1}{2}-\frac{1-\sqrt{y}}{2}}={\sqrt{y}}$ when $0\le y\le 1,$ and $1$ when $y\gt 1.$ Differentiating:

$f_Y(y)=\frac{1}{2\sqrt{y}}$ for $0\lt y\le 1,$ and $f_Y(y)=0$ otherwise.

For any continuous $X,$ differentiating $F_X(\sqrt{y})-F_X(-\sqrt{y})$ gives ${f_Y(y)}={\frac{f_X(\sqrt{y})+f_X(-\sqrt{y})}{2\sqrt{y}}}$ for $y\gt 0.$

Common Probability Distributions

A few distributions appear again and again, because they describe typical random situations. You can compute the probabilities below with the calculator at the top of this page.

The Binomial Distribution

An experiment with two possible results, "success" with probability $p$ and "failure" with probability $q=1-p,$ is repeated $n$ times independently (Bernoulli trials). The number of successes $X$ has the binomial distribution:

For $k=0,$ $1,$ …, $n$

$$P(X=k)=\binom{n}{k}p^k q^{n-k}$$ $$E(X)=np,\qquad \operatorname{Var}(X)=npq$$

The factor $p^kq^{n-k}$ is the probability of one particular order of $k$ successes and $n-k$ failures, and $\binom{n}{k}$ is the number of such orders.

Example 32. A coin is tossed $10$ times. Find the probability of exactly $5$ heads.

${P(X=5)}={\binom{10}{5}\cdot 0.5^5\cdot 0.5^5}={\frac{252}{1024}}={\frac{63}{256}}\approx{0.246}$

Exactly half heads is the most likely result, but its probability is less than $\frac{1}{4}.$

Example 33. A test has $5$ questions, each with $4$ answers of which one is correct. A student guesses every answer. Find the probability of at least $4$ correct answers.

Here $n=5,$ $p=\frac{1}{4}$ and $q=\frac{3}{4}\text{:}$

${P(X\ge 4)}={\binom{5}{4}\left(\frac{1}{4}\right)^4\cdot\frac{3}{4}+\left(\frac{1}{4}\right)^5}={\frac{15}{1024}+\frac{1}{1024}}={\frac{1}{64}}\approx{0.016}$

On average the student guesses $E(X)=np=\frac{5}{4}$ answers correctly.

The Poisson Distribution

The number of arrivals that occur independently and at a constant average rate in a fixed time interval, such as calls to a call center in a minute or radioactive decays in a second, has the Poisson distribution with parameter $\lambda\gt 0,$ the average number of arrivals:

For $k=0,$ $1,$ $2,$ …

$$P(X=k)=\frac{\lambda^k}{k!}\,e^{-\lambda}$$ $$E(X)=\lambda,\qquad \operatorname{Var}(X)=\lambda$$

Example 34. A call center receives on average $3$ calls per minute, and the number of calls in a minute has the Poisson distribution. Find the probability of no calls in a minute and of at most $2$ calls.

${P(X=0)}={e^{-3}}\approx{0.0498,\qquad P(X\le 2)}={e^{-3}\left(1+3+\frac{3^2}{2!}\right)}={8.5\,e^{-3}}\approx{0.423}$

The Poisson distribution approximates the binomial distribution with a large $n$ and a small $p,$ with $\lambda=np$ (the law of rare events).

Example 35. Each item made on a production line is defective with probability $0.002,$ independently of the other items. Find the probability that a batch of $1000$ items has no defective item.

Exactly, by the binomial distribution: $0.998^{1000}\approx 0.1351.$ With the Poisson approximation, $\lambda=1000\cdot 0.002=2$ and ${P(X=0)}\approx{e^{-2}}\approx{0.1353.}$

The Uniform Distribution

A random variable that is equally likely to fall anywhere in an interval $[a,\ b]$ has the uniform distribution. Its density is constant on the interval:

$$f(x)=\begin{cases}\frac{1}{b-a}, & a\le x\le b,\\ 0 & \text{otherwise,}\end{cases}$$ $$F(x)=\begin{cases}0, & x\lt a,\\ \frac{x-a}{b-a}, & a\le x\le b,\\ 1, & x\gt b\end{cases}$$ $$E(X)=\frac{a+b}{2}$$ $$\operatorname{Var}(X)=\frac{(b-a)^2}{12}$$

The probability of a subinterval is its length divided by $b-a.$ In engineering, an unknown phase of a signal is modeled as a random variable uniformly distributed on $[0,\ 2\pi].$

Example 36. A bus comes every $15$ minutes, and a passenger arrives at the stop at a random time. Find the probability of waiting more than $10$ minutes, and the average waiting time.

The waiting time is uniform on $[0,\ 15]\text{:}$ ${P(X\gt 10)}={\frac{15-10}{15}}={\frac{1}{3}}$ and $E(X)=\frac{0+15}{2}=7.5$ minutes.

The Exponential Distribution

The lifetime of a device that does not wear out, or the waiting time between two consecutive arrivals counted by the Poisson distribution (for example, between two calls), has the exponential distribution with parameter (rate) $\lambda\gt 0\text{:}$

For $x\ge 0$ (for $x\lt 0$ both functions are $0$):

$$f(x)=\lambda e^{-\lambda x},\qquad F(x)=1-e^{-\lambda x}$$ $$E(X)=\frac{1}{\lambda},\qquad \operatorname{Var}(X)=\frac{1}{\lambda^2}$$
0.511.5212340λ = 0.5λ = 1λ = 2xf(x)

The exponential distribution is memoryless: ${P(X\gt s+t\mid X\gt s)}={P(X\gt t)}$ for all $s,\ t\ge 0.$ A device that has worked for $s$ hours is as good as new, because $\frac{e^{-\lambda(s+t)}}{e^{-\lambda s}}=e^{-\lambda t}.$

Example 37. A lamp lasts $1000$ hours on average, and its lifetime is exponentially distributed. Find the probability that it works more than $2000$ hours, and the probability that it fails within $500$ hours.

Here $\lambda=\frac{1}{1000}=0.001\text{:}$ ${P(X\gt 2000)}={e^{-0.001\cdot 2000}}={e^{-2}}\approx{0.135}$ and ${P(X\le 500)}={1-e^{-0.5}}\approx{0.393.}$

The Normal (Gaussian) Distribution

The normal distribution is the most important distribution in probability theory. Measurement errors, heights of people, noise in communication systems and many other quantities that are the sum of many small independent effects are approximately normal (this is explained by the central limit theorem below). The normal distribution with mean $\mu$ and standard deviation $\sigma\gt 0,$ written $N(\mu,\ \sigma^2),$ has the density

$$f(x)=\frac{1}{\sigma\sqrt{2\pi}}\,e^{-\frac{(x-\mu)^2}{2\sigma^2}}$$ $$E(X)=\mu,\qquad \operatorname{Var}(X)=\sigma^2$$

Its graph is the bell curve, symmetric about $x=\mu.$ The antiderivative of this density is not an elementary function, so the values of the distribution function are taken from tables or computed numerically. It is enough to know the distribution function of the standard normal distribution $N(0,\ 1)\text{:}$

${\Phi(z)}={\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{z}e^{-t^2/2}\,dt}$

If $X$ has the distribution $N(\mu,\ \sigma^2),$ then $Z=\frac{X-\mu}{\sigma}$ has the distribution $N(0,\ 1),$ so

$$P(X\le x)=\Phi\left(\frac{x-\mu}{\sigma}\right)$$

${P(a\le X\le b)}={\Phi\left(\frac{b-\mu}{\sigma}\right)-\Phi\left(\frac{a-\mu}{\sigma}\right)}$

$$\Phi(-z)=1-\Phi(z)$$
$z$$\Phi(z)$$Q(z)=1-\Phi(z)$
$0$$0.5000$$0.5000$
$0.5$$0.6915$$0.3085$
$1$$0.8413$$0.1587$
$1.5$$0.9332$$0.0668$
$1.645$$0.9500$$0.0500$
$1.9$$0.9713$$0.0287$
$1.96$$0.9750$$0.0250$
$2$$0.9772$$0.0228$
$2.5$$0.9938$$0.0062$
$3$$0.9987$$0.0013$

For a normal random variable, about $68.3\%$ of the values lie within one standard deviation of the mean, $95.4\%$ within two and $99.7\%$ within three (the three-sigma rule): ${P(\lvert X-\mu\rvert\le\sigma)}={2\Phi(1)-1}\approx{0.683.}$

μ − 3σμ − 2σμ − σμμ + σμ + 2σμ + 3σ68.3%95.4%99.7%

Example 38. The mass of a packet of flour is normally distributed with $\mu=500$ g and $\sigma=4$ g. Find the probability that a packet weighs less than $492$ g, and the probability that it weighs between $496$ g and $508$ g.

${P(X\lt 492)}={\Phi\left(\frac{492-500}{4}\right)}={\Phi(-2)}={1-\Phi(2)}\approx{0.0228}$

${P(496\le X\le 508)}={\Phi\left(\frac{508-500}{4}\right)}-{\Phi\left(\frac{496-500}{4}\right)}={\Phi(2)-\Phi(-1)}$

${\Phi(2)-\Phi(-1)}={\Phi(2)-\big(1-\Phi(1)\big)}\approx{0.9772-0.1587}\approx{0.819}$

In communication engineering the tail probability $Q(z)=1-\Phi(z)$ is called the Q-function. Tables and programs also use the error function and the complementary error function:

${\operatorname{erf}(x)}={\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt,\qquad \operatorname{erfc}(x)}={1-\operatorname{erf}(x)}={\frac{2}{\sqrt{\pi}}\int_x^{\infty}e^{-t^2}\,dt}$

${\Phi(z)}={\frac{1}{2}\left(1+\operatorname{erf}\frac{z}{\sqrt{2}}\right),\qquad Q(z)}={\frac{1}{2}\operatorname{erfc}\frac{z}{\sqrt{2}}}$

The Rayleigh Distribution

Let $X$ and $Y$ be independent normal random variables with mean $0$ and the same variance $\sigma^2.$ The length of the vector $(X,\ Y),$

$Z=\sqrt{X^2+Y^2}$

has the Rayleigh distribution:

For $z\ge 0$ (for $z\lt 0$ both functions are $0$):

$$f(z)=\frac{z}{\sigma^2}\,e^{-\frac{z^2}{2\sigma^2}}$$ $$F(z)=1-e^{-\frac{z^2}{2\sigma^2}}$$ $$E(Z)=\sigma\sqrt{\frac{\pi}{2}}\approx 1.25\,\sigma$$ $$\operatorname{Var}(Z)=\frac{4-\pi}{2}\,\sigma^2\approx 0.429\,\sigma^2$$
0.511234560σ = 0.5σ = 1σ = 2zf(z)

If $X$ and $Y$ are the voltages of two components of a radio signal, then $Z$ is the envelope of the received signal. It is modeled with the Rayleigh distribution in wireless and cellular systems when there is no line of sight between the transmitter and the receiver.

The power of the signal is proportional to $W=Z^2.$ By the method for functions of a random variable, ${P(W\le w)}={P(Z\le\sqrt{w})}={1-e^{-\frac{w}{2\sigma^2}}}$ for $w\ge 0.$ So the power has the exponential distribution with $\lambda=\frac{1}{2\sigma^2},$ that is, with mean $E(W)=2\sigma^2.$

The Rice (Rician) Distribution

When there is a line of sight, the received signal has a strong constant component of amplitude $v$ in addition to the random components. Its envelope has the Rice distribution:

${f(z)}={\frac{z}{\sigma^2}\,e^{-\frac{z^2+v^2}{2\sigma^2}}\,I_0\left(\frac{zv}{\sigma^2}\right),\qquad z}\ge{0}$

where $\sigma^2$ is the variance of each of the two random components, as in the Rayleigh distribution, $v\ge 0,$ and $I_0(x)=\sum_{k=0}^{\infty}\frac{(x/2)^{2k}}{(k!)^2}$ is the modified Bessel function of the first kind of order $0.$ For $v=0$ we have $I_0(0)=1,$ and the Rice distribution becomes the Rayleigh distribution.

Summary

Distribution$P(X=k)$ or $f(x)$$E(X)$$\operatorname{Var}(X)$
Binomial$\binom{n}{k}p^kq^{n-k},$ $k=0,\ \ldots,\ n$$np$$npq$
Poisson$\frac{\lambda^k}{k!}e^{-\lambda},$ $k=0,\ 1,\ \ldots$$\lambda$$\lambda$
Uniform on $[a,\ b]$$\frac{1}{b-a},$ $a\le x\le b$$\frac{a+b}{2}$$\frac{(b-a)^2}{12}$
Exponential$\lambda e^{-\lambda x},$ $x\ge 0$$\frac{1}{\lambda}$$\frac{1}{\lambda^2}$
Normal $N(\mu,\ \sigma^2)$$\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}$$\mu$$\sigma^2$
Rayleigh$\frac{x}{\sigma^2}e^{-\frac{x^2}{2\sigma^2}},$ $x\ge 0$$\sigma\sqrt{\frac{\pi}{2}}$$\frac{4-\pi}{2}\sigma^2$

The Law of Large Numbers and the Central Limit Theorem

Let $X_1,$ $X_2,$ … be independent random variables with the same distribution, with mean $\mu$ and finite variance $\sigma^2,$ for example the results of repeated rolls of a die. Let $S_n=X_1+X_2+\ldots+X_n$ be the sum of the first $n$ of them; then $E(S_n)=n\mu$ and $\operatorname{Var}(S_n)=n\sigma^2.$

The law of large numbers says that the average $\frac{S_n}{n}$ approaches $\mu$ as $n$ grows: for every $\varepsilon\gt 0$ the probability ${P\left(\left|\frac{S_n}{n}-\mu\right|\gt\varepsilon\right)}$ tends to $0.$ Applied to $X_i=1$ when an event occurs in the $i$-th trial and $X_i=0$ otherwise, it shows that the relative frequency of the event approaches its probability.

The central limit theorem. If $\sigma\gt 0,$ then for large $n$ the sum $S_n$ is approximately normally distributed with mean $n\mu$ and variance $n\sigma^2.$ For every number $z$

$$\lim_{n\to\infty}P\left(\frac{S_n-n\mu}{\sigma\sqrt{n}}\le z\right)=\Phi(z)$$

The deviation $S_n-n\mu$ is divided by $\sqrt{n},$ not by $n\text{:}$ the deviation of the average, $\frac{S_n}{n}-\mu,$ tends to $0$ (the law of large numbers), and only this deviation multiplied by $\sqrt{n}$ has a normal limit. The theorem explains why the normal distribution is so common: a quantity that is the sum of many small independent random effects, none of which dominates the others, is approximately normal, whatever the distribution of each effect.

161 die27122 dice310183 dice

The distribution of the sum of $1,$ $2$ and $3$ dice. One die gives a flat distribution, but the sum of three dice already looks like a bell curve.

Example 39. A coin is tossed $100$ times. Estimate the probability of at least $60$ heads.

The number of heads $S$ is binomial with $n=100,$ $p=0.5\text{:}$ $E(S)=50$ and ${\sigma}={\sqrt{100\cdot 0.5\cdot 0.5}}={5.}$ The number $S$ takes only whole values, so the event $S\ge 60$ is the same as $S\ge 59.5$ (a continuity correction):

${P(S\ge 60)}\approx{1-\Phi\left(\frac{59.5-50}{5}\right)}={1-\Phi(1.9)}\approx{0.0287}$

The exact binomial probability is $0.0284.$

Practice Problems

Solve the problems, then open them to see the answers. You can check the distribution problems with the calculator at the top of this page.

1. Two dice are rolled. Find the probability that the sum is $9.$

The sum $9$ comes from $(3,\ 6),$ $(4,\ 5),$ $(5,\ 4),$ $(6,\ 3).$ Answer: $\frac{4}{36}=\frac{1}{9}.$

2. A card is drawn from a deck of $52.$ Find the probability that it is a heart or an ace.

${\frac{13}{52}+\frac{4}{52}-\frac{1}{52}}={\frac{16}{52}.}$ Answer: $\frac{4}{13}.$

3. A coin is tossed three times. Find the probability of exactly two heads.

The outcomes $HHT,$ $HTH,$ $THH$ out of $8.$ Answer: $\frac{3}{8}.$

4. $P(A)=0.5,$ $P(B)=0.4$ and $P(A\cap B)=0.2.$ Find $P(A\cup B)$ and $P(A\mid B).$ Are $A$ and $B$ independent?

${P(A\cup B)}={0.5+0.4-0.2}={0.7}$ and ${P(A\mid B)}={\frac{0.2}{0.4}}={0.5.}$ Answer: $0.7,$ $0.5;$ independent, because $0.5\cdot 0.4=0.2$ (equivalently $P(A\mid B)=P(A)$).

5. A box has $4$ white and $6$ black balls. Three balls are drawn without replacement. Find the probability that all three are white.

${\frac{4}{10}\cdot\frac{3}{9}\cdot\frac{2}{8}}={\frac{24}{720}.}$ Answer: $\frac{1}{30}.$

6. Box 1 has $3$ red and $2$ blue balls, box 2 has $1$ red and $4$ blue balls. A box is chosen by tossing a coin and a ball is drawn from it. Find the probability that the ball is red. The ball is red; find the probability that it came from box 1.

${P(R)}={\frac{1}{2}\cdot\frac{3}{5}+\frac{1}{2}\cdot\frac{1}{5}}={\frac{2}{5}}$ and ${P(B_1\mid R)}={\frac{3/10}{2/5}}={\frac{3}{4}.}$ Answer: $\frac{2}{5}$ and $\frac{3}{4}.$

7. A shooter hits a target with probability $0.8,$ independently in each shot. Find the probability of at least one hit in three shots, and of exactly two hits.

${1-0.2^3}={0.992}$ and ${\binom{3}{2}\cdot 0.8^2\cdot 0.2}={0.384.}$ Answer: $0.992$ and $0.384.$

8. A random variable takes the values $1,$ $2,$ $3$ with the probabilities $0.2,$ $0.5,$ $0.3.$ Find $E(X),$ $\operatorname{Var}(X)$ and $\sigma.$

${E(X)}={0.2+1+0.9}={2.1,}$ ${E(X^2)}={0.2+2+2.7}={4.9}$ and ${\operatorname{Var}(X)}={4.9-2.1^2}={0.49.}$ Answer: $2.1,$ $0.49,$ $\sigma=0.7.$

9. A random variable has the density $f(x)=3x^2$ on $[0,\ 1]$ and $0$ otherwise. Find $F(x),$ $P(X\le 0.5),$ $E(X)$ and $\operatorname{Var}(X).$

$F(x)=x^3$ on $[0,\ 1],$ ${P(X\le 0.5)}={0.5^3}={0.125,}$ ${E(X)}={\int_0^1 3x^3\,dx}={\frac{3}{4},}$ ${E(X^2)}={\frac{3}{5}}$ and ${\operatorname{Var}(X)}={\frac{3}{5}-\frac{9}{16}}={\frac{3}{80}.}$ Answer: $x^3,$ $\frac{1}{8},$ $\frac{3}{4},$ $\frac{3}{80}.$

10. Find $c$ so that $f(x)=c(1-\nobreak x^2)$ for $-1\le x\le 1$ and $f(x)=0$ otherwise is a density.

${\int_{-1}^{1}c(1-x^2)\,dx}={c\left(2-\frac{2}{3}\right)}={\frac{4c}{3}}={1.}$ Answer: $c=\frac{3}{4}.$

11. $X$ is binomial with $n=6$ and $p=\frac{1}{3}.$ Find $P(X=2),$ $E(X)$ and $\operatorname{Var}(X).$

${\binom{6}{2}\left(\frac{1}{3}\right)^2\left(\frac{2}{3}\right)^4}={15\cdot\frac{1}{9}\cdot\frac{16}{81}}={\frac{80}{243}}\approx{0.329.}$ Answer: $\frac{80}{243},$ $E(X)=2,$ $\operatorname{Var}(X)=\frac{4}{3}.$

12. $X$ has the Poisson distribution with $\lambda=2.$ Find $P(X=2)$ and $P(X\ge 1).$

${P(X=2)}={\frac{2^2}{2!}e^{-2}}={2e^{-2}}$ and ${P(X\ge 1)}={1-P(X=0)}={1-e^{-2}.}$ Answer: $2e^{-2}\approx 0.271$ and $1-e^{-2}\approx 0.865.$

13. The time between two consecutive customers is exponentially distributed with a mean of $5$ minutes. Find the probability of waiting more than $10$ minutes. No customer has come for $5$ minutes; find the probability that none comes in the next $10$ minutes.

$\lambda=\frac{1}{5}$ and ${P(X\gt 10)}={e^{-10/5}}={e^{-2}.}$ By the memoryless property the second probability is the same. Answer: $e^{-2}\approx 0.135$ in both cases.

14. $X$ is normal with $\mu=100$ and $\sigma=15.$ Find $P(X\gt 130)$ and $P(85\le X\le 115).$

${P(X\gt 130)}={1-\Phi(2)}\approx{0.0228}$ and ${P(85\le X\le 115)}={\Phi(1)-\Phi(-1)}={2\Phi(1)-1}\approx{0.683.}$ Answer: $0.0228$ and $0.683.$

15. $X$ is uniform on $[0,\ 2].$ Find the density of $Y=3X-1.$

$Y$ takes the values from $-1$ to $5,$ and ${f_Y(y)}={f_X\left(\frac{y+1}{3}\right)\cdot\frac{1}{3}}={\frac{1}{2}\cdot\frac{1}{3}.}$ Answer: $Y$ is uniform on $[-1,\ 5]\text{:}$ $f_Y(y)=\frac{1}{6}$ there and $0$ otherwise.

16. $E(X)=1$ and $\operatorname{Var}(X)=4.$ Find $E(2X-\nobreak 3)$ and $\operatorname{Var}(2X-\nobreak 3).$

${E(2X-3)}={2\cdot 1-3}={-1}$ and ${\operatorname{Var}(2X-3)}={2^2\cdot 4}={16.}$ Answer: $-1$ and $16.$

17. $36$ independent measurements have the same distribution with mean $10$ and standard deviation $3.$ Estimate the probability that their average is greater than $11.$

The sum has mean $360$ and standard deviation $3\sqrt{36}=18,$ so the average has mean $10$ and standard deviation $\frac{18}{36}=0.5.$ By the central limit theorem ${P(\overline{X}\gt 11)}\approx{1-\Phi\left(\frac{11-10}{0.5}\right)}={1-\Phi(2).}$ Answer: about $0.0228.$

More: probability problems with solutions · experimental and theoretical probability · combinations · statistics calculator

Feedback   Contact email:
Follow us on   X   Facebook
  Math10 Banners   Math History  
Copyright © 2005 - 2026