diff --git a/source/ch-Expected-Value.ptx b/source/ch-Expected-Value.ptx index f9bf897..8700af2 100644 --- a/source/ch-Expected-Value.ptx +++ b/source/ch-Expected-Value.ptx @@ -639,6 +639,56 @@ +

+ Variance is not linear. + In general, you can't split up variance across plus or minus signs, and you can't pull multiplied constants out of the variance like you can with expected value. + However, there are some properties we can use to do similar manipulations to the variance. +

+ + + +

+ Let X and Y be random variables, and let \alpha \in \R. + Then: +

    +
  1. +

    + \Var(X + \alpha) = \Var(X). +

    +
  2. + +
  3. +

    + \Var(\alpha X) = \alpha^2 \Var(X). +

    +
  4. + +
  5. +

    + If X and Y are independent, then \Var(X + Y) = \Var(X) + \Var(Y). +

    +
  6. +
+

+
+
+ +

+ We'll omit the proofs and just casually observe that these are reasonable properties. + X + \alpha is a shift of X, and shifting shouldn't change how spread out the distribution is. + \alpha X scaled X by a constant, so it should scale the spread of the distribution by the same constant. + But recall that the variance calculation involves squaring; it's an indirect measure of spread. + So it's reasonable that scaling the distribution by a constant should scale the variance by its square. +

+ + + +

+ TODO +

+
+
+ diff --git a/source/ch-Random-Variables.ptx b/source/ch-Random-Variables.ptx index 1a568f6..4ae5aa6 100644 --- a/source/ch-Random-Variables.ptx +++ b/source/ch-Random-Variables.ptx @@ -763,4 +763,133 @@ + +
+ Joint Distributions + +

+ Sometimes multiple measurements are taken simultaneously and data is naturally grouped by combinations of measurement values. + Consider a poll that asks respondents two yes or no questions. + It may be natural to report counts of respondents who answered yes/yes, yes/no, no/yes, no/no. +

+ + + +

+ Let X be a random variable taking values x_1, x_2, \dotsc, x_m. + Let Y be a random variable taking values y_1, y_2, \dotsc, y_n. + The joint distribution for X and Y is the collection of probabilities \Pr(X = x_i, Y = y_j) for all 1 \leq i \leq m, 1 \leq j \leq n. + The individual distributions for X and Y separately are called the marginal distributions. +

+
+
+ +

+ In the probability \Pr(X = x_i, Y = y_j), the comma should be read as "and". + Think of the conditions X = x_i and Y = y_j as events, and \Pr(X = x_i, Y = y_j) is the probability of the intersection of these two events. +

+ +

+ We're restricting our attention here to joint distributions of two random variables, each taking only finitely many values. + It shouldn't be hard to imagine how to generalize this definition for a joint distribution of three or more discrete random variables. + A bit more adjustment would need to be made for a joint distribution of continuous random variables, or a joint distribution between a discrete and continuous random variable. +

+ + + +

+ A poll asks two yes/no questions. + Let X indicate a yes on Question 1 and Y indicate a yes on Question 2. + When the data is collected, the following joint distribution for X and Y is created: +

+ + + Joint Distribution for Indicator Random Variables + + + + + X = 0 + X = 1 + + + + Y = 0 + 0.1 + 0.2 + + + + Y = 1 + 0.3 + 0.4 + + +
+ +

+ Note that the sum of all values in the table is 1; this is a probability distribution, and total probability must be 1. + This table doesn't show the distributions for X or Y individually. + The data for the two distributions is mixed together. + We can, if we wish, take this information and determine separate distributions for X and Y. + For the distribution for X, we need to know \Pr(X = 0) and \Pr(X = 1) (with no reference to Y). + We can get these probabilities by summing along the columns of the table: + + \Pr(X = 0) \amp = 0.1 + 0.3 = 0.4 + \Pr(X = 1) \amp = 0.2 + 0.4 = 0.6 + + To get the distribution for Y, we should add along the rows: + + \Pr(Y = 0) \amp = 0.1 + 0.2 = 0.3 + \Pr(Y = 1) \amp = 0.3 + 0.4 = 0.7 + +

+
+
+ +

+ If we start with the joint distribution, we can get the marginal distributions. + If we start with the marginal distributions, we can't necessarily find the joint distribution, because we won't know how the random variables interact. +

+ + + +

+ Random variables X and Y are called independent if the events X = x and Y = y are independent for every possible combination of x and y. +

+
+
+ + + +

+ Using the joint distribution and marginal distributions in , we can check independence of X and Y by going cell by cell through the joint distribution table. + The top-left cell shows \Pr(X = 0, Y = 0) = 0.1. + The marginal distributions have \Pr(X = 0) = 0.4 and \Pr(Y = 0) = 0.3. + If X and Y were independent, we would have + + \Pr(X = 0, Y = 0) \amp = \Pr(X = 0) \Pr(Y = 0) + \text{however, } 0.1 \amp \neq (0.4)(0.3) + + Therefore, X and Y are not independent. +

+ +

+ Note that we can stop checking now. + As soon as we find one cell in the joint distribution table where the independence condition fails, the two random variables are not independent. + In order to establish independence of random variables, all cells in the joint distribution table would have to pass our check. +

+
+
+ + + + +

+ TODO +

+
+
+
+
\ No newline at end of file