Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit 18b4f6f

Browse files
committed
Updates from Overleaf
1 parent 266639f commit 18b4f6f

File tree

1 file changed

+124
-4
lines changed

1 file changed

+124
-4
lines changed

content/Part6 Probability and Combinatorics/3.Discrete Distribution and Random Variable.tex

Lines changed: 124 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ \chapter{Random Variable and Discrete Distribution}
3737
\section{Random Variable}
3838
We First define random variables and discuss their basic properties, including how they function within the framework of probability theory.
3939
In a short word, a random variable is a functional relation between the possible outcomes of a random experiment
40-
and the probability of each outcome. It assigns a real number to each outcome in the sample space of a random experiment.
40+
and the probability of each outcome. It assigns a real number to each outcome in the sample space of a random experiment. Though we call it a \textbf{variable}, it is actually a function.
4141
\begin{definition}[Random Variable]
4242
A \textbf{random variable} is a function \( X: S \rightarrow \mathbb{R} \)
4343
where \( S \) is the sample space of a random experiment. This function
@@ -260,7 +260,9 @@ \subsection{Discrete Random Variables and Discrete Distributions}
260260

261261
This function \( P_X \) gives the probability that \( X \) takes any particular value \( x \).
262262
\end{definition}
263-
263+
\begin{remark}
264+
Note that, the probability function in this context is called \textbf{Probability Density function (PDF)}. We will also discuss the other probability function called \textbf{Cumulative Density Function (CDF)} and dis cuss their relation.
265+
\end{remark}
264266
We illustrate with an example of fair dice rolling.
265267
\begin{example}[Rolling a Fair Six-Sided Die]
266268
Let \( X \) be the random variable representing the outcome of rolling a fair six-sided die. The possible outcomes for \( X \) are 1, 2, 3, 4, 5, and 6. Since the die is fair, the probability of each outcome is equal. Thus, the probability function for \( X \) is given by:
@@ -309,16 +311,134 @@ \subsection{Discrete Random Variables and Discrete Distributions}
309311
A probability function specifies the probability of each individual outcome or value of a random variable. It provides a point-wise description of the likelihood of different outcomes.
310312

311313
On the other hand, a probability distribution is a more comprehensive concept that encompasses the collective behavior of a random variable. It describes the overall probabilistic properties of the random variable, often by specifying the probabilities associated with different ranges or sets of outcomes.
314+
\subsection{Exercises}
315+
316+
\section{Expectation and Variance}
317+
Since we have defined probability distribution and probability density function. We can now investigate more aspects of the function. Recall that in calculus, the average value of a continuous function $f(x)$ defined on the interval $[a, b]$ is given by the formula:
318+
\begin{equation}
319+
\text{Average Value} = \frac{1}{b - a} \int_{a}^{b} f(x) \, dx
320+
\end{equation}
321+
where:
322+
\begin{itemize}
323+
\item $\int_{a}^{b} f(x) \, dx$ represents the definite integral of the function $f(x)$ over the interval $[a, b]$, which calculates the accumulated area or value of the function within that interval.
324+
\item $b - a$ represents the length of the interval.
325+
\item The integral is divided by the interval length to obtain the average value or average level of the function over that interval.
326+
\end{itemize}
327+
For a normal discrete function, the integral is replaced by a summation:
328+
\begin{equation}\label{dissum}
329+
\text{Average Value} = \frac{1}{n} \sum_{i=1}^{n} f(x_i)
330+
\end{equation}
331+
332+
where $n$ is the number of discrete points, and $x_i$ are the discrete values at which the function is evaluated.
333+
334+
\subsection{Expectation of Discrete Random Variable}
335+
Of course we know that discrete random distribution are modeled by discrete function. But things are slightly different here, since when we deal with a normal discrete function, it is implied that we are treated each value equally, if you take that $\frac{1}{n}$ as the possibility of each value appearing. While for discrete distribution this is a different story, because we only see such cases when we have a uniform distribution like rolling a dice. To generalize this expression, we can replace the uniform probability with a the probability that each value $x_i$ occur, which is actually a weighted average. Now we can define expectation of discrete random variable.
336+
\begin{definition}[Expectation of Discrete Random Variable]
337+
The expectation $E$ of a discrete random variable $X$ is the weighted average of the possible values that $x\in \text{range}(X)$ can be taken.
338+
\begin{equation}
339+
E[X] = \sum_{xp(x) > 0} xp(x)
340+
\end{equation}
341+
Where $P(x)$ is derived form the uniform probability $\frac{1}{n}$, and $x$ is derived from $f(x_i)$ in equation \ref*{dissum}.
342+
\end{definition}
343+
344+
\begin{example}[Fair Dice]
345+
When we roll a clear dice, since each side has a chance of $\frac{1}{6}$.
346+
Let $\text{range}(X) = \{1,2,3,4,5,6\}$We have
347+
\[
348+
E[X] = 1\left(\frac16\right)+2\left(\frac16\right)+3\left(\frac16\right)+4\left(\frac16\right)+5\left(\frac16\right)+6\left(\frac16\right)=\frac72
349+
\]
350+
\end{example}
312351

