Code icon

The App is Under a Quick Maintenance

We apologize for the inconvenience. Please come back later

Menu iconMenu iconData Analysis Foundations with Python
Data Analysis Foundations with Python

Chapter 11: Probability Theory

11.3: Specialized Probability Distributions

11.3.1 Exponential Distribution

The Exponential distribution is a probability distribution that is used to model the time between events in a Poisson point process. This process is characterized by the occurrence of events that happen continuously and independently at a constant rate, denoted by $λ$. In other words, the Exponential distribution is a continuous probability distribution that describes the amount of time it takes before an event occurs in a Poisson process. 

This distribution is widely used in various fields, including engineering, economics, and physics, where it is used to model the time between occurrences of certain events. For example, the Exponential distribution can be used to model the time between failures of a mechanical system, the time between customer arrivals in a queue, or the time between radioactive decay events. 

The Exponential distribution is a fundamental concept in probability theory and is an essential tool for modeling and analyzing a wide range of real-world phenomena.


Probability Density Function (PDF):

f(x;λ)=λe−λxfor x≥0x≥0.


Example: Waiting Time for Bus Arrival

Let's say you're waiting for a bus that arrives, on average, every 15 minutes. The rate λ would then be 1/15 buses per minute. The probability that you'll have to wait exactly 10 minutes would be:

import math

lmbda = 1/15
x = 10

prob = lmbda * math.exp(-lmbda * x)

11.3.2 Poisson Distribution

The Poisson distribution is a statistical concept that describes the probability of a specific number of events (k) occurring within a fixed interval of time. This probability distribution is used in a wide range of fields, including engineering, physics, and biology. It is particularly useful when analyzing rare events that occur at random intervals, such as the number of defects in a batch of products, the number of calls received by a customer service center in a given hour, or the number of accidents that occur on a particular stretch of road in a month.

The Poisson distribution is named after French mathematician Siméon Denis Poisson, who first introduced the concept in the early 19th century. It is related to other probability distributions, such as the binomial and normal distributions, and can be derived from them under certain conditions.

To calculate the Poisson distribution, you need to know the average rate of occurrence of the event (λ) and the specific time interval in which you are interested. Once you have these values, you can use the Poisson formula to calculate the probability of k events occurring within that time interval.

Overall, the Poisson distribution is a powerful tool for understanding the probability of rare events occurring within a fixed time period. By using this concept, researchers and analysts can make more informed decisions and gain deeper insights into the phenomena they are studying.


Probability Mass Function (PMF):

Example: Cars Passing Through a Tunnel

Imagine a tunnel where, on average, 5 cars pass through every minute. What is the probability exactly 3 cars will pass through in the next minute?

from scipy.stats import poisson

lmbda = 5  # average number of cars per minute
k = 3  # number of occurrences

prob = poisson.pmf(k, lmbda)

11.3.3 Beta Distribution

The Beta distribution is a widely used family of continuous probability distributions that is defined on the interval [0, 1]. It is parameterized by two positive shape parameters, \alpha and \beta. The Beta distribution is a versatile distribution that can be used to model a wide range of phenomena, including proportions, proportions of successes and failures, and the behavior of random variables that take on values in the range [0, 1].

This distribution is often used in Bayesian statistics, where it is used to model the prior and posterior distributions of probabilities, as well as in machine learning, where it is used in the construction of probabilistic models. Furthermore, the Beta distribution has many interesting properties, such as the fact that it is a conjugate prior to the binomial distribution and that it can be used to model the behavior of random variables that are bounded in the range [0, 1].

PDF:


f(x; \alpha, \beta) = \frac{x^{\alpha-1} (1-x)^{\beta-1}}{B(\alpha, \beta)}

where B(\alpha, \beta) is the Beta function.


Example: Exam Grades

Suppose exam grades are known to follow a Beta distribution with parameters \alpha = 2 and \beta = 5. To find the probability that a randomly selected exam grade is between 0.4 and 0.6:

