Simple Random Sample A simple random sample SRS

  • Slides: 22
Download presentation
Simple Random Sample • A simple random sample (SRS) of size n consists of

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

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· 2· 3· 4· 5. • The number of ways to choose k items out of n without replacement is given by • Example: The number of ways to select 3 soldier from a group of 5 is: 5!/(3!· 2!) = 10. • This is also known as the binomial coefficient. week 5 2

Discrete Random Variables • A random variable (r. v. ) assigns a numerical value

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 X has a countable number of possible values. • The probability distribution of a discrete random variable X is a graph, table, or formula that lists the values xi that X can take and their probabilities pi. • The probability distribution must satisfy two conditions: 1. Every pi is a number between 0 and 1. 2. The sum of the pi’s must equal 1. week 5 3

Examples 1. Consider the experiment of tossing a coin. Define a random variable as

Examples 1. Consider the experiment of tossing a coin. Define a random variable as follows: X = 1 if a H comes up = 0 if a T comes up. The Probability function of X is given in the following table x P(X = x) 1 0 p 1 - p This is an example of a Bernoulli r. v. 2. Toss a coin 4 times. Let X be the number of H’s. Find the probability function of X. Draw a probability histogram. week 5 4

3. 4. Let X be a r. v counting the number of girls in

3. 4. Let X be a r. v counting the number of girls in a family with 3 children. The probability function of X is given in the following table. x P(X = x) 0 1 2 3 (0. 5)3 = 0. 125 3·(0. 5)3 = 0. 375 (0. 5)3 = 0. 125 Toss a coin until the 1 st H. Let X be the number of T’s before the 1 st H. Find the probability function of X. week 5 5

Mean (expected value) of a discrete r. v. • The mean of a r.

Mean (expected value) of a discrete r. v. • The mean of a r. v. X is denoted by μx and can be found using the following formula: • Examples: 1. The mean of the Bernoulli r. v defined in example 1 above is : μx= 0·(1 -p) + 1·p = p 2. The mean number of girls in a family with 3 children is 1. 5. • Exercise: Find the mean of X in example 3 above. week 5 6

Example – Discrete Uniform r. v • Roll a six-sided die. Define a r.

Example – Discrete Uniform r. v • Roll a six-sided die. Define a r. v. X to be the number shown on the die. That is, X = 1 if die lands on 1, X = 2 if die lands on 2, etc. The probability distribution of X is given in the table below: x P(X = x) 1 2 3 4 5 6 1/6 1/6 1/6 The mean of X is … week 5 7

Rules for Mean of r. v • For any two r. v’s X and

Rules for Mean of r. v • For any two r. v’s X and Y and constants a and b, 1. μ x + a = μx + a. 2. μ b·x = b·μx. 3. μ b·x + a = b·μx + a. 4. μ X + Y = μX + μY. • Example: The price X of Nike sports shoes is a random variable with mean μx = 200$. Before the holidays Nike company had a promotion: “ Pay 10$ less for each item and get 20% 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 = 20$. 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.

The variance of a r. v. • • The variance of a r. v. is an average of the squared deviations from the mean, (X – μx)2. The Variance of a discrete r. v. is • The standard deviation σX of a r. v. is the square root of its variance. • Examples: 1. The variance of a Bernoulli r. v is σ2 x = p – p 2 = p(1 - p) 2. The variance of the Uniform example above is σ2 x = (91/6) – (3. 5)2 = 2. 9167 week 5 9

Rules for variances • If X is a r. v. and a and b

Rules for variances • If X is a r. v. and a and b are constants, then 1. 2. 3. 4. If X and Y are independent r. v’s then, week 5 10

 • If X and Y are not independent, where ρ is the correlation

• If X and Y are not independent, where ρ is the correlation between X and Y. • Two random variables X and Y are independent if knowing that any event involving X 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 X 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 ? week 5 11

The binomial distribution • The binomial setting: Ø There is a fixed number, n,

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, X counts the number of successes in n trials. Notation: X ~ Bin(n, p). • Example: A biased coin (P(H) = p = 0. 6) ) is tossed 5 times. Let X be the number of H’s. Find P(X = 2). This X is a binomial r. v. week 5 12

Probability function of the binomial dist. • If X has a Bin(n, p) distribution,

Probability function of the binomial dist. • If X has a Bin(n, p) distribution, the probability function of X is given by for x = 0, 1, 2, …, n • The Mean and Variance of X are, μX = n·p , and σX = n·p·(1 -p) • Example: The mean number of H’s in the example above is μX = 5· 0. 6 = 3 , and the variance is σ2 X = 5· 0. 6· 0. 4 = 1. 2 week 5 13

Example You are planning a sample survey of small businesses in your area. You

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 X 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

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 12. week 5 15

The Poisson Distribution • A random variable X, that counts the number of events

The Poisson Distribution • A random variable X, 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: X ~ Poisson(λ) • If X has a Poisson(λ) distribution, the probability function of X is given by for x = 0, 1, 2, …, n • The mean and variance of X are: week 5 16

Examples week 5 17

Examples week 5 17

Question 1 Summer 2000, QIII b • Suppose that the ‘true’ odds are 6

Question 1 Summer 2000, 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 2000, Q D • While in the casino in your hotel,

Question 1 Summer 2000, 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 $20. 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

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 $2. 00 each. If the manufacturer wishes to maximize his expected profit, which process should he use? week 5 20

Exercise A set of 10 cards consists of 5 red cards and 5 black

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 X in these 4 cards. The r. v. X has which of the following probability distributions? a) B(10, 0. 5) b) B(4, 0. 5) c) None of the above. week 5 21

Exercise • There are 20 multiple-choice questions on an exam, each having responses a,

Exercise • There are 20 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 22