Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Lecture 3 Dustin Lueker If events A and B are independent, then the events have no influence on each other ◦ P(A) is unaffected by whether or not B has occurred ◦ Mathematically, if A is independent of B P(A|B)=P(A) Multiplication rule for independent events A and B ◦ P(A∩B)=P(A)P(B) STA 291 Winter 09/10 Lecture 3 Flip a coin twice, what is the probability of observing two heads? Flip a coin twice, what is the probability of observing a head then a tail? A tail then a head? One head and one tail? A 78% free throw shooter is fouled while shooting a three pointer, what is the probability he makes all 3 free throws? None? STA 291 Winter 09/10 Lecture 3 X is a random variable if the value that X will assume cannot be predicted with certainty ◦ That’s why its called random Two types of random variables ◦ Discrete Can only assume a finite or countably infinite number of different values ◦ Continuous Can assume all the values in some interval STA 291 Winter 09/10 Lecture 3 A random variable X is called a Bernoulli r.v. if X can only take either the value 0 (failure) or 1 (success) Heads/Tails Live/Die Defective/Nondefective ◦ Probabilities are denoted by P(success) = P(1) = p P(failure) = P(0) = 1-p = q ◦ Expected value of a Bernoulli r.v. = p ◦ Variance = pq STA 291 Winter 09/10 Lecture 3 Suppose we perform several, we’ll say n, Bernoulli experiments and they are all independent of each other (meaning the outcome of one even doesn’t effect the outcome of another) ◦ Label these n Bernoulli random variables in this manner: X1, X2,…,Xn The probability of success in a single trial is p The probability of success doesn’t change from trial to trial We will build a new random variable X using all of these Bernoulli random variables: n X X1 X 2 Xn Xi i 1 ◦ What are the possible outcomes of X? What is X counting? STA 291 Winter 09/10 Lecture 3 The probability of observing k successes in n independent trails is n k nk P( X k ) p q , k 0,1, k , n, ◦ Assuming the probability of success is p ◦ Note: n n! k k!(n k )! Why do we need this? STA 291 Winter 09/10 Lecture 3 For small n, the Binomial coefficient “n choose k” can be derived without much mathematics n n! k k !(n k )! Example: where n ! 1 2 3 4 4! 4! 1 2 3 4 6 2 2!(4 2)! 2! 2! 1 2 1 2 STA 291 Winter 09/10 Lecture 3 n and 0! 1 Assume Zolton is a 68% free throw shooter ◦ What is the probability of Zolton making 5 out of 6 free throws? 6 P ( X 5) 0.685 (1 0.68) 65 5 6 0.1454 0.32 0.279 ◦ What is the probability of Zolton making 4 out of 6 free throws? 6 4 6 4 P( X 4) 0.68 (1 0.68) 4 15 0.2138 0.1024 0.3284 STA 291 Winter 09/10 Lecture 3 E ( X ) np Var ( X ) npq 2 SD( X ) npq STA 291 Winter 09/10 Lecture 3 A list of the possible values of a random variable X, say (xi) and the probability associated with each, P(X=xi) ◦ All probabilities must be nonnegative ◦ Probabilities sum to 1 0 P( xi ) 1 P( x ) 1 i STA 291 Winter 09/10 Lecture 3 X 0 1 2 3 4 P(X) .1 .2 .2 .15 .1 5 6 7 .05 .05 .15 The table above gives the proportion of employees who use X number of sick days in a year ◦ An employee is to be selected at random Let X = # of days of leave P(X=2) = P(X≥4) = P(X<4) = P(1≤X≤6) = STA 291 Winter 09/10 Lecture 3 Expected Value (or mean) of a random variable X ◦ Mean = E(X) = μ = ΣxiP(X=xi) Example X 2 4 6 8 10 12 P(X) .1 .05 .4 .25 .1 .1 ◦ E(X) = STA 291 Winter 09/10 Lecture 3 Variance ◦ Var(X) = E(X-μ)2 = σ2 = Σ(xi-μ)2P(X=xi) Example X 2 4 6 8 10 12 P(X) .1 .05 .4 .25 .1 .1 ◦ Var(X) = STA 291 Winter 09/10 Lecture 3 A random variable X is called a Bernoulli r.v. if X can only take either the value 0 (failure) or 1 (success) Heads/Tails Live/Die Defective/Nondefective ◦ Probabilities are denoted by P(success) = P(1) = p P(failure) = P(0) = 1-p = q ◦ Expected value of a Bernoulli r.v. = p ◦ Variance = pq STA 291 Winter 09/10 Lecture 3 Suppose we perform several, we’ll say n, Bernoulli experiments and they are all independent of each other (meaning the outcome of one even doesn’t effect the outcome of another) ◦ Label these n Bernoulli random variables in this manner: X1, X2,…,Xn The probability of success in a single trial is p The probability of success doesn’t change from trial to trial We will build a new random variable X using all of these Bernoulli random variables: n X X1 X 2 Xn Xi i 1 ◦ What are the possible outcomes of X? What is X counting? STA 291 Winter 09/10 Lecture 3 The probability of observing k successes in n independent trails is n k nk P( X k ) p q , k 0,1, k , n, ◦ Assuming the probability of success is p ◦ Note: n n! k k!(n k )! Why do we need this? STA 291 Winter 09/10 Lecture 3 For small n, the Binomial coefficient “n choose k” can be derived without much mathematics n n! k k !(n k )! Example: where n ! 1 2 3 4 4! 4! 1 2 3 4 6 2 2!(4 2)! 2! 2! 1 2 1 2 STA 291 Winter 09/10 Lecture 3 n and 0! 1 Assume Zolton is a 68% free throw shooter ◦ What is the probability of Zolton making 5 out of 6 free throws? 6 P ( X 5) 0.685 (1 0.68) 65 5 6 0.1454 0.32 0.279 ◦ What is the probability of Zolton making 4 out of 6 free throws? 6 4 6 4 P( X 4) 0.68 (1 0.68) 4 15 0.2138 0.1024 0.3284 STA 291 Winter 09/10 Lecture 3 E ( X ) np Var ( X ) npq 2 SD( X ) npq STA 291 Winter 09/10 Lecture 3