Example: flip a coin 10 times
A random variable (RV) takes on values that are unknown in advance, but determined by an experiment
A numerical summary of a random outcome
Example: the number of heads from 10 coin flips
Random variable X takes on individual values (xi) from a set of possible values
Often capital letters to denote RV's
Example: Let X be the number of Heads from 10 coin flips. xi∈{0,1,2,...,10}
Example: Let X be the number of times your computer crashes this semester1, xi∈{0,1,2,3,4}
1 Please, back up your files!
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
Probability distribution function (pdf) summarizes the possible outcomes of X and their probabilities
fX=pi,i=1,2,...,k
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
Probability distribution function (pdf) summarizes the possible outcomes of X and their probabilities
fX=pi,i=1,2,...,k
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
Probability distribution function (pdf) summarizes the possible outcomes of X and their probabilities
fX=pi,i=1,2,...,k
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
What is f(0)?
What is f(3)?
crashes<-tibble(number = c(0,1,2,3,4), prob = c(0.80, 0.10, 0.06, 0.03, 0.01))ggplot(data = crashes)+ aes(x = number, y = prob)+ geom_col(fill="#0072B2")+ labs(x = "Number of Crashes", y = "Probability")+ theme_classic(base_family = "Fira Sans Condensed", base_size=20)
Cumulative distribution function (pdf) lists probability X will be at most (less than or equal to) a given value xi
Example:
xi | f(x) | F(x) |
---|---|---|
0 | 0.80 | 0.80 |
1 | 0.10 | 0.90 |
2 | 0.06 | 0.96 |
3 | 0.03 | 0.99 |
4 | 0.01 | 1.00 |
Cumulative distribution function (pdf) lists probability X will be at most (less than or equal to) a given value xi
Example:
xi | f(x) | F(x) |
---|---|---|
0 | 0.80 | 0.80 |
1 | 0.10 | 0.90 |
2 | 0.06 | 0.96 |
3 | 0.03 | 0.99 |
4 | 0.01 | 1.00 |
Cumulative distribution function (pdf) lists probability X will be at most (less than or equal to) a given value xi
Example:
xi | f(x) | F(x) |
---|---|---|
0 | 0.80 | 0.80 |
1 | 0.10 | 0.90 |
2 | 0.06 | 0.96 |
3 | 0.03 | 0.99 |
4 | 0.01 | 1.00 |
What is the probability your computer will crash at most once, F(1)?
What about three times, F(3)?
crashes<-crashes %>% mutate(cum_prob = cumsum(prob))crashes
## # A tibble: 5 × 3## number prob cum_prob## <dbl> <dbl> <dbl>## 1 0 0.8 0.8 ## 2 1 0.1 0.9 ## 3 2 0.06 0.96## 4 3 0.03 0.99## 5 4 0.01 1
ggplot(data = crashes)+ aes(x = number, y = cum_prob)+ geom_col(fill="#0072B2")+ labs(x = "Number of Crashes", y = "Probability")+ theme_classic(base_family = "Fira Sans Condensed", base_size=20)
E(X)=k∑i=1pixi
E(X)=k∑i=1pixi
E(X)=p1x1+p2x2+⋯+pkxk
A probability-weighted average of X, with each xi weighted by its associated probability pi
Also called the "mean" or "expectation" of X, always denoted either E(X) or μX
Example: Suppose you lend your friend $100 at 10% interest. If the loan is repaid, you receive $110. You estimate that your friend is 99% likely to repay, but there is a default risk of 1% where you get nothing. What is the expected value of repayment?
Example:
Let X be a random variable that is described by the following pdf:
xi | P(X=xi) |
---|---|
1 | 0.50 |
2 | 0.25 |
3 | 0.15 |
4 | 0.10 |
Calculate E(X).
# Make a Random Variable called XX<-tibble(x_i=c(1,2,3,4), # values of X p_i=c(0.50,0.25,0.15,0.10)) # probabilitiesX %>% summarize(expected_value = sum(x_i*p_i))
## # A tibble: 1 × 1## expected_value## <dbl>## 1 1.85
σ2X=E[(xi−μX)2]=n∑i=1(xi−μX)2pi
σX=√σ2X
Example: What is the standard deviation of computer crashes?
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
# get the expected value crashes %>% summarize(expected_value = sum(number*prob))
## # A tibble: 1 × 1## expected_value## <dbl>## 1 0.35
# save this for quick useexp_value<-0.35crashes_2 <- crashes %>% select(-cum_prob) %>% # we don't need the cdf # create new columns mutate(deviations = number - exp_value, # deviations from exp_value deviations_sq = deviations^2, weighted_devs_sq = prob * deviations^2) # square deviations
# look at what we madecrashes_2
## # A tibble: 5 × 5## number prob deviations deviations_sq weighted_devs_sq## <dbl> <dbl> <dbl> <dbl> <dbl>## 1 0 0.8 -0.35 0.122 0.098 ## 2 1 0.1 0.65 0.423 0.0423## 3 2 0.06 1.65 2.72 0.163 ## 4 3 0.03 2.65 7.02 0.211 ## 5 4 0.01 3.65 13.3 0.133
# now we want to take the expected value of the squared deviations to get variancecrashes_2 %>% summarize(variance = sum(weighted_devs_sq), # variance sd = sqrt(variance)) # sd is square root
## # A tibble: 1 × 2## variance sd## <dbl> <dbl>## 1 0.648 0.805
Example: What is the standard deviation of the random variable we saw before?
xi | P(X=xi) |
---|---|
1 | 0.50 |
2 | 0.25 |
3 | 0.15 |
4 | 0.10 |
Hint: you already found it's expected value.
Continuous random variables can take on an uncountable (infinite) number of values
So many values that the probability of any specific value is infinitely small: P(X=xi)→0
Instead, we focus on a range of values it might take on
Probability density function (pdf) of a continuous variable represents the probability between two values as the area under a curve
The total area under the curve is 1
Since P(a)=0 and P(b)=0, P(a<X<b)=P(a≤X≤b)
Example: P(0≤X≤2)
ggplot
!P(a≤X≤b)=∫baf(x)dx
P(X≤k)
Example: P(X≤2)
P(X≥k)=1−P(X≤k)
Example: P(X≥2)=1−P(X≤2)
P(X≥2)= area under the curve to the right of 2
X∼N(μ,σ)
FYI: The pdf of X∼N(μ,σ) is P(X=k)=1√2πσ2e−12((k−μ)σ)2
Do not try and learn this, we have software and (previously tables) to calculate pdfs and cdfs
68-95-99.7% empirical rule: for a normal distribution:
P(μ−1σ≤X≤μ+1σ)≈ 68%
68-95-99.7% empirical rule: for a normal distribution:
P(μ−1σ≤X≤μ+1σ)≈ 68%
P(μ−2σ≤X≤μ+2σ)≈ 95%
68-95-99.7% empirical rule: for a normal distribution:
P(μ−1σ≤X≤μ+1σ)≈ 68%
P(μ−2σ≤X≤μ+2σ)≈ 95%
P(μ−3σ≤X≤μ+3σ)≈ 99.7%
68/95/99.7% of observations fall within 1/2/3 standard deviations of the mean
Z∼N(0,1)
Φ(k)=P(Z≤k)
Z=xi−μσ
Subtract any value by the distribution's mean and divide by standard deviation
Z: number of standard deviations xi value is away from the mean
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Z=X−μσ
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Z=X−μσ
Z=634.8−1.87155.28
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Z=X−μσ
Z=634.8−1.87155.28
Z=−4.1
This is 4.1 standard deviations (σ) beneath the mean, an extremely low probability event.
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
P(−3.2−2.45.6<X−2.45.6<8−2.45.6)
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
P(−3.2−2.45.6<X−2.45.6<8−2.45.6)
P(−1<Z<1)
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
P(−3.2−2.45.6<X−2.45.6<8−2.45.6)
P(−1<Z<1)
P(X±1σ)=0.68
You Try: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
What percent of the funds would you expect to be earning 2.4% or less?
What percent of the funds would you expect to be earning between -8.8% and 13.6%?
What percent of the funds would you expect to be earning returns greater than 13.6%?
Probability to the left of zi
P(Z≤zi)=Φ(zi)⏟cdf of zi
Probability to the right of zi
P(Z≥zi)=1−Φ(zi)⏟cdf of zi
Probability between z1 and z2
P(z1≥Z≥z2)=Φ(z2)⏟cdf of z2−Φ(z1)⏟cdf of z1
pnorm()
calculates p
robabilities with a norm
al distribution with arguments:x =
the valuemean =
the meansd =
the standard deviationlower.tail =
TRUE
if looking at area to LEFT of valueFALSE
if looking at area to RIGHT of valueExample: Let the distribution of grades be normal, with mean 75 and standard deviation 10.
pnorm(80, mean = 75, sd = 10, lower.tail = FALSE) # looking to right
## [1] 0.3085375
Example: Let the distribution of grades be normal, with mean 75 and standard deviation 10.
pnorm(80, mean = 75, sd = 10, lower.tail = TRUE) # looking to left
## [1] 0.6914625
Example: Let the distribution of grades be normal, with mean 75 and standard deviation 10.
# subtract two left tails!pnorm(85, # larger number first! mean = 75, sd = 10, lower.tail = TRUE) - # looking to left, & SUBTRACT pnorm(65, # smaller number second! mean = 75, sd = 10, lower.tail = TRUE) #looking to left
## [1] 0.6826895
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
o | Tile View: Overview of Slides |
Esc | Back to slideshow |
Example: flip a coin 10 times
A random variable (RV) takes on values that are unknown in advance, but determined by an experiment
A numerical summary of a random outcome
Example: the number of heads from 10 coin flips
Random variable X takes on individual values (xi) from a set of possible values
Often capital letters to denote RV's
Example: Let X be the number of Heads from 10 coin flips. xi∈{0,1,2,...,10}
Example: Let X be the number of times your computer crashes this semester1, xi∈{0,1,2,3,4}
1 Please, back up your files!
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
Probability distribution function (pdf) summarizes the possible outcomes of X and their probabilities
fX=pi,i=1,2,...,k
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
Probability distribution function (pdf) summarizes the possible outcomes of X and their probabilities
fX=pi,i=1,2,...,k
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
Probability distribution function (pdf) summarizes the possible outcomes of X and their probabilities
fX=pi,i=1,2,...,k
Example:
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
What is f(0)?
What is f(3)?
crashes<-tibble(number = c(0,1,2,3,4), prob = c(0.80, 0.10, 0.06, 0.03, 0.01))ggplot(data = crashes)+ aes(x = number, y = prob)+ geom_col(fill="#0072B2")+ labs(x = "Number of Crashes", y = "Probability")+ theme_classic(base_family = "Fira Sans Condensed", base_size=20)
Cumulative distribution function (pdf) lists probability X will be at most (less than or equal to) a given value xi
Example:
xi | f(x) | F(x) |
---|---|---|
0 | 0.80 | 0.80 |
1 | 0.10 | 0.90 |
2 | 0.06 | 0.96 |
3 | 0.03 | 0.99 |
4 | 0.01 | 1.00 |
Cumulative distribution function (pdf) lists probability X will be at most (less than or equal to) a given value xi
Example:
xi | f(x) | F(x) |
---|---|---|
0 | 0.80 | 0.80 |
1 | 0.10 | 0.90 |
2 | 0.06 | 0.96 |
3 | 0.03 | 0.99 |
4 | 0.01 | 1.00 |
Cumulative distribution function (pdf) lists probability X will be at most (less than or equal to) a given value xi
Example:
xi | f(x) | F(x) |
---|---|---|
0 | 0.80 | 0.80 |
1 | 0.10 | 0.90 |
2 | 0.06 | 0.96 |
3 | 0.03 | 0.99 |
4 | 0.01 | 1.00 |
What is the probability your computer will crash at most once, F(1)?
What about three times, F(3)?
crashes<-crashes %>% mutate(cum_prob = cumsum(prob))crashes
## # A tibble: 5 × 3## number prob cum_prob## <dbl> <dbl> <dbl>## 1 0 0.8 0.8 ## 2 1 0.1 0.9 ## 3 2 0.06 0.96## 4 3 0.03 0.99## 5 4 0.01 1
ggplot(data = crashes)+ aes(x = number, y = cum_prob)+ geom_col(fill="#0072B2")+ labs(x = "Number of Crashes", y = "Probability")+ theme_classic(base_family = "Fira Sans Condensed", base_size=20)
E(X)=k∑i=1pixi
E(X)=k∑i=1pixi
E(X)=p1x1+p2x2+⋯+pkxk
A probability-weighted average of X, with each xi weighted by its associated probability pi
Also called the "mean" or "expectation" of X, always denoted either E(X) or μX
Example: Suppose you lend your friend $100 at 10% interest. If the loan is repaid, you receive $110. You estimate that your friend is 99% likely to repay, but there is a default risk of 1% where you get nothing. What is the expected value of repayment?
Example:
Let X be a random variable that is described by the following pdf:
xi | P(X=xi) |
---|---|
1 | 0.50 |
2 | 0.25 |
3 | 0.15 |
4 | 0.10 |
Calculate E(X).
# Make a Random Variable called XX<-tibble(x_i=c(1,2,3,4), # values of X p_i=c(0.50,0.25,0.15,0.10)) # probabilitiesX %>% summarize(expected_value = sum(x_i*p_i))
## # A tibble: 1 × 1## expected_value## <dbl>## 1 1.85
σ2X=E[(xi−μX)2]=n∑i=1(xi−μX)2pi
σX=√σ2X
Example: What is the standard deviation of computer crashes?
xi | P(X=xi) |
---|---|
0 | 0.80 |
1 | 0.10 |
2 | 0.06 |
3 | 0.03 |
4 | 0.01 |
# get the expected value crashes %>% summarize(expected_value = sum(number*prob))
## # A tibble: 1 × 1## expected_value## <dbl>## 1 0.35
# save this for quick useexp_value<-0.35crashes_2 <- crashes %>% select(-cum_prob) %>% # we don't need the cdf # create new columns mutate(deviations = number - exp_value, # deviations from exp_value deviations_sq = deviations^2, weighted_devs_sq = prob * deviations^2) # square deviations
# look at what we madecrashes_2
## # A tibble: 5 × 5## number prob deviations deviations_sq weighted_devs_sq## <dbl> <dbl> <dbl> <dbl> <dbl>## 1 0 0.8 -0.35 0.122 0.098 ## 2 1 0.1 0.65 0.423 0.0423## 3 2 0.06 1.65 2.72 0.163 ## 4 3 0.03 2.65 7.02 0.211 ## 5 4 0.01 3.65 13.3 0.133
# now we want to take the expected value of the squared deviations to get variancecrashes_2 %>% summarize(variance = sum(weighted_devs_sq), # variance sd = sqrt(variance)) # sd is square root
## # A tibble: 1 × 2## variance sd## <dbl> <dbl>## 1 0.648 0.805
Example: What is the standard deviation of the random variable we saw before?
xi | P(X=xi) |
---|---|
1 | 0.50 |
2 | 0.25 |
3 | 0.15 |
4 | 0.10 |
Hint: you already found it's expected value.
Continuous random variables can take on an uncountable (infinite) number of values
So many values that the probability of any specific value is infinitely small: P(X=xi)→0
Instead, we focus on a range of values it might take on
Probability density function (pdf) of a continuous variable represents the probability between two values as the area under a curve
The total area under the curve is 1
Since P(a)=0 and P(b)=0, P(a<X<b)=P(a≤X≤b)
Example: P(0≤X≤2)
ggplot
!P(a≤X≤b)=∫baf(x)dx
P(X≤k)
Example: P(X≤2)
P(X≥k)=1−P(X≤k)
Example: P(X≥2)=1−P(X≤2)
P(X≥2)= area under the curve to the right of 2
X∼N(μ,σ)
FYI: The pdf of X∼N(μ,σ) is P(X=k)=1√2πσ2e−12((k−μ)σ)2
Do not try and learn this, we have software and (previously tables) to calculate pdfs and cdfs
68-95-99.7% empirical rule: for a normal distribution:
P(μ−1σ≤X≤μ+1σ)≈ 68%
68-95-99.7% empirical rule: for a normal distribution:
P(μ−1σ≤X≤μ+1σ)≈ 68%
P(μ−2σ≤X≤μ+2σ)≈ 95%
68-95-99.7% empirical rule: for a normal distribution:
P(μ−1σ≤X≤μ+1σ)≈ 68%
P(μ−2σ≤X≤μ+2σ)≈ 95%
P(μ−3σ≤X≤μ+3σ)≈ 99.7%
68/95/99.7% of observations fall within 1/2/3 standard deviations of the mean
Z∼N(0,1)
Φ(k)=P(Z≤k)
Z=xi−μσ
Subtract any value by the distribution's mean and divide by standard deviation
Z: number of standard deviations xi value is away from the mean
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Z=X−μσ
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Z=X−μσ
Z=634.8−1.87155.28
Example: On August 8, 2011, the Dow dropped 634.8 points, sending shock waves through the financial community. Assume that during mid-2011 to mid-2012 the daily change for the Dow is normally distributed, with the mean daily change of 1.87 points and a standard deviation of 155.28 points. What is the Z-score?
Z=X−μσ
Z=634.8−1.87155.28
Z=−4.1
This is 4.1 standard deviations (σ) beneath the mean, an extremely low probability event.
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
P(−3.2−2.45.6<X−2.45.6<8−2.45.6)
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
P(−3.2−2.45.6<X−2.45.6<8−2.45.6)
P(−1<Z<1)
Example: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
Convert to standard normal to find Z-scores for 8 and −3.2.
P(−3.2<X<8)
P(−3.2−2.45.6<X−2.45.6<8−2.45.6)
P(−1<Z<1)
P(X±1σ)=0.68
You Try: In the last quarter of 2015, a group of 64 mutual funds had a mean return of 2.4% with a standard deviation of 5.6%. These returns can be approximated by a normal distribution.
What percent of the funds would you expect to be earning between -3.2% and 8.0% returns?
What percent of the funds would you expect to be earning 2.4% or less?
What percent of the funds would you expect to be earning between -8.8% and 13.6%?
What percent of the funds would you expect to be earning returns greater than 13.6%?
Probability to the left of zi
P(Z≤zi)=Φ(zi)⏟cdf of zi
Probability to the right of zi
P(Z≥zi)=1−Φ(zi)⏟cdf of zi
Probability between z1 and z2
P(z1≥Z≥z2)=Φ(z2)⏟cdf of z2−Φ(z1)⏟cdf of z1
pnorm()
calculates p
robabilities with a norm
al distribution with arguments:x =
the valuemean =
the meansd =
the standard deviationlower.tail =
TRUE
if looking at area to LEFT of valueFALSE
if looking at area to RIGHT of valueExample: Let the distribution of grades be normal, with mean 75 and standard deviation 10.
pnorm(80, mean = 75, sd = 10, lower.tail = FALSE) # looking to right
## [1] 0.3085375
Example: Let the distribution of grades be normal, with mean 75 and standard deviation 10.
pnorm(80, mean = 75, sd = 10, lower.tail = TRUE) # looking to left
## [1] 0.6914625
Example: Let the distribution of grades be normal, with mean 75 and standard deviation 10.
# subtract two left tails!pnorm(85, # larger number first! mean = 75, sd = 10, lower.tail = TRUE) - # looking to left, & SUBTRACT pnorm(65, # smaller number second! mean = 75, sd = 10, lower.tail = TRUE) #looking to left
## [1] 0.6826895