Group 11
Feng Xinyi, Cao Xinyan, Wu Xiaoyi, Zuo Wanyang
overview
Exponential distribution and gamma distribution are two important distributions in probability theory.
Students may encounter the following difficulties or confusion when learning exponential distribution and gamma distribution:
1. Conceptual understanding: The exponential distribution describes the waiting time or interval time of a continuous random variable, while the gamma distribution is used to describe the sum of a series of independent random variables with the same exponential distribution. Understanding the basic concepts and properties of these two distributions is the key to learning.
2. Parameter explanation: Both the exponential distribution and the gamma distribution have parameters, but the explanation of the parameters may cause confusion. In the exponential distribution, the parameter is the rate parameter, usually denoted as λ or β, which is the reciprocal of the exponential distribution and represents the average number of events occurring per unit time. In the gamma distribution, there are two parameters: shape parameter. The shape parameter is usually expressed as α, shape parameter and scale parameter. Parameters are usually denoted as B, and they can be used to adjust the shape and scale of the distribution.
3. Density function and cumulative distribution function: Students may confuse the probability density function (PDF) and cumulative distribution function (CDF) of the exponential distribution and gamma distribution. PDF describes the probability density of a random variable taking a certain value, while CDF describes the probability that a random variable is less than or equal to a certain value. Understanding and distinguishing these two functions is critical to correctly applying distributions for inference and calculations.
4. The relationship between distributions: There is a certain relationship between exponential distribution and gamma distribution. In fact, the exponential distribution can be viewed as a gamma distribution with a shape parameter of 1. This relationship can cause confusion among students when understanding and applying the two distributions.
5. Parameter estimation and inference: In practical applications, students may need to estimate the parameters of exponential distribution or gamma distribution based on observation data. Parameter estimation involves statistical methods such as maximum likelihood estimation, which may require certain mathematical derivation and calculations. Students may need to understand the principles and applications of these methods.
In order to overcome these difficulties, we designed shiny app to solve 1,2,3 and 4 mentioned above.
Then summarize the properties and characteristics of exponential distribution and gamma distribution, and finally set tasks to help students solve difficult point 5 and consolidate knowledge.
Basic Concepts
Definition of gamma distribution
Parameter: shape parameter, scale parameter
The pdf of gamma distribution
How parameters change the graph of pdf
The expectation and variance of gamma distribution
Definition of exponential distribution
A special type of gamma distribution (when shape parameter = 1)
The pdf of exponential distribution
The memoryless of exponential distribution
The expectation and variance of exponential distribution
Visualization
i.Conceptual Understanding: Visualization tools can be used to showcase the shape and characteristics of the exponential distribution and the gamma distribution. By plotting the probability density function (PDF) and the cumulative distribution function (CDF), students can visually observe the distribution's shape, symmetry, tail decay, and other features, thereby deepening their understanding of these distributions.
ii.Parameter Interpretation: Visualization tools can help students intuitively understand the impact of parameters on the shape of the distribution. By adjusting parameter values and plotting distribution graphs under different parameter settings, students can observe the effects of parameters on the distribution's location, scale, and shape. This can assist students in better grasping the meaning and impact of parameters.
iii.Relationship between Distributions: Visualization tools can be used to illustrate the relationship between the exponential distribution and the gamma distribution. By plotting gamma distributions and exponential distributions under different shape parameters, students can observe their similarities and differences. This helps students to connect the two distributions, understand their relationship and distinctions.
Some Examples and Applications in Our Real Life
The Gamma distribution has a wide range of applications in real life. Here are some common applications and examples:
1. Reliability Engineering: The Gamma distribution is commonly used in reliability engineering to model the lifetime and failure times of devices or systems. For example, when estimating the probability of a machine failing within a specific time period, the Gamma distribution can be used to describe the distribution of failure times.
2. Finance: The Gamma distribution has multiple applications in finance. For instance, in option pricing models such as the Black-Scholes model, stock price changes are often assumed to follow geometric Brownian motion with time intervals following a Gamma distribution. Additionally, the Gamma distribution can be used to model the volatility of stock prices.
3. Insurance: In the insurance industry, the Gamma distribution can be used to model the number and amount of insurance claims. By utilizing the Gamma distribution, insurers can calculate the probability distribution of the number of claims or claim amounts occurring within a specific time period, aiding in risk assessment and insurance pricing.
4. Biostatistics: In biostatistics, the Gamma distribution is frequently employed to describe the duration of certain biological processes, such as cell division times or the rate of drug elimination. Estimating the parameters of the Gamma distribution allows for inference and analysis of the properties of these biological processes.
5. Queueing Theory: In queueing theory, the Gamma distribution can be used to model arrival times and service times. Queueing theory examines the process of requests arriving at a system and being serviced, and the Gamma distribution provides probability distribution information about these time intervals, aiding in optimizing system performance and resource allocation.
These are just a few examples of how the Gamma distribution is applied in real-life scenarios. In reality, it finds widespread applications in various fields such as engineering, physics, social sciences, and more.
The description of the panel
In the part of "Example of Exponential Distribution", we use the "uspop" datasets in R to draw the curve describing the relation between "Year" and "Population". The growth of population in US follows the "Logistic Model", which comes from exponential distribution (or gamma distribution).
Below the figure of "US Population over Time", we use exponential distribution to simulate the growth of population in US.
In the part of "Gamma Distribution", the sidebar panel includes three parts ("Number of Samples", "Shape" , "Rate" and "The Number of Boxes in the Histogram"), while the main panel includes the histogram of sample and the gamma distribution curve.
In the part of "Exponential Distribution", the sidebar panel includes three parts ("Number of Samples" , the parameter "Lambda" and "The Number of Boxes in the Histogram"), while the main panel includes the histogram of sample and the exponential distribution curve.
In the part of "Gamma Additivity", the sidebar panel includes five parts ("Number of Samples", the parameter "Shape(Gamma 1)",the parameter "Shape(Gamma 2)" , the parameter "Rate" and "The Number of Boxes in the Histogram"),while the main panel includes the histogram of sample and the gamma distribution curve of Gamma 1, Gamma 2 and the addition of Gamma 1 and Gamma 2.
In the part of "Gamma Multiplicativity", the sidebar panel includes five parts ("Number of Samples", the parameter "Shape", the parameter "Rate" , "Multiplier" and "The Number of Boxes in the Histogram"), while the main panel includes the histogram of sample and the gamma distribution curve of the original one and the one multiplied by multiplier.
In the part of "Gamma Linearity", the sidebar panel includes six parts ("Number of Samples", the parameter "Shape", the parameter "Rate" , "Slope" , "Intercept" and "The Number of Boxes in the Histogram"), while the main panel includes the histogram of sample and the gamma distribution curve of the original one and the one multiplied by multiplier.
There are some thinking problems in the sidebar below the input interface. For example, in the part of “Gamma Additivity”, there are four questions:
Task 1: Observe how the images change based on parameters.
Task 2: Observe how the minimum,maximum, mean and standard deviation change based on parameters.
Task 3: Discover the relation between the mean value of Gamma 1, Gamma 2 and the sum of Gamma 1 and Gamma 2.
Task 4: Research the relation between the standard deviation of Gamma 1, Gamma 2 and the sum of Gamma 1 and Gamma 2.
Through these thinking problems, users will be led to find the additivity of gamma distribution
Users can input numbers in the interface and obtain the figure accordingly.
The targets and usage of the shiny app
This shiny app is designed to give convenience to beginners to learn gamma distribution and exponential distribution.
Users can input the parameters of these distributions. Through the visualization of sample data and probability density function, students can discover the relation of gamma distribution and exponential distribution, the additivity and the multiplicativity of gamma distribution.
When the shape parameter of gamma distribution equals to 1, the gamma distribution curve is the same as the exponential distribution curve. Therefore, students will easily discover the exponential distribution is a special case of gamma distribution.
Through this shiny app, users cannot draw a conclusion with accurate calculation, but with an intuitive impression.
Properties of exponential distribution and gamma distribution
Exponential distribution
Gamma Distribution
E(X) and Var(X) of the summed Gamma distribution
E(X) and Var(X) for a Gamma-distributed random variable multiplied by the constant k
Variation of Gamma distribution images with the parameters
Whether two independent Gamma-distributed r.v. still obey a gamma distribution when added together
A Gamma-distributed random variable multiplied by a constant k still obeys a Gamma distribution
Maximum Likelihood Estimation(MLE)
Method of Moments Estimation(MME)
Tasks
Questions
Answers