from scipy.stats import beta

a, b = 2, 5
prob = beta.cdf(0.6, a, b) - beta.cdf(0.4, a, b)

11.3.4 Gamma Distribution

The Gamma distribution is a versatile and useful probability distribution that is characterized by two parameters. This distribution is widely used in various fields of study, including physics, engineering, finance, and biology.

The Gamma distribution is actually a generalization of two other important distributions, namely the exponential and Erlang distributions. It is used to model a wide range of phenomena, from the time between earthquakes to the waiting time between incoming phone calls.

The Gamma distribution is also useful in reliability analysis, where it is used to model time-to-failure data. Additionally, it has applications in Bayesian analysis, where it is used as a conjugate prior for certain likelihood functions. Overall, the Gamma distribution is a powerful tool for analyzing complex data sets and is an essential part of any statistician's toolkit.

PDF:


f(x; \alpha, \beta) = \frac{\beta^\alpha x^{\alpha-1} e^{-\beta x}}{\Gamma(\alpha)}

where \Gamma(\alpha) is the gamma function.


Example: Waiting Time for a Specific Event

Suppose you know the average waiting time for a rare event follows a Gamma distribution with  \alpha = 2 and \beta = 1. Using Python:

from scipy.stats import gamma

alpha, beta = 2, 1
prob = gamma.pdf(x, alpha, scale=1/beta)

11.3.5 Log-Normal Distribution

The Log-Normal distribution is a probability distribution that is used to model continuous random variables that are positively skewed and have a distribution that is not normal. This distribution is particularly useful when the logarithm of the variable follows a normal distribution. It is commonly used in finance, economics, and engineering to model things such as stock prices, income, and the size of particles in a solution.

The Log-Normal distribution has many important properties and can be used to make predictions about the probability of certain events occurring. Additionally, it can be used to calculate confidence intervals and to perform hypothesis testing to determine whether certain assumptions about a data set are valid. Overall, the Log-Normal distribution is a powerful tool for analyzing and modeling data in a variety of fields.

PDF:


f(x; \mu, \sigma) = \frac{1}{x \sigma \sqrt{2\pi}} e^{-\frac{(ln(x) - \mu)^2}{2\sigma^2}}

Example: Stock Prices

Suppose stock prices are log-normally distributed with \mu = 0 and \sigma = 1.

from scipy.stats import lognorm

mu, sigma = 0, 1
prob = lognorm.pdf(x, sigma, scale=math.exp(mu))

11.3.6 Weibull Distribution

Used in reliability analysis and is defined by two parameters: the shape parameter k and the scale parameter \lambda.

PDF:


f(x; k, \lambda) = k/\lambda \times (x/\lambda)^{(k-1)} \times e^{-(x/\lambda)^k}

Example: Lifetime of a Product

Assume the lifetime T of a product is Weibull-distributed with k = 1.5 and \lambda = 5000.

from scipy.stats import weibull_min

