DIGMATH: Dynamic Investigatory Graphical Displays of Mathematics:

Graphical Simulations for Statistics and Probability in Excel

Sheldon P. Gordon and Florence S. Gordon 

Most of the following graphical simulations require the use of macros to operate.  In order to use these spreadsheets, Excel must be set to accept macros.  To change the security setting on macros:

  1. When you open any of the spreadsheets, a new bar appears near the top of the window that says "Security Warning: Active content has been disabled".
  2. Click on Options.
  3. Click on "Enable the Content" and then click OK.

 

The following are the DIGMath simulations that are currently (March, 2016) completed and ready for use. (Several others are under development.) If you have any problems downloading or running any of these Excel files, please contact us at flogo@optonline.net or gordonsp@farmngdale.edu for assistance. If you have any suggestions for improvements or for new topics, please pass them on also.

 

  1. Fair Coin  A coin flipping simulation in which the user has the choice of the number of repetitions of flipping a fair coin.
  2. Dice Role  A dice rolling simulation in which the user can choose the number of roles of a pair of fair dice.
  3. Coin Flips  A coin flipping simulation in which the user has the choice of the number of fair coins being flipped and the number of repetitions.
  4. Binomial Distribution This DIGMath module lets you investigate the binomial distribution based on n trials with a probability p of success. You can select values of n and p using sliders and the program draws the histogram for the corresponding binomial distribution. It also shows the mean and standard deviation of the distribution.
  5. Binomial Simulation The user has the choice of the number of coins, the probability of success, and the number of repetitions.
  6. Binomial Probabilities This DIGMath module lets you investigate the probabilities associated with a binomial distribution. The spreadsheet covers six different cases, covering virtually al the standard kinds of problems with binomial probabilities. It will calculate and display the binomial probabilities of getting (1) exactly x successes in a binomial process with n trials with a probability p of success; (2) between two given numbers of successes; (3) at least a given number of successes; (4) more than a given number of successes; (5) at most a given number of successes; and (6) less than a given number of successes. In each case, you select values of n, p, and x using sliders and the program draws the histogram to show the corresponding binomial probability.
  7. Law of Large Numbers The user has the choice of the desired probability of success and the number of repetitions to see the pattern of successes over the long run.
  8. Chaos of Small Numbers  The user has the choice of the desired probability of success and the number of repetitions (up to 25) to see the actual (simulated) outcomes and the cumulative frequency of success to demonstrate the unpredictable nature of the outcomes in the short run.
  9. The Effects of an Extra Point on the Mean and Standard Deviation This DIGMath module lets you investigate the effect that changing an additional point has on the values for the mean and the standard deviation (both graphically and numerically). The spreadsheet starts with a set of eitehr 5, 10, or 20 points and you can change the value for an additional point to see how it affects the calculations and the extent of the changes depending on the number of points.
  10. Effect of an Extra Point on Statistics This DIGMath module lets you investigate the effects of an extra point on the mean, the median, the standard deviation, and the InterQuartile Range from two perspectives: depending on how close to or far from the center an exta point lies and depending on the size of the dataset.
  11. The Normal Distribution This DIGMath module lets you investigate the normal distribution with mean m and standard deviation s. You enter both parameters using sliders and the program draws the corresponding normal distribution curve.  You can watch the effects of changing the parameter values on the resulting curve.
  12. Simulating the Normal Distribution This DIGMath spreadsheet lets you investigate the normal distribution in terms of a random simulation. You can enter, via sliders, values for the mean m and standard deviation sand then an interval of x-values from x-Min to x-Max. You can also select the number of random points you want in this normal distribution and the program will generate those points, plot them along with the graph of the normal distribution, and display graphically, with different colors, those that fall under the designated portion of the normal distribution curve and those that do not. The results are also shown numerically and compared to the theoretical values for the area under the normal curve.
  13. Normal Approximation to the Binomial Distribution This DIGMath program lets you investigate how well a normal distribution approximates the binomial distribution based on the parameters n and p. You enter the values for n and p via sliders and the program draws the histogram for the binomial distribution and the corresponding normal distribution curve using m = np and s = √np(1-p) to compare the two distributions.
  14. The Poisson Distribution This DIGMath spreadsheet lets you investigate two different aspects of the Poisson distribution that expresses the probability of a number of events occurring in a fixed period of time if these events occur with a known average rate and independently of the time since the last event. (1) The first looks at the shape of the Poisson distribution depending on its two parameters, the expected number of outcomes of an event in a given time period and the number of occurrences. You use a slider to vary the first parameters and see the effects on the shape of the distribution. (2) The second aspect is based on the idea that the Poisson distribution can be used to approximate the binomial distribution with probability of success p and number of trials n. Using sliders to change n and p, you can observe which combinations make for a good approximation and which do not.
  15. Central Limit Theorem Simulation The user can choose any of four underlying populations (normal, uniformly distributed, skewed, and bimodal), the sample size, and the number of random samples.  The simulation randomly generates the samples and plots the means of each sample.  From the graphical display and the associated numerical displays, it becomes apparent that (1) the distribution of sample means is centered very close to the mean of the underlying population, that (2) the spread in the sample means is a fraction of the standard deviation of the underlying population (about one-half as large when n = 4, about one-third as large when n = 9, about one-quarter as large when n = 16, etc.), so that students quickly conjecture that the formula for the standard deviation of the distribution of sample means is s/n, and that (3) as the sample size increases, the sampling distribution looks more and more like a normal distribution.
  16. t-Distributions This DIGMath module lets you investigate the properties of the t-distribution based on various numbers of degrees of freedom from 2 up to 31. You enter the desired number of degrees of freedom and the program draws the corresponding t-distribution curve as well as the curves for d.f. = 1, d.f. = 11, and d.f. = 21 and the limiting normal distribution curve when d.f. = 31.
  17. Distribution of Sample Proportions The user chooses the probability of success p,  the sample size n, and the number of random samples.  The simulation randomly generates the samples, displays the corresponding proportion of successes, and displays the summary statistics.  From these displays, the students quickly conjecture that (1) the mean of the distribution of sample proportions is equal to the proportion of successes in the underlying population, that (2) the simulated results with different values of the sample size n agree with the formula for the standard deviation of this sampling distribution, and that (3) the sampling distribution becomes more and more normal in appearance as the sample size increases.
  18. Sample Medians  This DIGMath simulation is similar to the Central Limit Theorem Simulation, but with sample medians instead of sample means.
  19. Sample Midranges  This DIGMath simulation is similar to the Central Limit Theorem Simulation, but with sample midranges instead of sample means.
  20. Sample Modes  This DIGMath simulation is similar to the Central Limit Theorem Simulation, but with sample modes instead of sample means.
  21. Distribution of Sample Variances This DIGMath simulation is similar is similar to the Central Limit Theorem Simulation, but instead of simulating sample means from a population, the program now generates and displays the sample variances.
  22. Distribution of Sample Standard Deviations This DIGMath simulation is similar to the Central Limit Theorem Simulation, but instead of simulating sample means from a population, the program now generates and displays the sample standard deviations.
  23. Sample IQR's This DIGMath simulation is similar to the Central Limit Theorem Simulation, but instead of simulating sample means from a population, the program now generates and displays the sample InterQuartile Ranges. The IQR is the difference between the first and third quartiles of a set of data and so represents a measure of the spread in the data.
  24. Distribution of Sample Skewnesses This is similar to the Central Limit Theorem Simulation, but instead of simulating sample means from a population, the program now generates and displays the sample skewnesses -- a measure of how far a set of values deviates from a symmetric distribution.
  25. Simulating Confidence Intervals The user has the choice of the same four underlying populations as in the Central Limit Theorem simulation (to see that the population does not affect the results) and the confidence level (90%, 95%, 98%, 99%).  The simulation generates a fixed number of samples from the selected population, calculates and plots the corresponding confidence interval, and summarizes the number and percentage of confidence intervals that actually contain the mean of the underlying population. Students see that the actual (simulated) percentage is typically close to the selected value for the confidence level.  They also see that typically the higher the confidence level, the longer the lines are that represent the actual confidence interval. They also see that typically those confidence intervals that do not contain the population mean are near-misses. 
  26. Constructing Confidence Intervals for Means This DIGMath spreadsheet assists you in constructing a confidence interval for the mean of a population. You enter the sample data -- the sample size n, the sample mean, and the sample standard deviation, and select the level of confidence (90%, 95%, 98%, or 99%) you want. The spreadsheet constructs the corresponding confidence interval and displays it, as well as compares it in size, to the confidence intervals with other levels of confidence.
  27. Exploring Confidence Intervals for the Mean This DIGMath module lets you investigate the ideas associated with confidence intervals for the mean of a population in a dynamic fashion using sliders. You can control the values for the sample data -- the sample size n, the sample mean, and the sample standard deviation. The spreadsheet constructs the corresponding 90%, 95%, 98%, and 99% confidence intervals and displays all of them, both graphically and numerically, so you can compare the lengths of each as you change the input values.
  28. Constructing Confidence Intervals for Proportions This DIGMath spreadsheet assists you in constructing a confidence interval for the proportion of a population. You enter the sample data -- the sample size n and the number of "successes" in that sample -- and select the level of confidence (90%, 95%, 98%, or 99%) you want. The spreadsheet constructs the corresponding confidence interval and displays it, as well as compares it in size, to the confidence intervals with other levels of confidence.
  29. Exploring Confidence Intervals for Proportions This DIGMath module lets you investigate the ideas associated with confidence intervals for the proportion p of a population in a dynamic fashion using sliders. You can control the values for the sample data -- the sample size n and the number of successes x. The spreadsheet constructs the corresponding 90%, 95%, 98%, and 99% confidence intervals and displays all of them, both graphically and numerically, so you can compare the lengths of each as you change the input values.
  30. Calculating Confidence Intervals for the Difference of Means This DIGMath module helps in constructing a confidence interval for the difference of mean based on summary sample data from two samples: the size of the samples, the sample means, and the sample standard deviations. The user can choose the confidence level desired -- 90%, 95%, 98%, or 99% and the resulting intervals are shown graphically and numerically.
  31. Calculating Confidence Intervals for the Difference of Proportions This DIGMath module helps in constructing a confidence interval for the difference in population proportion based on summary sample data from two sampleds: the size of the samples and the number of "successes" in each sample. The user can choose the confidence level desired -- 90%, 95%, 98%, or 99% -- and the resulting intervals are shown graphically and numerically.
  32. Simulating Hypothesis Testing The user has the choice of the same four underlying populations (again, to see that the population does not affect the results) and the level of significance (10%, 5%, 2%, 1%).  The simulation generates a fixed number of samples from the selected population, plots the mean of each sample with a vertical line at the appropriate location, and summarizes the number and percentage of sample means that fall into this region.  Students see that the simulated percentage of sample means that fall in the rejection region is typically close to the selected level of significance.  They also see that most of the sample means that fall into the rejection region tend to be quite close to the critical values.  They also see that the lines representing the samples whose means are close to the population mean tend to be very tightly clustered compared to those that are near the extreme ends, which are sparsely distributed.
  33. Hypothesis Tests for the Mean This DIGMath spreadsheet assists you in testing a hypothesis for the mean of a population. You enter the null hypothesis for the supposed value of m and select the test you want -- either two tailed or one tail with either tail. You then enter the sample data -- the sample size n, the sample mean and the sample standard deviation -- -- and the level of significance a. The spreadsheet displays the corresponding normal or t-distribution, the location of the critical value(s), and the location of the sample mean. It also shows the associated z- or t-value, as well as the corresponding P-value, and the conclusion as to whether you Reject or Fail to Reject the null hypothesis.
  34. Hypothesis Tests for the Proportion This DIGMath spreadsheet assists you in testing a hypothesis for the proportion of a population. You enter the null hypothesis for the supposed value of p and select the test you want -- either two tailed or one tail with either tail. You then enter the sample data -- the sample size n and the number of successes x in that sample -- and the level of significance a. The spreadsheet displays the corresponding normal distribution (when appropriate), the location of the critical value(s), and the location of the sample proportion p. It also shows the associated z-value, as well as the corresponding P-value, and the conclusion as to whether you Reject or Fail to Reject the null hypothesis.
  35. Hypothesis Test on the Difference of Means This DIGMath spreadsheet assists you in testing a hypothesis for the difference in means of two populations. The null hypothesis is that the two means are equal, and you have to select the alternate hypothesis test you want -- either two tailed or one tail with either tail. You then enter the sample data for the two samples -- the sample size n, the sample mean and the sample standard deviation -- -- and the level of significance a. The spreadsheet displays the corresponding normal or t-distribution for the distribution of differences of sample means, the location of the critical value(s), and the location of the difference in the two sample means. It also shows the associated z- or t-value, as well as the corresponding P-value, and the conclusion as to whether you Reject or Fail to Reject the null hypothesis.
  36. Hypothesis Test on the Difference of Proportions This DIGMath spreadsheet assists you in testing a hypothesis for the difference in proportions of two populations. The null hypothesis is that the two proportions are equal, and you have to select the alternate hypothesis test you want -- either two tailed or one tail with either tail. You then enter the sample data for the two samples -- the sample size n and the number of successes in each sample -- and the level of significance a. The spreadsheet displays the corresponding normal distribution (if appopriate) for the distribution of differences of sample proportions, the location of the critical value(s), and the location of the difference in the two sample proportions. It also shows the associated z-value, as well as the corresponding P-value, and the conclusion as to whether you Reject or Fail to Reject the null hypothesis.
  37. The Distribution of the Difference of Means This DIGMath module lets you investigate the distribution of the difference of means based on summary sample data from two samples drawn from the choice of four underlying populations (to see that the population does not affect the results). The user can choose the sample size (from n = 2 to n = 50) from each sample and the number (from 50 to 250) of samples.   The simulation generates that number of samples from the selected populations, plots the difference in the sample means of each sample, and displays the mean and standard deviation of the differences in the sample means compared to the theoretical predictions based on the population of differences of means of all possible samples
  38. The Distribution of Sample Proportions This DIGMath module lets you investigate the distribution of the difference of proportions based on summary sample data from two samples drawn from two binomial populations. For each population, you can choose probability p of success and the sample size (from n = 2 to n = 100) from each sample, as well as the number of random samples (between 50 and 300).   The simulation generates that number of samples from the two populations, plots the difference in the sample proportions of each set of samples, and displays the mean and standard deviation of the differences in the sample proportions compared to the theoretical predictions based on the population of differences of proportions of all possible samples.
  39. Regression Simulation The user has the choice of the sample size (n > 2) and the number of samples.  The simulation generates the random samples, calculates the equation of and plots the corresponding sample regression line, and also draws the population regression line. The students quickly see that, with small sample sizes, the likelihood of the sample regression line being close to the population regression line may be very small with widely varying slopes for many of the sample lines.  As the sample size increases, the sample regression lines become ever more closely matched to the population line. 
  40. Simulating the Correlation Coefficient This DIGMath spreadsheet lets you investigate the sample distribution for the correlation coefficient r based on repeated random samples drawn from a bivariate population. You can choose between n = 3 and n = 50 random points for each sample and between 50 and 250 such samples from the underlying population. For each sample, it then calculates the correlation coefficient and displays a histogram showing the values of r from the samples. It also calculates and displays the mean of the sample correlation coefficients and compares it to the correlation coefficient for the underlying bivariate population.
  41. Simulating the Regression Coefficients This DIGMath module lets you investigate the sample distributions for the two regression coefficient a and b in the regression equation y = ax + b based on repeated random samples drawn from a bivariate population. You can choose between n = 3 and n = 40 random points for each sample and between 50 and 250 such samples from the underlying population. For each sample, the program calculates the regression equation and displays the various regression lines along with the regression line for the underlying bivariate population. It then draws two histograms -- one showing the distribution of the values of the slope a from the randome samples and the other showing the distribution of the values of the vertical intercepts b from those samples. . It also calculates and displays the mean of each of the sample regression coefficients and compares it to the regression coefficients for the underlying bivariate population.
  42. The Effects of an Extra Point on the Regression Line and the Correlation Coefficient This DIGMath module lets you investigate the effect that changing an additional point has on the regression line (both graphically and numerically) and on the correlation coefficient. You have the choice of 5, 10, or 20 fixed points and can move an additional point using sliders to see how it affects the calculations and the extent of the changes depending on the number of points.
  43. Simulating the Quartile-Quartile Line This DIGMath module lets you investigate the quartile-quartile line that fits a set of data via a simulation. The quartile-quartile line is based on finding the 1st and 3rd quartiles for both the x and the y values in a set of data and then creating the line that passes through those two points. As such, it is a viable alternative to the usual least-squares regression line that is conceptually and compuationally simpler. You have a choice of the sample size and the number of samples that will be drawn from an underlying population. The spreadsheet generates the random samples and draws all the corresponding quartile-quartile lines to help you see the effect of sample size on the consistency of the lines.
  44. Comparing Lines that Fit Data This DIGMath program lets you compare how well the least-squares line, the median-median line (that is built into many calculators), and the quartile-quartile line fit sets of data. You can choose the number of random data points from an underlying population and the spreadsheet generates a random sample and displays the three lines, along with the data points, so that you can compare how well the three lines fit the data and how they compare to one another, particularly as the sample size increases.
  45. Multivariate Linear Regression This DIGMath spreadsheet lets you perform multivariate linear regression when the dependent variable Y is a function of two independent variables X1 and X2 or a function of three independent variables X1, X2, and X3. You enter the number of data points (up to a maximum of 50) and then the values for the dependent and independent variables in the appropriate columns. The spreadsheet responds with the equation of the associated linear regression equation, the value for the sum of the squares, and the value for the coefficient of determination, R2; note that this value tells you the percentage of the variation that is explained by the linear function.
  46. The Birthday Problem This DIGMath module lets you investigate the Birthday Problem, which asks for the probability that two people in a group of n people will have the same birthday. The program lets you decide on the number of people in a group (between 1 and 100) and displays the graph of the probability of a match versus the number of people in the group.
  47. Simulating the Birthday Problem This DIGMath module lets you investigate the Birthday Problem from the point of view of a random simulation. You have the choice of the number of people in a group (from 2 to 50). The program then generates a random sample of birthdates for each of the people and displays the list, including highlighting those that match. It presents the results, including the theoretical probability of a match and the number of matches.
  48. The Drunkard's (or Random) Walk Simulation This DIGMath module lets you investigate the notion of a random walk in the plane. You have the choice of the number of random steps (between 1 and 1000) and the length of each step. The program then generates a random collection of steps and displays the results graphically, as well as some numerical analysis on the actual distance covered from the starting point compared to the theoretical predictions.
  49. Buffon Needle Problem This DIGMath module lets you experiment with a graphical simulation of Buffon's Needle Problem -- the probability that a needle of length L lands on the seam between parallel strips of flooring of width W when it falls to the floor. You can select the number of random "needles" that fall, the width of the strip of flooring, and the length of the needles and see the results graphically and numerically.
  50. Simulation of Dart Throwing This DIGMath module lets you investigate the process of throwing random darts at a dartboard. You can select between 100 and 1000 random darts and the spreadsheet shows the position that each dart lands and displays the breakdown of how many, and what percentage, of the darts all into each of the rings in the dartboard.
  51. Product of the Faces of Two Dice This DIGMath simulation lets you investigate the product of the faces on a pair of dice. You can choose up to 720 rolls of the two dice and the spreadsheet shows the distribution of the outcomes and a list of the number and percentage of each possible outcome compared to the theoretical predictions.
  52. Simulation of Rolling 4-Sided Dice This DIGMath spreadsheet lets you investigate the probability experiment of rolling a pair of fair 4-sided dice, instead of the usual 6-sided dice, so that the possible sums are now 2, 3, ..., 8. The simulation shows the results of repeated trials both graphically in a histogram and numerically in terms of the number of times each of the possible outcomes arises.
  53. Simulation of Rolling 8-Sided Dice This DIGMath spreadsheet lets you investigate the probability experiment of rolling a pair of fair 8-sided dice, instead of the usual 6-sided dice, so that the possible sums are now 2, 3, ..., 16. The simulation shows the results of repeated trials both graphically in a histogram and numerically in terms of the number of times each of the possible outcomes arises.
  54. Waiting Time Simulation This DIGMath module lets you investigate the length of time a car will wait at a red light. You can select the total length of the cycle and the length of time that the light is red. The results -- the number of times that the wait is 0, 1, 2, ..., seconds -- are shown graphically in a histogram and in a table listing the outcomes. The average wait over all repetitions is also shown.
  55. Chi-Square Analysis This DIGMath spreadsheet is designed to perform a complete chi-square analysis on many different sized contingency tables, including 2 by 2, 2 by 3, 2 by 4, 3 by 2, 3 by 3, and 3 by 4. On the Set-Up screen, the user first enters the number of rows and the number of columns of the desired contingency table and is then instructed to click on an appropriate tab to go to the corresponding input screen. On that screen, the user then enters the observed values into the various positions in the contingency table. The spreadsheet displays the resulting table of expected frequencies, the number of degrees of freedom, and the value of the chi-square statistic based on the values in the table. It also draws the graph of the corresponding chi-square distribution and indicates the location of the critical value, based on the desired level of significance, separating the rejection region from the region where one cannot reject the null hypothesis. In addition, the program indicates the location of the chi-square statistic corresponding to the data in the contingency table. Finally, the program indicates whether or not one can reject the null hypothesis at that significance level.
  56. The Chi-Square Distributions This DIGMath module lets you explore the behavior of various chi-square distributions, which depend on the number n of degrees of freedom. The user can enter any desired number of degrees of freedom from 2 to 31 and the program draws the graphs of that chi-square distribution as well as those with 3, 7, 11, 15, ..., 27 degrees of freedom. Because the chi-square distributions become more normal in shape as nincreases, the program also draws the standard normal distribution with mean m = 0 and standard deviation s = 1 for comparison.
  57. Chi-Square Simulation This DIGMath spreadsheet lets you investigate the variation in the values that can arise for the chi-square statistic via a random simulation based on a two by three contingency table. You define the table by entering the column and row totals and the number of random samples drawn from that population and the spreadsheet generates and graphs the corresponding values of the chi-square statistic.
  58. One-Way Analysis of Variance (ANOVA) This DIGMath spreadsheet is designed to perform a complete one-way analysis of variance (ANOVA) to test whether the means of two or more (up to 5 sample means) may come from populations with the same mean (the null hypothesis) or from populations with different means (the alternate hypothesis). Each sample can contain up to 10 entries. The spreadsheet displays the resulting ANOVA table, including the value of the F-statistic. It also draws the graph of the corresponding F-distribution and indicates the location of the critical value, based on the 5% level of significance, separating the rejection region from the region where one cannot reject the null hypothesis. In addition, the program indicates the location of the F-statistic corresponding to the data in the table. Finally, the program indicates whether or not one can reject the null hypothesis at the 5% significance level.
  59. Simulating the Runs Test This DIGMath spreadsheet lets you investigate the Runs Test both graphically and numerically. When there is a collection of outcomes consisting of A's and B's, the object is to see the number of runs that occur. The module lets you select the total number of A's and B's, the number of A's, and the number of random samples. The distribution of the number of runs is drawn as well as numerical measures for the mean and standard deviation.
,