Chapter 5: Probability Distribution Function
Discrete and Continuous Probability Functions
1. Discrete Probability Function
Let \(X\) be a discrete random variable. A function
\[ p(x)=P(X=x) \]
is called the probability mass function (PMF) or discrete probability function of \(X\).
For a function \(p(x)\) to be a valid discrete probability function, it must satisfy the following conditions:
\[ \boxed{p(x)\geq 0} \]
and
\[ \boxed{\sum_x p(x)=1}. \]
Thus, the probability of an event such as \(a\leq X\leq b\) is obtained by adding the corresponding probabilities:
\[ P(a\leq X\leq b) = \sum_{x=a}^{b}p(x). \]
5 Solved Examples on Discrete Probability Functions
Example 1: Determine the Constant in a PMF
A discrete random variable \(X\) has probability function
\[ P(X=x)=kx,\qquad x=1,2,3,4. \]
Find:
- The value of \(k\)
- \(P(X\leq 2)\)
- The mean \(E(X)\)
Show Solution
Since the total probability must be equal to 1,
\[ \sum_{x=1}^{4} P(X=x)=1. \]
Therefore,
\[ k(1)+k(2)+k(3)+k(4)=1. \]
\[ k(1+2+3+4)=1. \]
\[ 10k=1. \]
Hence,
\[ \boxed{k=\frac{1}{10}}. \]
Now,
\[ P(X\leq2)=P(X=1)+P(X=2). \]
\[ =\frac{1}{10}+\frac{2}{10} =\boxed{\frac{3}{10}}. \]
The expectation is
\[ E(X)=\sum xP(X=x). \]
\[ E(X) = \sum_{x=1}^{4}x(kx). \]
\[ = \frac{1}{10} (1^2+2^2+3^2+4^2). \]
\[ = \frac{1+4+9+16}{10} = \frac{30}{10}. \]
\[ \boxed{E(X)=3}. \]
Example 2: PMF of the Number of Heads
Two fair coins are tossed. Let \(X\) be the number of heads obtained. Find the probability mass function and calculate
\[ P(X\geq1). \]
Show Solution
The sample space is
\[ S=\{HH,HT,TH,TT\}. \]
The values of \(X\) are
\[ X=0,1,2. \]
For \(X=0\), the outcome is \(TT\). Thus,
\[ P(X=0)=\frac14. \]
For \(X=1\), the outcomes are \(HT\) and \(TH\). Therefore,
\[ P(X=1)=\frac24=\frac12. \]
For \(X=2\), the outcome is \(HH\). Hence,
\[ P(X=2)=\frac14. \]
| \(x\) | 0 | 1 | 2 |
|---|---|---|---|
| \(P(X=x)\) | \(1/4\) | \(1/2\) | \(1/4\) |
Now,
\[ P(X\geq1) = P(X=1)+P(X=2). \]
\[ = \frac12+\frac14 = \boxed{\frac34}. \]
Example 3: Find Mean and Variance from a PMF
The probability distribution of \(X\) is given by
| \(x\) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| \(P(X=x)\) | 0.1 | 0.2 | 0.4 | 0.3 |
Find \(E(X)\) and \(\operatorname{Var}(X)\).
Show Solution
The mean is
\[ E(X)=\sum xP(X=x). \]
\[ =0(0.1)+1(0.2)+2(0.4)+3(0.3). \]
\[ =0+0.2+0.8+0.9. \]
\[ \boxed{E(X)=1.9}. \]
Now calculate \(E(X^2)\):
\[ E(X^2) = 0^2(0.1)+1^2(0.2)+2^2(0.4)+3^2(0.3). \]
\[ =0+0.2+1.6+2.7. \]
\[ E(X^2)=4.5. \]
Therefore,
\[ \operatorname{Var}(X) = E(X^2)-[E(X)]^2. \]
\[ =4.5-(1.9)^2. \]
\[ =4.5-3.61. \]
\[ \boxed{\operatorname{Var}(X)=0.89}. \]
Example 4: Binomial Probability Function
A student answers five independent true-or-false questions by guessing. Let \(X\) be the number of correct answers. Find the probability that exactly three answers are correct.
Show Solution
The probability of a correct answer is
\[ p=\frac12. \]
The random variable therefore follows
\[ X\sim Binomial\left(5,\frac12\right). \]
The binomial probability function is
\[ P(X=x) = \binom{n}{x}p^x(1-p)^{n-x}. \]
Thus,
\[ P(X=3) = \binom53 \left(\frac12\right)^3 \left(\frac12\right)^2. \]
\[ = 10\left(\frac12\right)^5. \]
\[ = \frac{10}{32}. \]
\[ \boxed{P(X=3)=\frac{5}{16}}. \]
Example 5: Probability Function Involving \(x^2\)
Suppose
\[ P(X=x)=kx^2,\qquad x=1,2,3. \]
Find \(k\), \(P(X>1)\), and \(E(X)\).
Show Solution
Using
\[ \sum P(X=x)=1, \]
we obtain
\[ k(1^2+2^2+3^2)=1. \]
\[ k(1+4+9)=1. \]
\[ 14k=1. \]
Therefore,
\[ \boxed{k=\frac1{14}}. \]
Now,
\[ P(X>1)=P(X=2)+P(X=3). \]
\[ = \frac{4}{14}+\frac{9}{14} = \boxed{\frac{13}{14}}. \]
The expectation is
\[ E(X) = \sum xP(X=x). \]
\[ = \frac1{14} \left(1^3+2^3+3^3\right). \]
\[ = \frac{1+8+27}{14}. \]
\[ \boxed{E(X)=\frac{18}{7}}. \]
2. Continuous Probability Function
Let \(X\) be a continuous random variable. A function \(f(x)\) is called a probability density function (PDF) or continuous probability function if it satisfies
\[ \boxed{f(x)\geq0} \]
for all \(x\), and
\[ \boxed{ \int_{-\infty}^{\infty}f(x)\,dx=1 }. \]
For a continuous random variable, the probability that \(X\) lies between \(a\) and \(b\) is
\[ \boxed{ P(a<X<b) = \int_a^b f(x)\,dx }. \]
An important property is
\[ \boxed{P(X=x)=0}. \]
Therefore,
\[ P(a<X<b) = P(a\leq X\leq b). \]
5 Solved Examples on Continuous Probability Functions
Example 1: Find the Constant of a PDF
Suppose
\[ f(x)= \begin{cases} kx,&0<x<2,\\ 0,&\text{otherwise}. \end{cases} \]
Find \(k\) and \(P(X<1)\).
Show Solution
Since \(f(x)\) is a probability density function,
\[ \int_0^2kx\,dx=1. \]
\[ k\left[\frac{x^2}{2}\right]_0^2=1. \]
\[ 2k=1. \]
Therefore,
\[ \boxed{k=\frac12}. \]
Hence,
\[ f(x)=\frac{x}{2}. \]
Now,
\[ P(X<1) = \int_0^1\frac{x}{2}\,dx. \]
\[ = \left[\frac{x^2}{4}\right]_0^1. \]
\[ \boxed{P(X<1)=\frac14}. \]
Example 2: Probability Over an Interval
Let
\[ f(x)= \begin{cases} 2x,&0<x<1,\\ 0,&\text{otherwise}. \end{cases} \]
Find
\[ P\left(\frac14<X<\frac34\right). \]
Show Solution
We use
\[ P(a<X<b) = \int_a^b f(x)\,dx. \]
Therefore,
\[ P\left(\frac14<X<\frac34\right) = \int_{1/4}^{3/4}2x\,dx. \]
Integrating,
\[ = \left[x^2\right]_{1/4}^{3/4}. \]
\[ = \left(\frac34\right)^2 - \left(\frac14\right)^2. \]
\[ = \frac9{16}-\frac1{16}. \]
\[ \boxed{P\left(\frac14<X<\frac34\right)=\frac12}. \]
Example 3: Mean of a Continuous Random Variable
Let
\[ f(x)= \begin{cases} 3x^2,&0<x<1,\\ 0,&\text{otherwise}. \end{cases} \]
Find \(E(X)\) and \(E(X^2)\).
Show Solution
The expectation is
\[ E(X)=\int_{-\infty}^{\infty}xf(x)\,dx. \]
Therefore,
\[ E(X)=\int_0^1x(3x^2)\,dx. \]
\[ =3\int_0^1x^3\,dx. \]
\[ = 3\left[\frac{x^4}{4}\right]_0^1. \]
\[ \boxed{E(X)=\frac34}. \]
Now,
\[ E(X^2) = \int_0^1x^2(3x^2)\,dx. \]
\[ = 3\int_0^1x^4\,dx. \]
\[ = 3\left[\frac{x^5}{5}\right]_0^1. \]
\[ \boxed{E(X^2)=\frac35}. \]
Example 4: Mean and Variance of a Uniform Distribution
Let \(X\) be uniformly distributed over the interval
\[ 2<X<8. \]
Find:
- The probability density function
- \(P(3<X<6)\)
- The mean
- The variance
Show Solution
For a uniform distribution over \((a,b)\),
\[ f(x)=\frac1{b-a}. \]
Here,
\[ a=2,\qquad b=8. \]
Therefore,
\[ f(x)= \begin{cases} \frac16,&2<x<8,\\ 0,&\text{otherwise}. \end{cases} \]
Now,
\[ P(3<X<6) = \int_3^6\frac16\,dx. \]
\[ = \frac{6-3}{6} = \boxed{\frac12}. \]
The mean is
\[ E(X)=\frac{a+b}{2}. \]
\[ = \frac{2+8}{2} = \boxed{5}. \]
The variance is
\[ \operatorname{Var}(X) = \frac{(b-a)^2}{12}. \]
\[ = \frac{(8-2)^2}{12}. \]
\[ = \frac{36}{12} = \boxed{3}. \]
Example 5: Exponential Probability Density Function
The lifetime \(X\) of a device has density
\[ f(x)= \begin{cases} \frac12e^{-x/2},&x\geq0,\\ 0,&x<0. \end{cases} \]
Find:
- \(P(X>4)\)
- \(P(2<X<4)\)
- The expected lifetime
Show Solution
First,
\[ P(X>4) = \int_4^\infty \frac12e^{-x/2}\,dx. \]
Since
\[ \int\frac12e^{-x/2}\,dx = -e^{-x/2}, \]
we obtain
\[ P(X>4) = \left[-e^{-x/2}\right]_4^\infty. \]
\[ =\boxed{e^{-2}}. \]
Numerically,
\[ \boxed{P(X>4)\approx0.1353}. \]
Next,
\[ P(2<X<4) = \int_2^4 \frac12e^{-x/2}\,dx. \]
\[ = \left[-e^{-x/2}\right]_2^4. \]
\[ = e^{-1}-e^{-2}. \]
\[ \boxed{P(2<X<4)\approx0.2325}. \]
For an exponential random variable,
\[ E(X)=\frac1{\lambda}. \]
Here,
\[ \lambda=\frac12. \]
Therefore,
\[ \boxed{E(X)=2}. \]
Discrete vs Continuous Probability Function
| Property | Discrete | Continuous |
|---|---|---|
| Function | PMF \(p(x)=P(X=x)\) | PDF \(f(x)\) |
| Possible values | Finite or countable | Any value in an interval |
| Total probability | \(\sum_xp(x)=1\) | \(\int_{-\infty}^{\infty}f(x)\,dx=1\) |
| Probability at one point | \(P(X=x)\) may be positive | \(P(X=x)=0\) |
| Probability over interval | Sum of probabilities | Area under the density curve |
| Examples | Number of heads, defects, customers | Height, weight, lifetime, waiting time |
Important Formulas
For a Discrete Random Variable
\[ \boxed{ E(X)=\sum_x xp(x) } \]
\[ \boxed{ E(X^2)=\sum_x x^2p(x) } \]
\[ \boxed{ \operatorname{Var}(X)=E(X^2)-[E(X)]^2 } \]
For a Continuous Random Variable
\[ \boxed{ E(X)= \int_{-\infty}^{\infty} xf(x)\,dx } \]
\[ \boxed{ E(X^2)= \int_{-\infty}^{\infty} x^2f(x)\,dx } \]
\[ \boxed{ \operatorname{Var}(X) = E(X^2)-[E(X)]^2 } \]
Comments
Post a Comment