Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random Variables and their Properties

Similar presentations


Presentation on theme: "Random Variables and their Properties"— Presentation transcript:

1 Random Variables and their Properties
Learn fundamental theoretical concepts of random variables and probability distributions Describe the representation of randomness and data variability using probability distributions. Characterize probability distributions through attributes such as moments (mean, variance, skewness…) and other measures of central tendency. Estimate parameters of probability distributions from sample data

2 Text Coverage (Kottegoda and Rosso)
3.1 Random Variables, probability distributions and density functions (p86-94) 3.2 Descriptors of Random Variables 3.2.1 Expectation and other probability measures (p94-103) 3.2.3 Estimation of Parameters by method of moments (p ), Maximum Likelihood (p ), Jackknife and Bootstrap (p )

3 A random variable X is a variable whose outcomes (values) are governed by the laws of chance.
Discrete Values Probability Mass Function PX(x)=Pr(X=x)

4 Cumulative Distribution Function
FX(x)=Pr[X ≤ x]

5 Continuous Variable Probability density function

6 Cumulative distribution function

7 Moments of Random Variables

8 Estimation of parameters
Hillsborough River at Zephyr Hills, September flows = 8621 mgal S = 8194 mgal n = 31 mgal

9 Method of Moments Gamma distribution =1.1 =1.3 x 10-3

10 Method of Moments Log-Normal distribution =0.643 =8.29

11 Likelihood ln(L)= -311 (for gamma) ln(L)= -312 (for log normal)
Could use maximization of L or ln(L) to select parameters rather than fitting moments

12 Generating a random variable from a given distribution
F(U) F(X) U X Generate U from a uniform distribution between 0 and 1 Solve for X=F-1(U) Basis P(X<x)=P(U<F(x))=P(F-1(U)<x) F-1(U) is randomly distributed with CDF F(x)

13 Generating a Pseudo random number
There is a lot of lore about this. Refer to: Press, W. H., B. P. Flannery, S. A. Teukolsky and W. T. Vetterling, (1988), Numerical Recipes in C : The Art of Scientific Computing, Cambridge University Press, New York, 735 p. Congruential method Each r is an integer random number between 0 and m by (m-1) gives a number between 0 and 1 that repeats after at most m numbers. Numerical recipes gives "good" choices for a, c and m. R has built in functions runif to generate uniform random numbers, as well as other distributions, e.g rnorm, rgamma.

14 Generating a random variable from a discrete distribution in matlab
F(U) F(X) U X Xs=[x1 x2 x3 …] % Vector of x values Px=[p1 p2 p3 …] % Vector of pmf values CDFx=cumsum(Px) % CDF vector U=rand(1) % Uniform random number 0-1 X = Xs(find(CDFx>U,1) ) % Inverse of CDF


Download ppt "Random Variables and their Properties"

Similar presentations


Ads by Google