Simple Random Sample A simple random sample (SRS) of size n consists of n elements from the population chosen in such a way that every set of n elements has an equal chance to be the sample actually selected. How to select an SRS? Hat method, Random number tables or software. Example week 5 1
Combinations and Permutations The number of ways to arrange k items in a row is given by k!. Example: The number of ways to arrange 5 soldiers in a row is: 5! = 1 3 4 5. The number of ways to choose k items out of n without replacement is given by n n! = k k!( n k)! Example: The number of ways to select 3 soldier from a group of 5 is: 5!/(3!!) = 10. This is also known as the binomial coefficient. week 5
Discrete Random Variables A random variable (r.v.) assigns a numerical value to the outcomes in the sample space of a random phenomenon. A discrete random variable has a countable number of possible values. The probability distribution of a discrete random variable is a graph, table, or formula that lists the values x i that can take and their probabilities p i. The probability distribution must satisfy two conditions: 1. Every p i is a number between 0 and 1.. The sum of the p i s must equal 1. week 5 3
Examples 1. Consider the experiment of tossing a coin. Define a random variable as follows: = 1 if a H comes up = 0 if a T comes up. The Probability function of is given in the following table x P( = x) 1 0 p 1- p This is an example of a Bernoulli r.v.. Toss a coin 4 times. Let be the number of H s. Find the probability function of. Draw a probability histogram. week 5 4
3. Let be a r.v counting the number of girls in a family with 3 children. The probability function of is given in the following table. x P( = x) 0 1 3 (0.5) 3 = 0.15 3 (0.5) 3 = 0.375 3 (0.5) 3 = 0.375 (0.5) 3 = 0.15 4. Toss a coin until the 1st H. Let be the number of T s before the 1st H. Find the probability function of. week 5 5
Mean (expected value) of a discrete r. v. The mean of a r. v. is denoted by μ x and can be found using the following formula: μ = x P( = x) = xi pi Examples: 1. The mean of the Bernoulli r.v defined in example 1 above is : μ x = 0 (1-p) + 1 p = p x. The mean number of girls in a family with 3 children is 1.5. Exercise: Find the mean of in example 3 above. i week 5 6
Example Discrete Uniform r.v Roll a six-sided die. Define a r. v. to be the number shown on the die. That is, = 1 if die lands on 1, = if die lands on, etc. The probability distribution of is given in the table below: x P( = x) 1 3 4 5 6 1/6 1/6 1/6 1/6 1/6 1/6 The mean of is week 5 7
Rules for Mean of r.v For any two r.v s and Y and constants a and b, 1. μ x + a = μ x + a.. μ b x = b μ x. 3. μ b x+ a = b μ x + a. 4. μ + Y = μ + μ Y. Example: The price of Nike sports shoes is a random variable with mean μ x = 00$. Before the holidays Nike company had a promotion: Pay 10$ less for each item and get 0% discount from the original price. a) What is the mean price during the promotion. b) Suppose in addition that during the promotion the mean price for Nike socks is μ Y = 0$. What is the expected value of your expenses if you are to buy one pair of shoes and one pair of socks? week 5 8
The variance of a r. v. The variance of a r. v. is an average of the squared deviations from the mean, ( μ x ). The Variance of a discrete r. v. is σ The standard deviation σ of a r. v. is the square root of its variance. Examples: ( x μ ) P( = x) = x P( = x) ( μ ) = x x 1. The variance of a Bernoulli r.v is σ x = p p = p(1- p). The variance of the Uniform example above is σ x = (91/6) (3.5) =.9167 week 5 9
Rules for variances If is a r. v. and a and b are constants, then 1. σ = σ + a. 3. σ b = b σ σ b + a = b σ 4. If and Y are independent r. v s then, σ = σ + σ + Y Y σ = σ + σ Y Y week 5 10
If and Y are not independent, σ = σ + σ ρσ Y + Y where ρ is the correlation between and Y. Y σ = σ + σ + ρσ Y Two random variables and Y are independent if knowing that any event involving alone did or did not occur tells us nothing about the occurrence of any event involving Y alone. Example: Consider again the Nike example above. If the stdev. of is σ x = 10$ and the stdev. of Y is σ Y = 8$. a) What is the stdev. of the shoes price during the promotion? b) What is the stdev. of your expenses if you were to buy one pair of shoes and one pair of socks? σ Y σ Y week 5 11
The binomial distribution The binomial setting: There is a fixed number, n, of observations. The n observations are independent. Each observation falls into one of just two categories ( success and failures ). The probability of a success (call it p) is the same for each observation. The binomial r.v, counts the number of successes in n trials. Notation: ~ Bin(n,p). Example: A biased coin (P(H) = p = 0.6) ) is tossed 5 times. Let be the number of H s. Find P( = ). This is a binomial r. v. week 5 1
Probability function of the binomial dist. If has a Bin(n, p) distribution, the probability function of is given by n x n x P( = x) = p ( 1 p) for x = 0,1,,,n x The Mean and Variance of are, μ = n p, and σ = n p (1-p) Example: The mean number of H s in the example above is μ = 5 0.6 = 3, and the variance is σ = 5 0.6 0.4 = 1. week 5 13
Example You are planning a sample survey of small businesses in your area. You will choose a SRS of businesses listed in the telephone book's Yellow Pages. Experience shows that only about half the businesses you contact will respond. (a) If you contact 150 businesses, it is reasonable to use the Bin(150, 0.5) distribution for the number of businesses who respond. Explain why. (b) What is the expected number (the mean) of businesses who will respond and what is its std dev.? week 5 14
Exercise The probability that a certain machine will produce a defective item is 1/4. If a random sample of 6 items is taken from the output of this machine, what is the probability that there will be 5 or more defectives in the sample? What is the expected value of defective items in a sample of size 1. week 5 15
The Poisson Distribution A random variable, that counts the number of events that will occur in a specific period of time or in a specific area or volume has a Poisson distribution. The mean (expected) number of events in each unit of time or space is denoted by λ. Notation: ~ Poisson(λ) If has a Poisson(λ) distribution, the probability function of is given by ( = x) The mean and variance of are: μ = λ P σ = λ = e λ x λ x! for x = 0,1,,,n week 5 16
Examples week 5 17
Question 1 Summer 000, QIII b Suppose that the true odds are 6 to 4 that team A will win an upcoming Stanley Cup playoff series (so that probability of A winning is 0.6). You place a bet in the amount of $100 on team A, The payoff you will receive if team A wins is $160. What is your expected net gain using the quoted odds above. If the casino accepts 1000 bets just like yours, what is the expected income for the casino and the standard dev. of this income. week 5 18
Question 1 Summer 000, Q D While in the casino in your hotel, you try the double till I win strategy for betting. Assume that the chances are 0.5 that you win or lose every time you play some casino game. You bet $10 to start. If you win, you quit. If you lose, you double your bet to $0. If you win, you quit. If you lose, you double your bet. You quit the moment you win a game, or you will quit when you lose 5 consecutive times. Write down all possible outcomes for your evening and their probabilities. Workout your net gain for each outcome above. What is your expected net gain. week 5 19
Exercise A golf ball manufacturer is considering whether or not he should change to a new production process. Eight percent of the balls produced by the old process are defective and cannot be sold while in the new process it is only five percent. But the cost of production in the new process is 90 cents per ball while in the old process it is 60 cents. The balls are sold at $.00 each. If the manufacturer wishes to maximize his expected profit, which process should he use? week 5 0
Exercise A set of 10 cards consists of 5 red cards and 5 black cards. The cards are shuffled thoroughly and I am given the first four cards. I count the number of red cards in these 4 cards. The r. v. has which of the following probability distributions? a) B(10, 0.5) b) B(4, 0.5) c) None of the above. week 5 1
Exercise There are 0 multiple-choice questions on an exam, each having responses a, b, c, and d. Each question is worth 5 points. And only one response per question is correct. Suppose that a student guesses the answer to question and her guesses from question to question are independent. If the student needs at least 40 points to pass the test. What is the probability that the student will pass the test? What is the expected (mean) score for this student. week 5