Lecture12_Spring11

# Lecture12_Spring11 - Elec210 Lecture 12 MATLAB functions...

This preview shows pages 1–6. Sign up to view the full content.

Elec210 Lecture 12 1 Elec210 Lecture 12 MATLAB functions for continuous random variables Functions (Transformations) of a Random Variable

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
MATLAB Functions for Continuous RVs Generating m by n arrays of random samples unifrnd(a,b,m,n) % uniform on [a,b] exprnd(1/lambda,m,n) % exponential with parameter lambda normrnd(mu,sigma,m,n) % normal with mean mu and std. dev. sigma gamrnd(alpha,1/lambda,m,n) % gamma with parameters alpha and lambda Stat (mean and variance) unifstat(a,b) % uniform on [a,b] expstat(1/lambda) % exponential with parameter lambda normstat(mu,sigma) % normal with mean mu and std. dev. sigma gamstat(alpha,1/lambda) % gamma with parameters alpha and lambda Elec210 Lecture 12 2
MATLAB Functions for Continuous RVs Cumulative distribution function unifcdf(x,a,b) % uniform on [a,b] expcdf(x,1/lambda) % exponential with parameter lambda normcdf(x,mu,sigma) % normal with mean mu and std. dev. sigma gamcdf(x,alpha,1/lambda) % gamma with parameters alpha and lambda Probability density function unifpdf(x,a,b) % uniform on [a,b] exppdf(x,1/lambda) % exponential with parameter lambda normpdf(x,mu,sigma) % normal with mean mu and std. dev. sigma gampdf(x,alpha,1/lambda) % gamma with parameters alpha and lambda Elec210 Lecture 12 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Elec210 Lecture 12 4 Elec210 Lecture 12 MATLAB functions for continuous random variables Functions (or Transformations ) of a Random Variable
Elec210 Lecture 12 5 Functions/Transforms of a Random Variable Problem statement: Given a random variable X with known distribution and a real valued function g ( x ), such that Y = g ( X ) is also a random variable. Find the distribution of Y . Solution methodology: The most important thing is to determine what type of random variable Y is!

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

### Page1 / 27

Lecture12_Spring11 - Elec210 Lecture 12 MATLAB functions...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online