Presentation is loading. Please wait.

Presentation is loading. Please wait.

3.0 Functions of One Random Variable

Similar presentations


Presentation on theme: "3.0 Functions of One Random Variable"— Presentation transcript:

1 3.0 Functions of One Random Variable
propagation of moments with linear functions propagation of moments with non-linear functions and an introduction to computational bias determining the pdf for non-linear functions y = x2 for x having a normal pdf x = y1/2 for y having a gamma pdf 3.0 : 1/8

2 Moments of Linear Functions
For linear functions, y = f(x), the mean and variance of y can be determined even when f(x) is not known. This is done by re-writing expectation in terms of x and f(x) using g(y)dy = f(x)dx [arising from P(y) = P(x)]. Example: y = ax + b where x is scaled by a and offset by b my is affected by both the scaling constant and offsetting constant, while the sy is affected only by the scaling constant. 3.0 : 2/8

3 Linear Function Example
Let y = 2x + 2 = (x), where x is a uniformly distributed, continuous random variable over the range, 1  x  3. Thus f(x) = 1/2. The following graph shows a histogram of 100,000 values of x and y. Note that the functional form (shape) of g(y) is the same as that for f(x). The moments of x and y are given below. 3.0 : 3/8

4 Moments of Non-Linear Functions
Try the previous approach for the non-linear function, y = x2 = (x). An expression for the mean is obtained by noting that the integral over x is the second moment. As a result, the mean of y differs from x2 by the variance of x. This is called computational bias. An equally simple function, y = 1/x, has expressions for the mean and variance that cannot be simplified by this procedure. Non-linear functions require that g(y) be determined. 3.0 : 4/8

5 Example of Computational Bias
Let y = 0.5x , where 1  x  3 and f(x) = 1/2. The following graph shows a histogram of 100,000 values of x and y. Note that the functional form of g(y) is not the same as f(x). The moments of x and y are given below. Note that the mean of y is biased by the variance of x. 3.0 : 5/8

6 PDF of Non-Linear Functions
Let the function of interest be given by y = f(x), where x is the independent random variable and y is the dependent random variable. If the pdf of x is known, what is the pdf of y? There are three requirements for the following approach to work: f(x) must be a strictly increasing or strictly decreasing function over the range of the random variable, x dy can be expressed in terms of dx there is an inverse function such that x = f-1(y), i.e. x = f-1(f(x)) The pdf for y, g(y), is determined by the following: Note that f(x) is evaluated over the range of y using the inverse function. The absolute value operator keeps g(y) positive. 3.0 : 6/8

7 For y = x2 and a Normal Density
Let y = x2, where -∞  x  ∞ and f(x) is a normal pdf with m = 0. The inverse function is given by x = y1/2, while |dx/dy| = y-1/2/2. The pdf, g(y), can be determined using the procedure on the last slide. The additional factor of two comes from the fact that two values of x give the same value of y. This doubles the probability of observing any specific value of y. The pdf g(y) has the general form of a gamma density with a = 1/2 and l = 1/2s2. Note that G(1/2) = p1/2. 3.0 : 7/8

8 For x = y1/2 and a Gamma Density
Let x =  y1/2, where y follows a gamma density over 0  y  ∞. This can be converted into f(x) using the inverse function, y = x2, and |dy/dx| = 2x. The factor of 1/2 comes from the fact that the probability of each y is split between positive and negative x values. This expression has a functional form similar to moments of a normal pdf. If a = 1/2 and l = 1/2s2, the functional form for f(x) reduces, as expected, to a normal pdf. 3.0 : 8/8


Download ppt "3.0 Functions of One Random Variable"

Similar presentations


Ads by Google