360 likes | 655 Views
STAT 230 MIDTERM 2 EXAM-AID November 14, 2011. Students Offering Support: Waterloo SOS. 2 nd Largest Chapter Nationally Out of 30 Chapters Expanded in the USA – Harvard and MIT have started their very first Chapter! Founded in 2005 by Greg Overholt (Laurier Alumni)
E N D
STAT 230 MIDTERM 2 EXAM-AID November 14, 2011
Students Offering Support: Waterloo SOS • 2nd Largest Chapter Nationally Out of 30 Chapters • Expanded in the USA – Harvard and MIT have started their very first Chapter! • Founded in 2005 by Greg Overholt (Laurier Alumni) • Since 2005, over 2,000 SOS volunteers have tutored over 25,000 students and raised more than $700,000 for various rural communities across Latin America • Founded at UW in 2008 • Tutored more than 8,000 students and raised $57,500 during 2010-2011 • Offering over 32 course this term, approximately 84 Exam-AID sessions!
Join the SOS Team! Waterloo SOS is now recruiting for the Winter 2012 Term! Available Committees: Outreach, Expansion, Sponsorship, Logistics (Tutors/Coordinators), Marketing, Internal, Digital Exam-AID Apply at waterloosos.com by November 30th and “like” us on Facebook!
2012 Outreach Trips!!! Usutachancha, Peru • Improve accessibility of school • April 21 – May 1, 2012 • Santa Rosa, Costa Rica • – Isolated area; classes susceptible to weather conditions • – Aug 18 – Sep 1, 2012 Email vpoutreach@waterloosos.com for more info and application!! Application Deadline is Friday, November 18th, 2011!
Introduction • Steve Hobbs • 3A Actuarial Science and Statistics Double Major • Second Time Volunteering for SOS • Pet peeves: waking up early, rocks in my shoe • Hobbs_Steve@hotmail.com
Outline 1. Probability Functions and CDFs • Discrete Probability Distributions • Expectation and Variance • Moment Generating Functions • Discrete Multivariate Distributions
Probability Function • Random Variable: Function that assigns a real number to each point in a sample space S • Discrete: takes on finite/countably infinite values • Probability Function (p.f.) : f(x) = P(X=x), defined for all x in the support of X (0 otherwise) • Two properties: • 0f(x)1 for all values of x • f(x) = 1 xA
Cumulative Distribution Function • Cumulative Distribution Function (CDF): F(x) = P(X x) for a real number x • If x is below the support of X, F(x) = 0 • If x is above the support of X, F(x) = 1 • Three properties: • F(x) is a non-decreasing function of x • 0F(x)1 for all values of x • lim x- = 0 and lim x+ = 1 • f(x) = F(x) – F(x-1) if X only takes integer values
Example 1 The p.f. of a random variable X is given by: f(x) = kx, x = 1, 2, … , 9 • Find k. Is this a valid p.f.? • Find F(x) for all values of x.
Discrete Uniform Distribution • Discrete Uniform: f(x) = 1/(b-a+1), x = a, a+1, …, b-1, b • Each data point is equally likely • i.e. fair die
Hypergeometric Distribution • Hypergeometric Distribution: • Pick n objects at random without replacement from a collection of N items, with r items labelled as “successes” • X = the number of successes chosen out of the n objects , x = max[0, n-(N-r)], … , min(r, n)
Example 2 Emily takes 4 boys to the dance. There are 13 boys, of whom 10 are ugly. Let X be the number of good-looking boys Emily takes to the dance: a) Define an appropriate p.f. b) What is the probability Emily takes 2 or fewer good- looking boys to the dance?
Binomial Distribution • Binomial Distribution: • X = # of successes on n independent trials • Success or failure on each trial • Probability of success on each trial = p(with replacement) , x = 0, 1, … , n
Example 3 Steve’s pickup lines succeed on 5% of girls when he is sober and 10% of girls when he is drunk. Steve is sober 40% of the time. a) If Steve’s state of sobriety is unknown, what is the probability that 2 out of 10 pickup lines are successful? b) Given that 2 out of 10 pickup lines were successful, what is the probability that Steve was sober?
Negative Binomial Distribution • Negative Binomial Distribution: • X = # of failures before the kth success • Success or failure on each independent trial • Probability of success on each trial = p
Negative Binomial Distribution • Negative Binomial Distribution: • Special case: k = 1 (Geometric) • Alternate form: let Y = total number of trials to achieve k successes (= X + k):
Example 4 Groupon offers a discount on Laurier student fees to the first 25 people to sign up for the discount. Assume that a student has a 20% chance of agreeing to sign up for the discount when approached. Let N represent the number of people you must ask to find 25 willing to sign up for the discount. a) What is f(20)? f(50)? b) Would the answers to a) change if there were only 200 prospective Laurier students, of whom 40 would be willing to sign up if approached?
Poisson Distribution • Poisson Distribution: • X usually represents the number of occurrences of an event
Poisson Process • To use a Poisson distribution, our events should be governed by three properties: • Independence: # of events in non-overlapping intervals are independent • Individuality: P(2 or more events occurring at the same time) is close to 0 • Homogeneity/Uniformity: Events occur at a uniform rate over time • can be replaced by t, where is the rate of occurrence per unit time (or space, etc.)
Poisson from Binomial • The Poisson distribution can be obtained as the limiting distribution of the Binomial as n and p0 • Here, we fix np to be equal to and use a Poisson to approximate the Binomial
Example 5 Suppose that visits to the bathroom follow a Poisson process with an average of 3 visits per day. Find the probability that there will be: a) 6 visits in a period of 2.5 days b) 2 visits in the first day of the 2.5 day period, given that 6 visits occur in the entire period
Expectation • Expected Value (Mean): E(X) = xf(x) • Often denoted • E(g(X)) = g(x)f(x) • Expectation is a linear operator: • E(aX + b) = aE(X) + b • E[ag1(X) + bg2(X)] = aE[g1(X)] + bE[g2(X)] xA xA
Discrete Expected Values • Discrete Uniform [a,b] E(X) = (a+b)/2 • Hypergeometric (n, r, N) E(X) = nr/N • Binomial (n, p) E(X) = np • Negative Binomial (k, p) E(X) = k(1-p)/p • Poisson () E(X) =
Example 6 Santa is delivering presents to 10 children. For the first 5 children, Santa delivers two presents to every child who is nice. The probability of a child being nice is 70%. For the second 5 children, Santa allows the children to reach into his sack and pull out a present. Santa has also mixed lumps of coal into his sack, and children continue to pick presents until they get a lump of coal. The probability of picking a lump of coal is 40%. What is the total expected number of presents for all 10 children?
Variance • Variance: Var(X) = E[(X – E(X))2] • Calculation form: E(X2) – E(X)2 • Standard deviation = Var(X) • Variance/standard deviation measure the spread of our data • Var(aX + b) = a2Var(X)
Discrete Variances • Binomial (n, p) Var(X) = np(1-p) • Poisson () Var(X) = • Negative Binomial (k, p) Var(X) = k(1-p)/p2
Example 7 A game is played where a fair coin is tossed until the first tail occurs. You win $2n if n tosses are needed for n = 1, 2, 3, 4, 5 but lose $256 if n > 5. Determine the expectation of your winnings.
Moment Generating Functions • Moment Generating Function (MGF) MX(t) = E(etX) = etx f(x) • MX(0) = 1 • MX' (0) = E(X) (derivative with respect to t) • MX(r)(0) = E(Xr) (derivatives with respect to t) xA
Example 8 Let X be a random variable taking values in the set {0, 1, 2} with moments E(X) = 1, E(X2) = 3/2. a) Find P(X = i), i = 0, 1, 2 b) Find the MGF of X c) Find Var(2X + 3)
Example 9 Prove that the variance of the Poisson distribution with parameter is .
Joint Probability Function • Joint p.f. of X and Y: f(x, y) = P(X=x and Y=y) • f(x1, x2, …, xn) = P(X1 = x1, X2 = x2, … , Xn = xn) • Just like for the p.f. of one random variable, a valid joint probability function will have: • 0 f(x,y)1 • f(x,y) = 1 A x,y
Marginal Probability Function • Given the joint probability function for X and Y, we can calculate the marginal p.f. of X and the marginal p.f. of Y: • f1(x) = fX(x) = P(X = x) = f(x,y) • f2(y) = fY(y) = P(Y = y) = f(x,y) • Each of these distributions are valid p.f.s! A y A x
Conditional p.f.s and Independence • f(x|y) = f(x,y) , defined over the range of X f2(y) • y is fixed • Function of x and y • Valid p.f. (all probabilities between 0 and 1, sum over all x should equal 1) • X and Y are independent if and only if f(x,y) = f1(x) f2(y) for all pairs (x,y) • f(x|y) = f1 (x) if X and Y are independent
Example 10 The joint probability function of X and Y is given by: a) Are X and Y independent? b) Find E(X) c) Find P(X > Y) and P(X=1| Y = 0)
Multinomial Distribution • Consider an experiment with n independent trials and k distinct outcomes, with probability of success pi for the ith outcome • Let Xi be the number of times outcome i occurs: Then f(x1,…,xk) = n! p1x1 p2x2 … pkxk x1!x2!...xk! , where x1 + x2 + … + xk = n and p1 + p2 + … + pk = 1 • Marginal distribution of Xi is Bin(n, pi)
Example 11 Stat 230 students got grades of C, D, E, or F on the first Stat 230 midterm. The probability of a randomly selected student being in these categories are 0.1, 0.4, 0.3, and 0.2, respectively. What is the probability that a group of 25 randomly chosen students will include: a) 3 C’s, 11 D’s, 7 E’s, and 4F’s b) 3 C’s and 11 D’s