352+
\begin{example}
353+
A school class of 120 students is driven in 3 buses to a symphonic performance. There are 36 students in one of the buses, 40 in another, and 44 in the third bus. When the buses arrive, one of the 120 students is randomly chosen. Let $X$ denote the number of students on the bus of that randomly chosen student, and find $E[X]$.
354+
\begin{solution}
355+
Since the randomly chosen student is equally likely to be any of the 120 students, it follows that
356+
\[
357+
P(X = 36) = \frac{36}{120}, \quad P(X = 40) = \frac{40}{120}, \quad P(X = 44) = \frac{44}{120}
358+
\]
359+
Hence,
360+
\[
361+
E[X] = 36 \left(\frac{3}{10}\right) + 40 \left(\frac{1}{3}\right) + 44 \left(\frac{11}{30}\right) = \frac{1208}{30} \approx 40.2667
362+
\]
363+
\end{solution}
364+
\end{example}
313365

366+
\subsection{Expectation of Function of Discrete Random Variable}
367+
Now suppose we want to transform the random variable $X$, for example, apply some function $g(X)$ to change the random variable.
368+
How can we get the composed expectation after transformation? Well, don't be scared, remember that distribution function can be used to calculate $P(g[X])$, and we know the value pf $g[X]$. By the definition, we can calculate $E[g(x)]$.
314369

315-
\subsection{Exercises}
370+
\begin{example}
371+
Let $X$ denote a random variable that takes on any of the values $-1$, $0$, and $1$ with respective probabilities
372+
\[
373+
P(X = -1) = 0.2, \quad P(X = 0) = 0.5, \quad P(X = 1) = 0.3
374+
\]
375+
Compute $E[X^2]$.
376+
\begin{solution}
377+
Let $Y = X^2$. Then the probability mass function of $Y$ is given by
378+
\[
379+
P(Y = 1) = P(X = -1) + P(X = 1) = 0.5, \quad P(Y = 0) = P(X = 0) = 0.5
380+
\]
381+
Hence,
382+
\[
383+
E[X^2] = E[Y] = 1(0.5) + 0(0.5) = 0.5
384+
\]
385+
\begin{remark}
386+
Note that
387+
\[
388+
0.5 = E[X^2] \neq (E[X])^2 = 0.01
389+
\]
390+
$(E[X])^2$ is what we call \textbf{variance} of $X$, but $E[X^2]$ is the expectation of $X^2$.
391+
\end{remark}
316392

317-
\section{expectation and variance}
393+
\end{solution}
394+
\end{example}
395+
396+
However, we can notice that we can obtain the same result by
397+
$(-1)^{2}(0.2)\:+\:0^{2}(0.5)\:+\:1^{2}(0.3)$, it seems that we don't have to calculate $P(Y=1)$. This is because $g(X) = g(x)$ when $X = x$, so $E[g(X)]$ is the weighted average of $g(x)$ that $X=x$.
398+
\begin{proposition}
399+
If $X$ is a discrete random variable that takes on one of the values $x_i,i\geq1$, with
400+
respective probabilities $p(x_i)$, then, for any real-valued function g,
401+
$$E[g(X)]=\sum g(x_i)p(x_i)$$
402+
\end{proposition}
403+
\begin{proof}
404+
Consider a discrete random variable \(X\) taking values \(x_i\) with probability \(p(x_i)\) and a function \(g\) applied to \(X\). Assume \(g(X)\) takes distinct values \(y_j\), \(j \geq 1\). By grouping all the \(x_i\) for which \(g(x_i) = y_j\), the expectation \(E[g(X)]\) can be calculated as follows:
405+
\begin{align*}
406+
E[g(X)] &= \sum_i g(x_i)p(x_i) \\
407+
&= \sum_j \sum_{\{i : g(x_i) = y_j\}} g(x_i)p(x_i) \\
408+
&= \sum_j y_j \sum_{\{i : g(x_i) = y_j\}} p(x_i) \\
409+
&= \sum_j y_j P\{g(X) = y_j\} \\
410+
&= E[g(X)]
411+
\end{align*}
412+
This calculation confirms that the expectation of \(g(X)\) is the sum of the products of each value \(g(x_i)\) takes and the probability of \(x_i\), grouped by the unique values \(y_j\) that \(g\) maps to.
413+
\end{proof}
414+
415+
This brings us to a seemingly conclusion.
416+
\begin{corollary}
417+
A simple logical consequence of Proposition 4.1 is as follows. If \(a\) and \(b\) are constants, then
418+
\[ E[aX + b] = aE[X] + b \]
419+
\end{corollary}
420+
\begin{proof}
421+
Starting with the linearity of expectation:
422+
\[
423+
E[aX + b] = \sum_{x:p(x)>0} (ax + b)p(x)
424+
\]
425+
This can be rewritten by distributing the expectation:
426+
\[
427+
= a \sum_{x:p(x)>0} xp(x) + b \sum_{x:p(x)>0} p(x)
428+
\]
429+
Recognizing that the sum of the probabilities \( \sum_{x:p(x)>0} p(x) \) equals 1 and \( \sum_{x:p(x)>0} xp(x) \) is \( E[X] \), we obtain:
430+
\[
431+
= aE[X] + b
432+
\]
433+
\end{proof}
434+
\subsection{Variance}
318435

319436
\subsection{Exercises}
320437

321438
\section{Common Discrete Distributions}
439+
\subsection{Binomial (Bernoulli) Distribution}
440+
\subsection{The Hypergeometric Distribution}
441+
\subsection{The Poisson Distribution}
322442
\subsection{Exercises}
323443

324444
\section{Other Discrete Distributions}

0 commit comments

Comments
 (0)