You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: content/Part6 Probability and Combinatorics/3.Discrete Distribution and Random Variable.tex
+124-4Lines changed: 124 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ \chapter{Random Variable and Discrete Distribution}
37
37
\section{Random Variable}
38
38
We First define random variables and discuss their basic properties, including how they function within the framework of probability theory.
39
39
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.
41
41
\begin{definition}[Random Variable]
42
42
A \textbf{random variable} is a function \( X: S \rightarrow\mathbb{R} \)
43
43
where \( S \) is the sample space of a random experiment. This function
@@ -260,7 +260,9 @@ \subsection{Discrete Random Variables and Discrete Distributions}
260
260
261
261
This function \( P_X \) gives the probability that \( X \) takes any particular value \( x \).
262
262
\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}
264
266
We illustrate with an example of fair dice rolling.
265
267
\begin{example}[Rolling a Fair Six-Sided Die]
266
268
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}
309
311
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.
310
312
311
313
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:
\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:
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}$.
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
\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)]$.
314
369
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
$(E[X])^2$ is what we call \textbf{variance} of $X$, but $E[X^2]$ is the expectation of $X^2$.
391
+
\end{remark}
316
392
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:
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:
0 commit comments