Chapter 9 Continuous Probability Distributions Flashcards

1
Q

Define PDF, CDF, PPF. P 79

A

ˆ PDF: Probability Density Function, returns the probability of a given continuous outcome.
ˆ CDF: Cumulative Distribution Function, returns the probability of a value less than or equal to a given outcome.
ˆ PPF: Percent-Point Function, returns a discrete value that is less than or equal to the given probability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A normal distribution with a mean of zero and a standard deviation of 1 is called… P 80

A

A standard normal distribution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can we create a simulated normal distribution using python numpy and draw n samples from it? P 80

A

from numpy.random import normal

normal(mean (mu), standard deviation (sigma), number of samples (n)) NumPy function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give a code example of how we can simulate and then calculate PDF and CDF of a normal distribution in python? P 80

A

pdf and cdf for a normal distribution

from scipy.stats import norm
from matplotlib import pyplot
# define distribution parameters
mu = 50
sigma = 5
# create distribution
dist = norm(mu, sigma)
# plot pdf
values = [value for value in range(30, 70)]
probabilities = [dist.pdf(value) for value in values]
pyplot.plot(values, probabilities)
pyplot.show()
# plot cdf
cprobs = [dist.cdf(value) for value in values]
pyplot.plot(values, cprobs)
pyplot.show()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the 68-95-99.7 rule for normal distribution? P 82

A

The 68-95-99.7 rule, is the approximate percentage of the data covered by ranges defined by 1, 2, and 3 standard deviations from the mean.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is exponential distribution? P 83

A

The exponential distribution is a continuous probability distribution where a few outcomes are the most likely, with a rapid decrease in probability to all other outcomes. For example: The time until the default of a loan

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the equivalent of exponential distribution for discrete random variables? P 83

A

It is the continuous random variable equivalent to the geometric probability distribution for discrete random variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Using what parameters can we describe an exponential distribution? P 83

A

Scale (Beta or β): The mean and standard deviation of the distribution.
Sometimes the distribution is defined more formally with a parameter lambda or rate.
The beta parameter is defined as the reciprocal of the lambda parameter
(β = 1 /λ )
Rate (lambda or λ) = Rate of change in the distribution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can we use exponential distribution in python using numpy? P 83

A

We can define a distribution with a mean of 50 and sample random numbers from this distribution. We can achieve this using the exponential() NumPy function. The example below samples and prints 10 numbers from this distribution.
# sample an exponential distribution
from numpy.random import exponential
# define the distribution
beta = 50
n = 10
# generate the sample
sample = exponential(beta, n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can we calculate properties such as moments, PDF, CDF, etc. of an exponential distribution in python? Code P 84

A

We can define an exponential distribution using the expon() SciPy function and then calculate properties such as the moments, PDF, CDF, and more.
# pdf and cdf for an exponential distribution
from scipy.stats import expon
from matplotlib import pyplot
# define distribution parameter
beta = 50
# create distribution
dist = expon(beta)
# plot pdf
values = [value for value in range(50, 70)]
probabilities = [dist.pdf(value) for value in values]
pyplot.plot(values, probabilities)
pyplot.show()
# plot cdf
cprobs = [dist.cdf(value) for value in values]
pyplot.plot(values, cprobs)
pyplot.show()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an important related distribution to exponential distribution called? P 86

A

An important related distribution is the double exponential distribution, also called the Laplace distribution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Pareto distribution? P 86

A

A Pareto distribution is named after Vilfredo Pareto and is may be referred to as a power-law distribution. It is also related to the Pareto principle (or 80/20 rule) which is a heuristic for continuous random variables that follow a Pareto distribution, where 80% of the events are drawn from just 20% of the range of the continuous variable. . For example: The scores by players on a sports team.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can we define the Pareto distribution (using what parameter), in what range is it? P 87

A

Shape (alpha or α): The steepness of the decease in probability.
Values for the shape parameter are often small, such as between 1 and 3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is alpha for Pareto principle(or 80/20 rule)? P 87

A

When alpha is set to 1.161.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How can we define a Pareto distribution in python using numpy? P 87

A

We can define a distribution with a shape of 1.1
and sample random numbers from this distribution. We can achieve this using the pareto()
NumPy function.
# sample a pareto distribution
from numpy.random import pareto
# define the distribution
alpha = 1.1
n = 10
# generate the sample
sample = pareto(alpha, n)
print(sample)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can we define a Pareto distribution and calculate properties, such as the moments, PDF, CDF, and more in python? P 87

A

The example below defines a range of observations between 1 and about 10 and calculates the probability and cumulative probability for each and plots the result.
# pdf and cdf for a pareto distribution
from scipy.stats import pareto
from matplotlib import pyplot
# define distribution parameter
alpha = 1.5
# create distribution
dist = pareto(alpha)
# plot pdf
values = [value/10.0 for value in range(10, 100)]
probabilities = [dist.pdf(value) for value in values]
pyplot.plot(values, probabilities)
pyplot.show()
# plot cdf
cprobs = [dist.cdf(value) for value in values]
pyplot.plot(values, cprobs)
pyplot.show()