k, lmbda = 1.5, 5000
prob = weibull_min.pdf(x, k, scale=lmbda

11.3: Specialized Probability Distributions

11.3.1 Exponential Distribution

The Exponential distribution is a probability distribution that is used to model the time between events in a Poisson point process. This process is characterized by the occurrence of events that happen continuously and independently at a constant rate, denoted by $λ$. In other words, the Exponential distribution is a continuous probability distribution that describes the amount of time it takes before an event occurs in a Poisson process. 

This distribution is widely used in various fields, including engineering, economics, and physics, where it is used to model the time between occurrences of certain events. For example, the Exponential distribution can be used to model the time between failures of a mechanical system, the time between customer arrivals in a queue, or the time between radioactive decay events. 

The Exponential distribution is a fundamental concept in probability theory and is an essential tool for modeling and analyzing a wide range of real-world phenomena.


Probability Density Function (PDF):

f(x;λ)=λe−λxfor x≥0x≥0.


Example: Waiting Time for Bus Arrival

Let's say you're waiting for a bus that arrives, on average, every 15 minutes. The rate λ would then be 1/15 buses per minute. The probability that you'll have to wait exactly 10 minutes would be:

import math

lmbda = 1/15
x = 10

prob = lmbda * math.exp(-lmbda * x)

11.3.2 Poisson Distribution

The Poisson distribution is a statistical concept that describes the probability of a specific number of events (k) occurring within a fixed interval of time. This probability distribution is used in a wide range of fields, including engineering, physics, and biology. It is particularly useful when analyzing rare events that occur at random intervals, such as the number of defects in a batch of products, the number of calls received by a customer service center in a given hour, or the number of accidents that occur on a particular stretch of road in a month.

The Poisson distribution is named after French mathematician Siméon Denis Poisson, who first introduced the concept in the early 19th century. It is related to other probability distributions, such as the binomial and normal distributions, and can be derived from them under certain conditions.

To calculate the Poisson distribution, you need to know the average rate of occurrence of the event (λ) and the specific time interval in which you are interested. Once you have these values, you can use the Poisson formula to calculate the probability of k events occurring within that time interval.

Overall, the Poisson distribution is a powerful tool for understanding the probability of rare events occurring within a fixed time period. By using this concept, researchers and analysts can make more informed decisions and gain deeper insights into the phenomena they are studying.


Probability Mass Function (PMF):

Example: Cars Passing Through a Tunnel

Imagine a tunnel where, on average, 5 cars pass through every minute. What is the probability exactly 3 cars will pass through in the next minute?

from scipy.stats import poisson

lmbda = 5  # average number of cars per minute
k = 3  # number of occurrences

prob = poisson.pmf(k, lmbda)

11.3.3 Beta Distribution

The Beta distribution is a widely used family of continuous probability distributions that is defined on the interval [0, 1]. It is parameterized by two positive shape parameters, \alpha and \beta. The Beta distribution is a versatile distribution that can be used to model a wide range of phenomena, including proportions, proportions of successes and failures, and the behavior of random variables that take on values in the range [0, 1].

This distribution is often used in Bayesian statistics, where it is used to model the prior and posterior distributions of probabilities, as well as in machine learning, where it is used in the construction of probabilistic models. Furthermore, the Beta distribution has many interesting properties, such as the fact that it is a conjugate prior to the binomial distribution and that it can be used to model the behavior of random variables that are bounded in the range [0, 1].

PDF:


f(x; \alpha, \beta) = \frac{x^{\alpha-1} (1-x)^{\beta-1}}{B(\alpha, \beta)}

where B(\alpha, \beta) is the Beta function.


Example: Exam Grades

Suppose exam grades are known to follow a Beta distribution with parameters \alpha = 2 and \beta = 5. To find the probability that a randomly selected exam grade is between 0.4 and 0.6:

from scipy.stats import beta

a, b = 2, 5
prob = beta.cdf(0.6, a, b) - beta.cdf(0.4, a, b)

11.3.4 Gamma Distribution

The Gamma distribution is a versatile and useful probability distribution that is characterized by two parameters. This distribution is widely used in various fields of study, including physics, engineering, finance, and biology.

The Gamma distribution is actually a generalization of two other important distributions, namely the exponential and Erlang distributions. It is used to model a wide range of phenomena, from the time between earthquakes to the waiting time between incoming phone calls.

The Gamma distribution is also useful in reliability analysis, where it is used to model time-to-failure data. Additionally, it has applications in Bayesian analysis, where it is used as a conjugate prior for certain likelihood functions. Overall, the Gamma distribution is a powerful tool for analyzing complex data sets and is an essential part of any statistician's toolkit.

PDF:


f(x; \alpha, \beta) = \frac{\beta^\alpha x^{\alpha-1} e^{-\beta x}}{\Gamma(\alpha)}

where \Gamma(\alpha) is the gamma function.


Example: Waiting Time for a Specific Event

Suppose you know the average waiting time for a rare event follows a Gamma distribution with  \alpha = 2 and \beta = 1. Using Python:

from scipy.stats import gamma

alpha, beta = 2, 1
prob = gamma.pdf(x, alpha, scale=1/beta)

11.3.5 Log-Normal Distribution

The Log-Normal distribution is a probability distribution that is used to model continuous random variables that are positively skewed and have a distribution that is not normal. This distribution is particularly useful when the logarithm of the variable follows a normal distribution. It is commonly used in finance, economics, and engineering to model things such as stock prices, income, and the size of particles in a solution.

The Log-Normal distribution has many important properties and can be used to make predictions about the probability of certain events occurring. Additionally, it can be used to calculate confidence intervals and to perform hypothesis testing to determine whether certain assumptions about a data set are valid. Overall, the Log-Normal distribution is a powerful tool for analyzing and modeling data in a variety of fields.

PDF:


f(x; \mu, \sigma) = \frac{1}{x \sigma \sqrt{2\pi}} e^{-\frac{(ln(x) - \mu)^2}{2\sigma^2}}

Example: Stock Prices

Suppose stock prices are log-normally distributed with \mu = 0 and \sigma = 1.

from scipy.stats import lognorm

mu, sigma = 0, 1
prob = lognorm.pdf(x, sigma, scale=math.exp(mu))

11.3.6 Weibull Distribution

Used in reliability analysis and is defined by two parameters: the shape parameter k and the scale parameter \lambda.

PDF:


f(x; k, \lambda) = k/\lambda \times (x/\lambda)^{(k-1)} \times e^{-(x/\lambda)^k}

Example: Lifetime of a Product

Assume the lifetime T of a product is Weibull-distributed with k = 1.5 and \lambda = 5000.

from scipy.stats import weibull_min

k, lmbda = 1.5, 5000
prob = weibull_min.pdf(x, k, scale=lmbda

11.3: Specialized Probability Distributions

11.3.1 Exponential Distribution

The Exponential distribution is a probability distribution that is used to model the time between events in a Poisson point process. This process is characterized by the occurrence of events that happen continuously and independently at a constant rate, denoted by $λ$. In other words, the Exponential distribution is a continuous probability distribution that describes the amount of time it takes before an event occurs in a Poisson process. 

This distribution is widely used in various fields, including engineering, economics, and physics, where it is used to model the time between occurrences of certain events. For example, the Exponential distribution can be used to model the time between failures of a mechanical system, the time between customer arrivals in a queue, or the time between radioactive decay events. 

The Exponential distribution is a fundamental concept in probability theory and is an essential tool for modeling and analyzing a wide range of real-world phenomena.


Probability Density Function (PDF):

f(x;λ)=λe−λxfor x≥0x≥0.


Example: Waiting Time for Bus Arrival

Let's say you're waiting for a bus that arrives, on average, every 15 minutes. The rate λ would then be 1/15 buses per minute. The probability that you'll have to wait exactly 10 minutes would be:

import math

lmbda = 1/15
x = 10

prob = lmbda * math.exp(-lmbda * x)

11.3.2 Poisson Distribution

The Poisson distribution is a statistical concept that describes the probability of a specific number of events (k) occurring within a fixed interval of time. This probability distribution is used in a wide range of fields, including engineering, physics, and biology. It is particularly useful when analyzing rare events that occur at random intervals, such as the number of defects in a batch of products, the number of calls received by a customer service center in a given hour, or the number of accidents that occur on a particular stretch of road in a month.

The Poisson distribution is named after French mathematician Siméon Denis Poisson, who first introduced the concept in the early 19th century. It is related to other probability distributions, such as the binomial and normal distributions, and can be derived from them under certain conditions.

To calculate the Poisson distribution, you need to know the average rate of occurrence of the event (λ) and the specific time interval in which you are interested. Once you have these values, you can use the Poisson formula to calculate the probability of k events occurring within that time interval.

Overall, the Poisson distribution is a powerful tool for understanding the probability of rare events occurring within a fixed time period. By using this concept, researchers and analysts can make more informed decisions and gain deeper insights into the phenomena they are studying.


Probability Mass Function (PMF):

Example: Cars Passing Through a Tunnel

Imagine a tunnel where, on average, 5 cars pass through every minute. What is the probability exactly 3 cars will pass through in the next minute?

from scipy.stats import poisson

lmbda = 5  # average number of cars per minute
k = 3  # number of occurrences

prob = poisson.pmf(k, lmbda)

11.3.3 Beta Distribution

The Beta distribution is a widely used family of continuous probability distributions that is defined on the interval [0, 1]. It is parameterized by two positive shape parameters, \alpha and \beta. The Beta distribution is a versatile distribution that can be used to model a wide range of phenomena, including proportions, proportions of successes and failures, and the behavior of random variables that take on values in the range [0, 1].

This distribution is often used in Bayesian statistics, where it is used to model the prior and posterior distributions of probabilities, as well as in machine learning, where it is used in the construction of probabilistic models. Furthermore, the Beta distribution has many interesting properties, such as the fact that it is a conjugate prior to the binomial distribution and that it can be used to model the behavior of random variables that are bounded in the range [0, 1].

PDF:


f(x; \alpha, \beta) = \frac{x^{\alpha-1} (1-x)^{\beta-1}}{B(\alpha, \beta)}

where B(\alpha, \beta) is the Beta function.


Example: Exam Grades

Suppose exam grades are known to follow a Beta distribution with parameters \alpha = 2 and \beta = 5. To find the probability that a randomly selected exam grade is between 0.4 and 0.6:

from scipy.stats import beta

a, b = 2, 5
prob = beta.cdf(0.6, a, b) - beta.cdf(0.4, a, b)

11.3.4 Gamma Distribution

The Gamma distribution is a versatile and useful probability distribution that is characterized by two parameters. This distribution is widely used in various fields of study, including physics, engineering, finance, and biology.

The Gamma distribution is actually a generalization of two other important distributions, namely the exponential and Erlang distributions. It is used to model a wide range of phenomena, from the time between earthquakes to the waiting time between incoming phone calls.

The Gamma distribution is also useful in reliability analysis, where it is used to model time-to-failure data. Additionally, it has applications in Bayesian analysis, where it is used as a conjugate prior for certain likelihood functions. Overall, the Gamma distribution is a powerful tool for analyzing complex data sets and is an essential part of any statistician's toolkit.

PDF:


f(x; \alpha, \beta) = \frac{\beta^\alpha x^{\alpha-1} e^{-\beta x}}{\Gamma(\alpha)}

where \Gamma(\alpha) is the gamma function.


Example: Waiting Time for a Specific Event

Suppose you know the average waiting time for a rare event follows a Gamma distribution with  \alpha = 2 and \beta = 1. Using Python:

from scipy.stats import gamma

alpha, beta = 2, 1
prob = gamma.pdf(x, alpha, scale=1/beta)

11.3.5 Log-Normal Distribution

The Log-Normal distribution is a probability distribution that is used to model continuous random variables that are positively skewed and have a distribution that is not normal. This distribution is particularly useful when the logarithm of the variable follows a normal distribution. It is commonly used in finance, economics, and engineering to model things such as stock prices, income, and the size of particles in a solution.

The Log-Normal distribution has many important properties and can be used to make predictions about the probability of certain events occurring. Additionally, it can be used to calculate confidence intervals and to perform hypothesis testing to determine whether certain assumptions about a data set are valid. Overall, the Log-Normal distribution is a powerful tool for analyzing and modeling data in a variety of fields.

PDF:


f(x; \mu, \sigma) = \frac{1}{x \sigma \sqrt{2\pi}} e^{-\frac{(ln(x) - \mu)^2}{2\sigma^2}}

Example: Stock Prices

Suppose stock prices are log-normally distributed with \mu = 0 and \sigma = 1.

from scipy.stats import lognorm

mu, sigma = 0, 1
prob = lognorm.pdf(x, sigma, scale=math.exp(mu))

11.3.6 Weibull Distribution

Used in reliability analysis and is defined by two parameters: the shape parameter k and the scale parameter \lambda.

PDF:


f(x; k, \lambda) = k/\lambda \times (x/\lambda)^{(k-1)} \times e^{-(x/\lambda)^k}

Example: Lifetime of a Product

Assume the lifetime T of a product is Weibull-distributed with k = 1.5 and \lambda = 5000.

from scipy.stats import weibull_min

k, lmbda = 1.5, 5000
prob = weibull_min.pdf(x, k, scale=lmbda

11.3: Specialized Probability Distributions

11.3.1 Exponential Distribution

The Exponential distribution is a probability distribution that is used to model the time between events in a Poisson point process. This process is characterized by the occurrence of events that happen continuously and independently at a constant rate, denoted by $λ$. In other words, the Exponential distribution is a continuous probability distribution that describes the amount of time it takes before an event occurs in a Poisson process. 

This distribution is widely used in various fields, including engineering, economics, and physics, where it is used to model the time between occurrences of certain events. For example, the Exponential distribution can be used to model the time between failures of a mechanical system, the time between customer arrivals in a queue, or the time between radioactive decay events. 

The Exponential distribution is a fundamental concept in probability theory and is an essential tool for modeling and analyzing a wide range of real-world phenomena.


Probability Density Function (PDF):

f(x;λ)=λe−λxfor x≥0x≥0.


Example: Waiting Time for Bus Arrival

Let's say you're waiting for a bus that arrives, on average, every 15 minutes. The rate λ would then be 1/15 buses per minute. The probability that you'll have to wait exactly 10 minutes would be:

import math

lmbda = 1/15
x = 10

prob = lmbda * math.exp(-lmbda * x)

11.3.2 Poisson Distribution

The Poisson distribution is a statistical concept that describes the probability of a specific number of events (k) occurring within a fixed interval of time. This probability distribution is used in a wide range of fields, including engineering, physics, and biology. It is particularly useful when analyzing rare events that occur at random intervals, such as the number of defects in a batch of products, the number of calls received by a customer service center in a given hour, or the number of accidents that occur on a particular stretch of road in a month.

The Poisson distribution is named after French mathematician Siméon Denis Poisson, who first introduced the concept in the early 19th century. It is related to other probability distributions, such as the binomial and normal distributions, and can be derived from them under certain conditions.

To calculate the Poisson distribution, you need to know the average rate of occurrence of the event (λ) and the specific time interval in which you are interested. Once you have these values, you can use the Poisson formula to calculate the probability of k events occurring within that time interval.

Overall, the Poisson distribution is a powerful tool for understanding the probability of rare events occurring within a fixed time period. By using this concept, researchers and analysts can make more informed decisions and gain deeper insights into the phenomena they are studying.


Probability Mass Function (PMF):

Example: Cars Passing Through a Tunnel

Imagine a tunnel where, on average, 5 cars pass through every minute. What is the probability exactly 3 cars will pass through in the next minute?

from scipy.stats import poisson

lmbda = 5  # average number of cars per minute
k = 3  # number of occurrences

prob = poisson.pmf(k, lmbda)

11.3.3 Beta Distribution

The Beta distribution is a widely used family of continuous probability distributions that is defined on the interval [0, 1]. It is parameterized by two positive shape parameters, \alpha and \beta. The Beta distribution is a versatile distribution that can be used to model a wide range of phenomena, including proportions, proportions of successes and failures, and the behavior of random variables that take on values in the range [0, 1].

This distribution is often used in Bayesian statistics, where it is used to model the prior and posterior distributions of probabilities, as well as in machine learning, where it is used in the construction of probabilistic models. Furthermore, the Beta distribution has many interesting properties, such as the fact that it is a conjugate prior to the binomial distribution and that it can be used to model the behavior of random variables that are bounded in the range [0, 1].

PDF:


f(x; \alpha, \beta) = \frac{x^{\alpha-1} (1-x)^{\beta-1}}{B(\alpha, \beta)}

where B(\alpha, \beta) is the Beta function.


Example: Exam Grades

Suppose exam grades are known to follow a Beta distribution with parameters \alpha = 2 and \beta = 5. To find the probability that a randomly selected exam grade is between 0.4 and 0.6:

from scipy.stats import beta

a, b = 2, 5
prob = beta.cdf(0.6, a, b) - beta.cdf(0.4, a, b)

11.3.4 Gamma Distribution

The Gamma distribution is a versatile and useful probability distribution that is characterized by two parameters. This distribution is widely used in various fields of study, including physics, engineering, finance, and biology.

The Gamma distribution is actually a generalization of two other important distributions, namely the exponential and Erlang distributions. It is used to model a wide range of phenomena, from the time between earthquakes to the waiting time between incoming phone calls.

The Gamma distribution is also useful in reliability analysis, where it is used to model time-to-failure data. Additionally, it has applications in Bayesian analysis, where it is used as a conjugate prior for certain likelihood functions. Overall, the Gamma distribution is a powerful tool for analyzing complex data sets and is an essential part of any statistician's toolkit.

PDF:


f(x; \alpha, \beta) = \frac{\beta^\alpha x^{\alpha-1} e^{-\beta x}}{\Gamma(\alpha)}

where \Gamma(\alpha) is the gamma function.


Example: Waiting Time for a Specific Event

Suppose you know the average waiting time for a rare event follows a Gamma distribution with  \alpha = 2 and \beta = 1. Using Python:

from scipy.stats import gamma

alpha, beta = 2, 1
prob = gamma.pdf(x, alpha, scale=1/beta)

11.3.5 Log-Normal Distribution

The Log-Normal distribution is a probability distribution that is used to model continuous random variables that are positively skewed and have a distribution that is not normal. This distribution is particularly useful when the logarithm of the variable follows a normal distribution. It is commonly used in finance, economics, and engineering to model things such as stock prices, income, and the size of particles in a solution.

The Log-Normal distribution has many important properties and can be used to make predictions about the probability of certain events occurring. Additionally, it can be used to calculate confidence intervals and to perform hypothesis testing to determine whether certain assumptions about a data set are valid. Overall, the Log-Normal distribution is a powerful tool for analyzing and modeling data in a variety of fields.

PDF:


f(x; \mu, \sigma) = \frac{1}{x \sigma \sqrt{2\pi}} e^{-\frac{(ln(x) - \mu)^2}{2\sigma^2}}

Example: Stock Prices

Suppose stock prices are log-normally distributed with \mu = 0 and \sigma = 1.

from scipy.stats import lognorm

mu, sigma = 0, 1
prob = lognorm.pdf(x, sigma, scale=math.exp(mu))

11.3.6 Weibull Distribution

Used in reliability analysis and is defined by two parameters: the shape parameter k and the scale parameter \lambda.

PDF:


f(x; k, \lambda) = k/\lambda \times (x/\lambda)^{(k-1)} \times e^{-(x/\lambda)^k}

Example: Lifetime of a Product

Assume the lifetime T of a product is Weibull-distributed with k = 1.5 and \lambda = 5000.

from scipy.stats import weibull_min

k, lmbda = 1.5, 5000
prob = weibull_min.pdf(x, k, scale=lmbda