maths.free › Probability Theory › 10. Probability › Discrete Random Variables
Discrete Random Variables
Let (S,P) be a probability space and let X:S\longrightarrow\reals be any function that maps the outcomes in S to real numbers (all values allowed, positive, negative and zero).
Discrete Random Variables
Let \((S,P)\) be a probability space and let \(X:S\longrightarrow\reals\) be any function that maps the outcomes in \(S\) to real numbers (all values allowed, positive, negative and zero). We callFor historical reasons, capital letters, like \(X\) and \(Y\) are used to denote random variables. They are just functions, so letters like \(f\), \(g\) and \(h\) might more seem more naturalbut maybe not. \(X\) a random variable. The quantity \(\sum_{x\in S} X(x)P(x)\), denoted \(E(X)\), is called the expectation (also called the mean or expected value) of the random variable \(X\). As the suggestive name reflects, this is what one should expect to be the average behavior of the result of repeated Bernoulli trials.
Note that since we are dealing only with probability spaces \((S,P)\) where \(S\) is a finite set, the range of the probability measure \(P\) is actually a finite set. Accordingly, we can rewrite the formula for \(E(X)\) as \(\sum_y y\cdot \prob(X(x)=y)\), where the summation extends over a finite range of values for \(y\).
Example
For the spinner shown in , let \(X(i)=i^2\) where \(i\) is the number of the region. Then \[\begin{aligned}\end{aligned}\] Note that \(109/8=13.625\). The significance of this quantity is captured in the following statement. If we record the result from the spinner \(n\) times in succession as \((i_1,i_2,\dots,i_n)\) and Xing receives a prize worth \(i_j^2\) for each \(j=1,2,\dots,n)\), then Xing should expect to receive a total prize worth \(109n/8=13.625n\). Bob asks how this statement can possibly be correct, since \(13.625n\) may not even be an integer, and any prize Xing receives will have integral value. Carlos goes on to explain that the concept of expected value provides a formal definition for what is meant by a fair game. If Xing pays \(13.625\) cents to play the game and is then paid \(i^2\) pennies where \(i\) is the number of the region where the spinner stops, then the game is fair. If he pays less, he has an unfair advantage, and if he pays more, the game is biased against him. Bob says How can Xing pay \(13.625\) pennies? Brushing aside Bob's question, Carlos says that one can prove that for every \(\epsilon >0\), there is some \(n_0\) (which depends on \(\epsilon\)) so that if \(n>n_0\), then the probability that Xing's total winnings minus \(13.625n\), divided by \(n\) is within \(\epsilon\) of \(13.625\) is at least \(1-\epsilon\). Carlos turns to Dave and explains politely that this statement gives a precise meaning of what is meant by close and large.
Example
For Alice's game from the start of the chapter, \(S=\{0,1,2,3,4,5\}\), we could take \(X\) to be the function defined by \(X(d)= 2-d\). Then \(X(d)\) records the amount that Bob wins when the difference is \(d\) (a negative win for Bob is just a win for Alice in the same amount). We calculate the expectation of \(X\) as follows: \[\begin{aligned}\end{aligned}\] Note that \(-2/36=-.055555\dots\). So if points were dollars, each time the game is played, Bob should expect to lose slightly more than a nickel. Needless to say, Alice likes to play this game and the more times Bob can be tricked into playing, the more she likes it. On the other hand, by this time in the chapter, Bob should be getting the message and telling Alice to go suck a lemon.
The Linearity of Expectation
The following fundamental property of expectation is an immediate consequence of the definition, but we state it formally because it is so important to discussions to follow.
Implications for Bernoulli Trials
Example
Consider a series of \(n\) Bernoulli trials with \(p\), the probability of success, and let \(X\) count the number of successes. Then, we claim that \[\begin{aligned}\end{aligned}\] To see this, consider the function \(f(x)=[px+(1-p)]^n\). Taking the derivative by the chain rule, we find that \(f'(x)=np[px+(1-p)]^{n-1}\). Now when \(x=1\), the derivative has value \(np\).
On the other hand, we can use the binomial theorem to expand the function \(f\). \[\begin{aligned}\end{aligned}\] It follows that \[\begin{aligned}\end{aligned}\] And now the claim follows by again setting \(x=1\). Who says calculus isn't useful!
Example
Many states have lotteries to finance college scholarships or other public enterprises judged to have value to the public at large. Although far from a scientific investigation, it seems on the basis of our investigation that many of the games have an expected value of approximately fifty cents when one dollar is invested. So the games are far from fair, and no one should play them unless they have an intrinsic desire to support the various causes for which the lottery profits are targeted.
By contrast, various games of chance played in gambling centers have an expected return of slightly less than ninety cents for every dollar wagered. In this setting, we can only say that one has to place a dollar value on the enjoyment derived from the casino environment. From a mathematical standpoint, you are going to lose. That's how they get the money to build those exotic buildings.
Symbols used here
Add a_k for k = 1 up to n.
x belongs to A; every element of A is in B.
Small positive tolerances in the definition of a limit.
Chance of A; chance of A given that B happened.
i² = −1.
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
Number of k-element subsets of n things: n!/(k!(n−k)!).
Antiderivative (indefinite) or signed area from a to b (definite).
In either; in both; in A but not B.
Average of the data; average of the whole population.
Typical distance from the mean; its square.
Probability-weighted average of X; its spread.
The bell curve with mean μ and variance σ²; (x − μ)/σ.
Size of a set; the family of sets that can be measured.
Questions people ask
What is the difference between probability and statistics?
Probability goes from a known model to what the data should look like; statistics goes from data back to the model. Probability theory is the deductive half.
What does the law of large numbers promise?
That the average of many independent samples converges to the expected value. It says nothing about any single trial.
নিজের চেষ্টা করো
Parts of this page are adapted from Keller & Trotter, Applied Combinatorics (CC BY-SA 4.0). Condensed and re-explained here; errors are ours.
আরও Probability Theory
Sample spaces and the axiomsRandom variables and expectationThe common distributionsThe law of large numbers and the central limit theorem