Presentation is loading. Please wait.

Presentation is loading. Please wait.

K. Shum Lecture 16 Description of random variables: pdf, cdf. Expectation. Variance.

Similar presentations


Presentation on theme: "K. Shum Lecture 16 Description of random variables: pdf, cdf. Expectation. Variance."— Presentation transcript:

1 K. Shum Lecture 16 Description of random variables: pdf, cdf. Expectation. Variance.

2 K. Shum Review: Area under a curve Riemann integral, by definition, is the limit of such approximations Approximate by rectangles. Width  0, areas of rectangles  integral.

3 K. Shum Mass of rod with uneven density Density  (x), is a function of x. The mass between x 1 and x 2, is the definite integral of  (x) from x 1 to x 2. If the difference (x 2 - x 1 ) is so small such that the density is roughly constant, the mass between x 1 and x 2 is approximately  (x 1 )(x 2 - x 1 ). x

4 K. Shum Center of Gravity Center of mass, or center of gravity, is the point where we can hold the rod in equilibrium (an unstable equilibrium). string M is the total mass.

5 K. Shum Moment of Inertia The second moment also have mechanical meaning. M is the total mass.

6 K. Shum Simulation of continuous by digital computer is never exact. provides good approximation if precision is high enough.

7 K. Shum Mass vs Probability Probability density function can be viewed as the density of a rod with unit mass. Mass of a single point with zero length is zero. The “center of gravity” of a pdf is the expectation of the random variable. The “moment of inertia” is the second moment.

8 K. Shum Cumulative density function of discrete random variable F(x) = def P(X  x). x F(x) 1 p 1 Example: Bernoulli random variable P(X=0) = p, P(X=1)=1-p.

9 K. Shum Derivative? Derivative of discontinuous function does not exist. However, if we allow generalized functions, such as the unit impulse function, also known as Dirac delta function, than we can talk about the pdf of discrete random variables. The pdf of Bernoulli random variable is the sum of two delta functions. f(x) = p  (x)+(1-p)  (x-1) 01

10 K. Shum Cumulative density function of continuous random variable Cdf F(x) of continuous random variable are differentiable (or piecewise differentiable). The derivative f(x) of cdf is the pdf. Fundamental theorem of calculus: (It is also equal to P(a<X  b) as P(X=a)=0.)

11 K. Shum Example: Uniform r.v. Cdf and pdf carry the same information. Usually we use pdf in computation. Cdf are found in tables of probability distribution. x x 1 1 1 1 F(x) f(x)

12 K. Shum How to generate random variable? If the cdf has a simple form, then we can use the inverse transform method. To generate a random variable with cdf F(x) –Compute the inverse of F. –Generate a uniform random variable U between 0 and 1. –Return F -1 (U).

13 K. Shum Expectation Suppose the pdf of a random variable X is f X (x). The expectation of X is defined as The integral reduces to summation if X is a discrete random variable, i.e., when f X (x) is a sum of delta functions.

14 K. Shum Easy properties E[X+b]=E[X]+b. E[aX] = aE[X]. E[g(X)]  g(E[X]) in general. If g(x)  h(x) for all x, than E[g(X)]  E[h(X)].

15 K. Shum Second moment and variance Second moment of a random variable X is the expectation of X 2. –E[X 2 ] Variance measures the level of variation from the mean. It is defined as the expectation of the square of deviation from the mean, –Var(X)=E[(X-E[X]) 2 ].

16 K. Shum Properties Var(X) = E[X 2 ]-(E[X]) 2. Var(X+b) = Var(X). Var(aX) = a 2 Var(X).

17 K. Shum What is the pdf of a function of X? Let f X (x) be the pdf of random variable X. What is the pdf of –X+b? –aX? –X 2 ? –g(X), where g(x) is a monotonically increasing function?


Download ppt "K. Shum Lecture 16 Description of random variables: pdf, cdf. Expectation. Variance."

Similar presentations


Ads by Google