Download presentation
1
Review 6.1. 6.2 Know properties of Random Variables
A random variable, usually written X, is a variable whose possible values are numerical outcomes of a random phenomenon. There are two types of random variables, discrete and continuous. The mathematical function describing the possible values of a random variable and their associated probabilities is known as a probability distribution. In short : A Random Variable has a whole set of values ... ... and it could take on any of those values, randomly.
2
Discrete Random Variables
Definition. A random variable X is a discrete random variable if: there are a finite number of possible outcomes of X, or there are a countably infinite number of possible outcomes of X. A discrete variable is a variable whose value is obtained by counting. Examples: number of students present number of red marbles in a jar number of heads when flipping three coins students’ grade level
3
Discrete Example What if we flipped a fair coin four times? What are the possible outcomes and what is the probability of each? Probability Distribution for Number of Heads in 4 Flips of a Coin Heads 1 2 3 4 Probability 1/16 4/16 6/16 Probabilities alternatively may be written as P(X=0)=.0625, P(X=1) = .25 etc…
4
Example 2:Two balanced dice are rolled
Example 2:Two balanced dice are rolled. Let X be the sum of the two dice. a) Obtain the probability distribution of X. b) Find the mean and standard deviation of X. When the two balanced dice are rolled, there are 36 equally likely possible outcomes as shown below
5
The possible outcomes are equally likely hence the probabilities P(X) are given by :
P(2) = P(1,1) = 1 / 36 P(3) = P(1,2) + P(2,1) = 2 / 36 = 1 / 18 P(4) = P(1,3) + P(2,2) + P(3,1) = 3 / 36 = 1 / 12 P(5) = P(1,4) + P(2,3) + P(3,2) + P(4,1) = 4 / 36 = 1 / 9 P(6) = P(1,5) + P(2,4) + P(3,3) + P(4,2) + P(5,1)= 5 / 36 P(7) = P(1,6) + P(2,5) + P(3,4) + P(4,3) + P(5,2) + P(6,1) = 6 / 36 = 1 / 6 P(8) = P(2,6) + P(3,5) + P(4,4) + P(5,3) + P(6,2) = 5 / 36 P(9) = P(3,6) + P(4,5) + P(5,4) + P(6,3) = 4 / 36 = 1 / 9 P(10) = P(4,6) + P(5,5) + P(6,4) = 3 / 36 = 1 / 12 P(11) = P(5,6) + P(6,5) 2 / 36 = 1 / 18 P(12) = P(6,6) = 1 / 36 So for X = 2 p=1/36, for x =3 P = 1/18 etc. We will do mean and variance later ..
6
Review A continuous random variable differs from a discrete random variable in that it takes on an uncountably infinite number of possible outcomes. A random variable X is called continuous if it satisfies P(X = x) = 0 for each x A continuous random variable is defined by a probability density function p(x), with these properties: p(x) ≥ 0 and the area between the x-axis and the curve is 1: We Measure Continuous Random Variables Examples: height of students in class weight of students in class time it takes to get to school distance traveled between classes
7
Know the Uniform Distribution Example:
What’s the probability that x is between 0 and ½? Clinical Research Example: When randomizing patients in an RCT, we often use a random number generator on the computer. These programs work by randomly generating a number between 0 and 1 (with equal probability of every number in between). Then a subject who gets X<.5 is control and a subject who gets X>.5 is treatment. x p(x) 1 P(½ x 0)= ½
8
The diagram shows the probability density function of a continuous Random Variable X.
What is the value of b?
9
The diagram shows the probability density function of a continuous Random Variable X.
What is the value of b? B = 4
10
The diagram shows the probability density function of a continuous Random Variable X.
This is in the shape of a semicircle. Calculate the value of p correct to 3 decimal places.
12
Normal Random Variables
If Z ∼ N(0, 1) what is P(Z > −0.5)? The Normal distribution is symmetric so we know that P(Z > −0.5) = P(Z < 0.5) =
13
Normal Random Variables
A radar unit is used to measure speeds of cars on a motorway. The speeds are normally distributed with a mean of 90 km/hr and a standard deviation of 10 km/hr. What is the probability that a car picked at random is travelling at more than 100 km/hr?
14
Normal Random Variables
A radar unit is used to measure speeds of cars on a motorway. The speeds are normally distributed with a mean of 90 km/hr and a standard deviation of 10 km/hr. What is the probability that a car picked at random is travelling at more than 100 km/hr? Let x be the random variable that represents the speed of cars. x has μ = 90 and σ = 10. We have to find the probability that x is higher than 100 or P(x > 100) For x = 100 , z = ( ) / 10 = 1 P(x > 100) = P(z >, 1) = [total area] - [area to the left of z = 1] = = The probability that a car selected at a random has a speed greater than 100 km/hr is equal to
15
Expected value, formally
Discrete case: Continuous case:
16
Example The maximum patent life for a new drug is 17 years. Subtracting the length of time required by the Food and Drug Administration for testing and approval of the drug provides the actual patent life for the drug — that is, the length of time that the company has to recover research and development costs and to make a profit. The distribution of the lengths of actual patent lives for new drugs is as follows: What is the mean patent life for a new drug? Solution. The mean can be calculated as: E(Y)=∑y=yf(y)=3(0.03)+4(0.05)+⋯+12(0.03)+13(0.01)=7.9 That is, the average patent life for a new drug is 7.9 years.
17
Advanced Problem : Suppose the random variable X follows the uniform distribution on the first m positive integers. That is, suppose the p.m.f. of X is: f(x)=1/m for x = 1, 2, 3, ..., m What is the mean of X? the mean of the discrete uniform random variable X is: μ=E(X)=(m+1)/2
18
Variance, continuous Discrete case: Continuous case?:
19
Example Let's consider the probability mass functions (where both have means 4: What is the variance and standard deviation of X? How does it compare to the variance and standard deviation of Y?
20
Solution. The variance of X is calculated as:
σ∧2(X)=∑ [(X-)∧2*P(X)]=(3−4)∧2(0.3)+(4−4)∧2(0.4)+(5−4)∧2(0.3) =0.6 And, therefore, the standard deviation of X is: SQRT of .6 =0.77 The variance of Y is calculated as: σ∧2(Y)=∑[(Y-μ)∧2]=(1−4)∧2(0.4)+(2−4)∧2(0.1)+(6−4)∧2(0.3)+ (8−4)∧2(0.2)=8.4 Therefore, the standard deviation of Y is: Σ(Y) =√8.4‾‾‾=2.9
21
Example 2:Two balanced dice are rolled
Example 2:Two balanced dice are rolled. Let X be the sum of the two dice. a) Obtain the probability distribution of X. (Already Done) b) Find the mean and standard deviation of X. When the two balanced dice are rolled, there are 36 equally likely possible outcomes as shown below
22
The mean of X is given by µ = ∑ X P(X) = 2*(1/36)+3*(1/18)+4*(1/12)+5*(1/9)+6*(5/36)+7*(1/6)+8*(5/36)+9*(1/9)+10*(1/12)+11*(1/18)+12*(1/36) = 7 µ = σ Square Root [ ∑ (X- µ) 2 P(X) ] = Square Root [ (2-7)∧2*(1/36)+(3-7) ∧2*(1/18) +(4-7) ∧2*(1/12)+(5-7) ∧2*(1/9)+(6-7) ∧2*(5/36) +(7-7) ∧2*(1/6)+(8-7) ∧2*(5/36)+(9-7) ∧2*(1/9) +(10-7) ∧2*(1/12)+(11-7) ∧2*(1/18)+(12-7) ∧2*(1/36) ] = 2.41
23
Rules for Means and Variances
If X is a random variable and a and b are fixed numbers, then If X and Y are random variables, then
24
Another Nomenclature: Sums and Differences of Random Variables (MEANS)
If X and Y are random variables, then E(X + Y) = E(X) + E(Y) and E(X - Y) = E(X) - E(Y)
25
represent the average SAT math score.
Represent the average SAT verbal score. Suppose the equation Y = X converts a PSAT math score, X, into an SAT math score, Y. Suppose the average PSAT math score is 48. What is the average SAT math score? b= 10 NOT 100
26
Rules for Variances: If X is a random variable and a and b are fixed numbers, then If X and Y are independent random variables, then
27
Another Nomenclature:
Sums and Differences of Random Variables (Variances) Suppose X and Y are independent random variables. Then, the variance of (X + Y) and the variance of (X - Y) are described by the following equations Var(X + Y) = Var(X - Y) = Var(X) + Var(Y) Note: The standard deviation (SD) is always equal to the square root of the variance (Var). Thus, SD(X + Y) = sqrt[ Var(X + Y) ] and SD(X - Y) = sqrt[ Var(X - Y) ]
28
Transforming and Combining Random Variables
Example Transforming and Combining Random Variables Mr. Starnes likes between 8.5 and 9 grams of sugar in his hot tea. Suppose the amount of sugar in a randomly selected packet follows a Normal distribution with mean 2.17 g and standard deviation 0.08 g. If Mr. Starnes selects 4 packets at random, what is the probability his tea will taste right? Let X = the amount of sugar in a randomly selected packet. Then, T = X1 + X2 + X3 + X4. We want to find P(8.5 ≤ T ≤ 9). P(-1.13 ≤ Z ≤ 2.00) = – = There is about an 85% chance Mr. Starnes’s tea will taste right. µT = µX1 + µX2 + µX3 + µX4 = = 8.68
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.