# SOCR EduMaterials Activities GammaEstimateExperiment

## Gamma Estimate Experiment

## Description

The Gamma Estimate Experiment is to generate a random sample X1, X2, ..., Xn of size n from the gamma distribution with shape parameter k and scale parameter b. The distribution density is shown in blue in the graph, and on each update, the sample density is shown in red. On each update, the following statistics are recorded: U = M^2 / T^2 V = T^2 / M W = M / k Where M = (X1 + X2 + ... + Xn) / n and T^2 = [(X1 – M)^2 + ... + (Xn-M)^2] / n Statistic U is a point estimator of k and statistics V and W are point estimators of b. As the experiment runs, the empirical bias and mean square error of each estimator are recorded in the second table. The parameters k, b, and n can be varied with scroll bars.

## Goal

To provide a simulation for the Gamma Distribution that is analogous to the Negative Binomial Distribution when given the time of the kth success and frequency of successes. It may also be used for non-integer values. After accessing this applet, users should be able to grasp a better generalization of properties of the Gamma Distribution.

## Experiment

Go to the SOCR Experiment [[1]] and select the Gamma Estimate Experiment from the drop-down list of experiments on the top left. The image below shows the initial view of this experiment:

When pressing the play button, one trial will be executed and recorded in the distribution table below. The fast forward button symbolizes the nth number of trials to be executed each time. The stop button ceases any activity and is helpful when the experimenter chooses “continuous,” indicating an infinite number of events. The fourth button will reset the entire experiment, deleting all previous information and data collected.
The “update” scroll indicates nth number of trials (1, 10, 100, or 1000) performed when selecting the fast forward button and the “stop” scroll indicates the maximum number of trials in the experiment.

When varying k, the distribution graph in blue changes shape. Initially, it is skewed right, but once k increases, a peak begins to form and moves toward the right of the graph as it continues to increase. The maximum of k shows a peak in the middle of the distribution graph. Varying parameter b changes the values of the x and y axes. The image below displays this characteristic:

Note that when k has a small value, the empirical density graph shown in red has a large spread. When k has a large value, the empirical density graph has a much smaller spread that is saturated at the peak of the distribution graph in blue. The two images shown below demonstrate this effect:

## Applications

The Gamma Estimate Experiment is a general applet that demonstrates the basic properties of the Gamma Distribution. It is in a similar form to the Exponential Distribution in which the probabilities of events are usually based on the time of the first success and the number of successes per time period. This simulation may be used in many different kinds of events such as:

Suppose scientists want to determine the probability of an earthquake to occur within the next two years. Given the number of earthquakes in the past 100 years, they determine the number of successes per year (time period). By using this applet, the scientists have the ability to analytically and graphically display their findings to others.

For instance, a machine measures the weight of boxes. Workers of the factory want to determine the probability of a box exceeding the interval of weight for the boxes. They are given information regarding the number of successes (boxes exceeding the weight limit) and are able to calculate their probability of interest. Using this applet will give them the advantage to generalize their findings in a simple and easy manner.

Translate this page: