{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

5_random_var

# 5_random_var - Random variables 9.07 A few notes on the...

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

Random variables 9.07 2/19/2004

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

View Full Document
A few notes on the homework If you work together, tell us who you’re working with. – You should still be generating your own homework solutions. Don’t just copy from your partner. We want to see your own words. Turn in your MATLAB code (this helps us give you partial credit) Label your graphs – xlabel(‘text’) – ylabel(‘text’) – title(‘text’)
More homework notes • Population vs. sample – The population to which the researcher wants to generalize can be considerably more broad than might be implied by the narrow sample. • High school students who take the SAT • High school students • Anyone who wants to succeed • Anyone

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

View Full Document
More homework notes • MATLAB: – If nothing else, if you can’t figure out something in MATLAB, find/email a TA, or track down one of the zillions of fine web tutorials. – Some specifics…
MATLAB Hint: MATLAB works best if you can think of your problem as an operation on a matrix. Do this instead of “for” loops, when possible. – E.G. coinflip example w/o for loops x = rand(5,10000); coinflip = x>0.5; numheads = sum(coinflip); % num H in 5 flips

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

View Full Document
MATLAB randn(N) -> NxN matrix! randn(1,N) -> 1xN matrix sum(x) vs. sum(x,2) hist(data, 1:10) vs. hist(data, 10) plot(hist(data)) vs. [n,x]=hist(data); plot(x,n)
A few more comments Expected value can tell you whether or not you want to play game even once. It tells you if the “game” is in your favor. In our example of testing positive for a disease, P(D) is the prior probability that you have the disease. What was the probability of you having the disease before you got tested? If you are from a risky population, P(D) may be higher than 0.001. Before you took the test you had a higher probability of having the disease, so after you test positive, your probability of having the disease, P(D|+) will be higher than 1/20.

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

View Full Document
Random Variables Variables that take numerical values associated with events in an experiment Either discrete or continuous • Integral (not sum) in equations below for continuous r.v. – Mean, µ , of a random variable is the sum of each possible value multiplied by its probability: µ = x i P(x i ) E(x) • Note relation to “expected value” from last time. – Variance is the average of squared deviations multiplied by the probability of each value σ 2 = (x i - µ ) 2 P(x i ) E((x- µ ) 2 )
We’ve already talked about a few special cases • Normal r.v.’s (with normal distributions) • Uniform r.v.’s (with distributions like this:) p x • Etc.

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

View Full Document
Random variables Can be made out of functions of other random variables. X r.v., Y r.v. -> Z=X+Y r.v. Z=sqrt(X)+5Y + 2 r.v.
Linear combinations of random variables We talked about this in lecture 2. Here’s a review, with new E() notation.

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.

{[ snackBarMessage ]}