9 Annotated 5.4 and 5.5 Fall2014

download 9 Annotated 5.4 and 5.5 Fall2014

of 6

Transcript of 9 Annotated 5.4 and 5.5 Fall2014

  • 8/9/2019 9 Annotated 5.4 and 5.5 Fall2014

    1/6

    Stat 305, Fall 2014 Name

    Chapter 5.4: Joint Distributions and Independence

    Joint Distributions

    Definition: A joint distribution

    is, roughly speaking, a generalization of a random variableextended to multiple random variables.

    Although the concepts discussed in this section generalize to multiple random variables, thefollowing definitions and notation corresponds to cases involving only two random variables.

    We will only cover joint distributions of discrete random variables. Extensions to continuousrandom variables by replacing sums with integrals. More information on this can be foundin section 5.4 in the text.

    Example: Roll two six-sided dice, and look at the side facing up. Let X be the number onthe first die, and Y be the number on the second die. What is the (joint) probability of X =1 and Y = 2? What is the probability of getting a total of 7?

    Joint Probability Function

    Definition: A joint probability function is a non-negative function, f(x,y), that gives the jointprobability that both X=x and Y=y

    f(x, y) =P[X=x and Y =y] =P[X=x, Y =y]

    For a discrete pair of RVs, f(x,y) is typically displayed in a table (called a Contingency Table)

    Marginal Probability Function

    Definition: A marginal probability function is a probability for a single random variable ob-tained by summing the joint probability function over all possible values of the other variables.

    To get the marginal probability function for X, fX(x) =y

    f(x, y) i.e. sum across the rows of

    f(x,y).

    Similarly, fY(y) =x

    f(x, y) and we would sum down the columns of f(x,y).

    1

  • 8/9/2019 9 Annotated 5.4 and 5.5 Fall2014

    2/6

    Conditional Probability Function

    Recall the conditional probability is defined as P(X = x|Y = y) = P(X = x, Y = y)/P(Y = y)Definition: The conditional probability function of X given Y is

    fX|Y(x|y) =f(x, y)

    fy(y)

    and the conditional probability function of Y given X is

    fY|X(y|x) =f(x, y)

    fx(x)

    Note: the given part must always be specified as a specific value.

    Example 1

    Let X be the outer diameter (in mm) of a bolt and Y be the inner diameter (in mm) of thecorresponding nut. Use the info below to display f(x,y) in a table.

    X 25 24 23 25 26 25 23 24 26

    Y 26 27 26 27 26 27 27 28 28

    Joint Distribution f(x, y):

    26 27 28

    23

    24

    25

    26

    Marginal Distribution of X:

    x 23 24 25 26

    fX(x)

    Marginal Distribution of Y:

    y 26 27 28

    fY(y)

    1. P[X < Y]

    2. P[Y X= 3]

    2

  • 8/9/2019 9 Annotated 5.4 and 5.5 Fall2014

    3/6

    3. P[X= 25]

    4. Find the conditional probability that X=23 given that Y=26.

    5. Write out the conditional probability function of X given Y=26.

    Independence

    Definition: Discrete rvs X and Y are independent if their joint probability function f(x,y) is theproduct of their respective marginal probability functionsfor all x and y

    f(x, y) =fX(x)fY(y)

    If this does not hold, even for one (x,y) pair, then the variables X and Y are dependent.

    This definition is easily extended to more than two random variables:e.g. f(x,y,z) =fX(x)fY(y)fZ(z)

    Example 2

    Now suppose that when a person chooses one bolt, then the person randomly chooses one nut (thisimplies independence). Under this scenario, use the marginal probabilities to calculate the jointprobabilities in a table. This example uses different probabilities.

    26 27 28 fX(x)

    23 0.2

    24 0.4

    25 0.3

    26 0.1

    fY(y) 0.2 0.5 0.3

    3

  • 8/9/2019 9 Annotated 5.4 and 5.5 Fall2014

    4/6

    Chapter 5.5: Functions of Several Random Variables

    Linear Combinations of Random Variables

    Goal: Answer the question: Given the joint distribution of random variables X1, X2, . . . , X n, whatis the distribution function fU(u) of the variable U=g(X1, X2, . . . , X n)

    We focus on linear combinations of random variables g(X1, X2, . . . , X n) =a0+ a1X1+ +anXn

    There are methods for dealing with other functions of random variables discussed in yourbook, but we will not discuss them in this class.

    Example 2 (Cont. from 5.4)

    Suppose we are interested in U=Y X. Can we determine fU(u)? Also calculate E[U].

    Mean and Variance of Linear Combinations of RVs

    Proposition: If X1, X2, . . . , X n are n independent random variables, and a0, a1, . . . , an are n+ 1known constants, then the random variable U = a0+ a1X1+ +anXn has the following meanand variance:

    E(U) =a0+ a1E[X1] + a2E[X2] + + anE[Xn]

    V ar(U) =a21

    V ar[X1] + a2

    2V ar[X2] + + a

    2nV ar[Xn]

    Note: If the RVs are not independent, the formulas for E[U] still holds but the variance does not.

    Example 2

    Find E[U] and Var[U]

    Example 3

    Suppose XN(5, 2), Y N(10, 4) and X and Y are independent.

    E(1 X+ 2Y) =

    V ar(1 X+ 2Y) =

    4

  • 8/9/2019 9 Annotated 5.4 and 5.5 Fall2014

    5/6

    Sample Mean

    A common function we are often interested in is the sample mean,

    Xn= 1

    n(X1+ X2+ + Xn)

    whereX1, X2, . . . , X n are iid with E[Xi] = and V ar[Xi] =2 fori= 1, 2, . . . , n.

    E[Xn] = 1

    n(E[X1] + E[X2] + + E[Xn]) =

    1

    n( + + + ) =

    1

    n(n) =

    V ar[Xn] = 1

    n2(V ar[X1] + V ar[X2] + + V ar[Xn]) =

    1

    n2(2 + 2 + + 2) =

    1

    n2(n2) =

    2

    n

    IfX1, X2, . . . , X n are iid N(, 2) then XN(,

    2

    n)

    Example 4

    SupposeX1, X2, . . . , X 50are iid Poisson(3). CalculateE[X50] andV ar[X50]. If possible, also namethe distribution ofX50.

    Example 5

    SupposeX1, X2, . . . , X 10are iid N(5,2). Calculate E[X10] andV ar[X10]. If possible, also name thedistribution ofX10.

    Central Limit Theorem

    Applet: http://onlinestatbook.com/stat_sim/sampling_dist/index.html

    Notice that larger sample sizes lead to X having smaller variance and the distribution of beingcloser to normal.

    Central Limit Theorem (CLT): IfX1, X2, . . . , X 10 are iid rvs (with mean and variance 2), then

    for large n, the variable X is approximately normally distributed.

    Recall we showed earlier Xhas a mean and variance 2

    n. By the CLT, when n is large (generally

    n 25) then approximately,

    Xn N

    ,

    2

    n

    5

    http://onlinestatbook.com/stat_sim/sampling_dist/index.htmlhttp://onlinestatbook.com/stat_sim/sampling_dist/index.html
  • 8/9/2019 9 Annotated 5.4 and 5.5 Fall2014

    6/6

    Example 4 (cont.)

    Suppose X1, X2, . . . , X 50 are iid Poisson(3). What distribution does X50 follow? Is it exact orapproximate?

    Example 6

    Suppose X1, X2, . . . , X n are iid with a mean of 5 and a variance of 10.

    1. What distribution doesXn follow? Is it exact or approximate?

    2. What is the probability of observing a sample mean that is between 4 and 6 in a sample ofsize n=10?

    3. What is the probability of observing a sample mean that is between 4 and 6 in a sample ofsize n=90?

    If you had taken a sample of 90 people and found that their sample mean was less than 4 or greaterthan 6, what might you conclude?

    There was a chance of being between 4 and 6. Maybe I just got a REALLY rare sample of90 people.

    -OR-

    Maybe the population mean isnt really 5. (more likely scenario)

    6