Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random Variables/ Probability Models

Similar presentations


Presentation on theme: "Random Variables/ Probability Models"— Presentation transcript:

1 Random Variables/ Probability Models

2 Random Variables A random variable assumes a value based on the outcome of a random event. We use a capital letter, like X, to denote a random variable. A particular value of a random variable will be denoted with the corresponding lower case letter, in this case x.

3 Random Variables There are two types of random variables: Discrete random variables can take one of a countable number of distinct outcomes. Example: No. of Asthma Attacks, No. of Patients with a disease Continuous random variables can take any numeric value within a range of values. Example: Height, Weight, Cholesterol Levels

4 Expected Value: Center
A probability model for a random variable consists of: The collection of all possible values of a random variable, and the probabilities that the values occur. Of particular interest is the value we expect a random variable to take on, notated μ (for population mean) or E(X) for expected value.

5 Expected Value: Center
The expected value of a (discrete) random variable can be found by summing the products of each possible value by the probability that it occurs: Note: Be sure that every possible outcome is included in the sum and verify that you have a valid probability model to start with.

6 Expected Value Example Population values: 1, 1, 2, 2, 3, 3, 4, 4
E(X) = Mean = ( )/8 = 20/8 = 2.5 E(X) = 1*(0.25) + 2*(0.25) + 3*(0.25) + 4*(0.25) = 2.5 Example: Categorical Data: Smoke: Yes(1), No(0) Population values: 1, 0, 0, 1, 1, 1, 1, 0,0,1 E(X) = Mean = ( )/10 = 6/10 = 0.6 E(X) = 1*(0.6) + 0*(0.4) = 0.6

7 Hypertension Example

8 Hypertension Example

9 Question 19. Insurance A 65-year-old woman takes out a $100,000 term life insurance policy. The company charges an annual premium of $520. Estimate the company’s expected profit on such policies if mortality tables indicate that only 2.6% of women age 65 die within a year.

10 First Center, Now Spread…
For data, we calculated the standard deviation by first computing the deviation from the mean and squaring it. We do that with discrete random variables as well. The variance for a random variable is: The standard deviation for a random variable is:

11 Hypertension Example Find the standard deviation for the expected number of patients to be brought under control for every 4 who are treated.

12 More About Means and Variances
Expected Value of the sum of two random variables: Variance of the sum of two random variables: Standard deviation of the sum of two random variables:

13 More About Means and Variances
In general, The mean of the sum of two random variables is the sum of the means. The mean of the difference of two random variables is the difference of the means. E(X ± Y) = E(X) ± E(Y) If the random variables are independent, the variance of their sum or difference is always the sum of the variances. Var(X ± Y) = Var(X) + Var(Y)

14 More About Means and Variances
Adding or subtracting a constant from data shifts the mean but doesn’t change the variance or standard deviation: E(X ± c) = E(X) ± c Var(X ± c) = Var(X)

15 Continuous Random Variables
Good news: nearly everything we’ve said about how discrete random variables behave is true of continuous random variables, as well. When two independent continuous random variables have Normal models, so does their sum or difference. This fact will let us apply our knowledge of Normal probabilities to questions about the sum or difference of independent random variables.

16 Question 46

17 Discrete Probability Models
Bernoulli Trials We have Bernoulli trials if: there are two possible outcomes (success and failure). the probability of success, p, is constant. the trials are independent.

18 Bernoulli Random Variable
Let X take values: 0 and 1, P(X=1)=p P(X=0)=1-p=q We say that X has a Bernoulli distribution with parameter p. X~Bernoulli(p)

19 The Binomial Model A Binomial model tells us the probability for a random variable that counts the number of successes in a fixed number of Bernoulli trials. Two parameters define the Binomial model: n, the number of trials; and, p, the probability of success. We denote this Binom(n, p).

20 The Binomial Distribution
A fixed number of observations, n e.g., 15 tosses of a coin; 10 selected patients Each observation is categorized as to whether or not the “event of interest” occurred e.g., head or tail in each toss of a coin; patient has the disease or not Since these two categories are mutually exclusive When the probability of the event of interest is represented as p, then the probability of the event of interest not occurring is 1 – p (often written as q)

21 The Binomial Distribution
Constant probability for the event of interest occurring (p) for each observation Probability of getting a tail is the same each time we toss the coin Observations are independent The outcome of one observation does not affect the outcome of the other Two sampling methods deliver independence Infinite population without replacement Finite population with replacement

22 Example Population: 50 people, 40 Insured - P(Insured) = 0.80
Select 10 people from pool at random w/o replacement P(10th person insured | Ist 9 insured) = 31/41 = 0.75 Population: 500,000 people, 400,000 Insured - P(Insured) = 0.80 P(10th person insured | Ist 9 insured) = 399,991/499,991 = 0.80 (approximately)

23 Independence One of the important requirements for Bernoulli trials is that the trials be independent. When we don’t have an infinite population, the trials are not independent. But, there is a rule that allows us to pretend we have independent trials: The 10% condition: Bernoulli trials must be independent. If that assumption is violated, it is still okay to proceed as long as the sample is smaller than 10% of the population.

24 The Binomial Model HHHH THHH HHHT THHT HHTH THTH HHTT THTT
HTHT TTHH HHHT HHHH They are 16 possible outcomes HHHH THHH HHHT THHT HHTH THTH HHTT THTT HTHH TTHH HTHT TTHT HTTH TTTH HTTT TTTT The probability of getting all heads is 1/16 or (0.5) (0.5) (0.5) (0.5) equal to The probability of getting 50% heads and 50% tails is 6/16 (0.375). Probability Distribution for the number of heads No. of Heads 1 2 3 4 Proportion: 0.0625 0.25 0.375 .25

25 The Binomial Distribution
In n trials, there are ways to have k successes. Read nCx as “n choose x.” Note: n! = n ╳ (n – 1) ╳ … ╳ 2 ╳ 1, and n! is read as “n factorial.”

26 The Binomial Distribution
Binomial probability model for Bernoulli trials: Binom(n,p) n = number of trials p = probability of success q = 1 – p = probability of failure X = # of successes in n trials P(X = x) = nCx px qn–x

27 Example

28 Expected Value and Standard Deviation for a Binomial Random Variable

29 Question 16 (Review Exercises)
P(X = x) = nCx px qn–x Stocks Since the stock market began in 1872, stock prices have risen in about 73% of the years. Assuming that market performance is independent from year to year, what’s the probability that a) the market will rise for 3 consecutive years? b) the market will rise 3 years out of the next 5? c) the market will fall during at least 1 of the next 5 years? d) the market will rise during a majority of years over the next decade?

30 The Normal Model to the Rescue!
When dealing with a large number of trials in a Binomial situation, making direct calculations of the probabilities becomes tedious (or outright impossible). Fortunately, the Normal model comes to the rescue…

31 The Normal Model to the Rescue
As long as the Success/Failure Condition holds, we can use the Normal model to approximate Binomial probabilities. Success/failure condition: A Binomial model is approximately Normal if we expect at least 10 successes and 10 failures: np ≥ 10 and nq ≥ 10

32 Normal approximation to binomial
Condition: np>=10, n(1-p)>=10 Binomial can be closely approximated by a normal distribution with standardized variable

33 Continuous Random Variables
When we use the Normal model to approximate the Binomial model, we are using a continuous random variable to approximate a discrete random variable. So, when we use the Normal model, we no longer calculate the probability that the random variable equals a particular value, but only that it lies between two values.

34 Text Question (Review Exercises)
Condition: np>=10, n(1-p)>=10


Download ppt "Random Variables/ Probability Models"

Similar presentations


Ads by Google