MERLOT Search - category=2595&materialType=Simulation&sort.property=dateCreated
https://www.merlot.org/merlot/
A search of MERLOT materialsCopyright 1997-2016 MERLOT. All rights reserved.Sun, 24 Jul 2016 08:28:18 PDTSun, 24 Jul 2016 08:28:18 PDTMERLOT Search - category=2595&materialType=Simulation&sort.property=dateCreatedhttps://www.merlot.org/merlot/images/merlot.gif
https://www.merlot.org/merlot/
4434[Shiny App] Hierarchical Models
https://www.merlot.org/merlot/viewMaterial.htm?id=1142729
Hierarchical models are used when there is nesting of observational units in the data and variables are observed on multiple levels of the hierarchy. Failure to account for the hierarchy in the data may result in invalid conclusions. However, hierarchical models are not always needed for nested data as the intraclass correlation coefficient determines the requirement. This app focuses on illustrating the concept of hierarchical models by comparing the method to the two others at the extremes: the pooled and unpooled methods. Users are shown mathematically and visually how the hierarchical estimates are weighted averages and how they serve as a balance between the pooled and unpooled estimates; the two related ideas of shrinkage and borrowing strength are illustrated in this process.Users have the capability to either use sample data sets or upload their own data to learn about hierarchical models through case studies. The three different scenarios for learning are varying-intercept, varying-intercept and varying-slope, and varying-intercept and varying-slope with level 2 predictor. In each scenario, users are first presented outputs and graphs of the pooled and unpooled method. Then they proceed to the hierarchical model and different concepts of this method are explained in compartments. Interpretations are included throughout the outputs for users to comprehend the ideas. Additionally, each scenario contains a comparison of the three modelling methods with visualizations. For those who are familiar with Bayesian methods, a tab is available to run a Bayesian hierarchical model. After grasping the concept of hierarchical models, users can analyze their own data with their own specified model.Wed, 23 Mar 2016 11:53:27 -0700[Shiny App] Heaped Distribution Estimation
https://www.merlot.org/merlot/viewMaterial.htm?id=1142718
Data often exhibit a heaped distribution in situations when there are either rounding or recall issues. Then, heaping is observed in the distribution when there are unusual spikes at certain values. In this app, the focus is heaping present at multiples of 5. Two rounding behaviors are assumed and they are accounted for in the form of two rounding probabilities. The first rounding probability describes the tendency to round with smaller values, while the second rounding probability describes the tendency to round with larger values. Therefore, a mixture model is constructed with a specified distribution and the two rounding probabilities. Throughout the app, interpretations in popovers are provided for users to understand the different stages of the demonstration.Users have the option to either simulate data or upload data to begin the app. There are five distributions for users to choose and the parameters can be adjusted. The proceeding tab describes the rounding process to users; the actual and rounded/heaped distributions are visually displayed for users to compare. With the heaped distribution, the goal for users is to estimate the actual distribution with maximum likelihood. After obtaining the estimates, confidence intervals can be produced either based on the inverse Fisher information matrix or bootstrapping. For users to validate the method, a simulation study can be performed in the last tab of the app. They can compare the means of the MLE distributions to the specified underlying parameters.Wed, 23 Mar 2016 11:51:30 -0700[Shiny App] Sampling Distributions of Various Statistics
https://www.merlot.org/merlot/viewMaterial.htm?id=1142715
This app allows the user to draw repeated samples from a specified population shape (normal, left-skewed, right-skewed, uniform, or bimodal). The user also specifies a statistic from the pull-down menu in the left panel. When a sample is generated by pressing the "Draw samples" button, a histogram of that sample is plotted in the graph at left, and the sample statistic is added to the sampling distribution histogram at right. The total number of samples is tracked at the bottom of the page, and the user may also elect to display the mean and standard deviation of the sampling distribution by checking the box. Above these two graphs, the user may also click to display the population curve and parameter of interest.Wed, 23 Mar 2016 11:49:01 -0700[Shiny App] Random Variable Generation
https://www.merlot.org/merlot/viewMaterial.htm?id=1142702
The Probability Integral Transform and the Accept-Reject Algorithm are two methods for generating a random variable with some desired distribution. This Shiny app demonstrates how they work, through two examples of each method.For the Accept-Reject Algorithm (shown above), the examples demonstrated in this app are the Beta distribution and the truncated Normal distribution. A side-by-side plot shows each point that has been generated. Users have the option to generate one replicate at a time, to examine and understand the mechanics of how the algorithm is accomplishing its task, with details of each replicate given below the plots. Additionally, up to 500 replicates can be generated at once, to build towards a greater representation of points and confirm that the algorithm does in fact result in the desired distribution.The Probability Integral Transform (not shown) is demonstrated with the Exponential distribution, and an arbitrary, unnamed distribution. In this demonstration, users again have the option to generate one replicate at a time, with side-by-side plots showing each point, and details of each replicate given below the plots. Users can also generate up to 500 replicates at once to view the overall distribution that is produced.Wed, 23 Mar 2016 11:46:29 -0700[Shiny App] Gambler's Ruin
https://www.merlot.org/merlot/viewMaterial.htm?id=1142678
The Gambler’s Ruin is a well-known problem that can be used to illustrate a variety of probability concepts.Two players are playing a game against each other, betting the same amount on each turn (here, we use $1). On each turn of the game, Player A has a fixed probability p of winning $1 from Player B, where 0<p<1. The probability that Player B will win $1 from Player A is 1-p. Player A and Player B each start with some initial fortune (which may or may not be equal to each other), and the game continues until one player has all of the money.The Gambler’s Ruin problem is useful for teaching conditional probability, Markov chains, and for simply visualizing a stochastic process. This app shows a graphical representation of one iteration of the Gambler’s Ruin, and also can simulate many runs under a variety of settings that may be manipulated, to obtain simulated estimates of the average length of a game, and the probability that Player A will win under those settings. In a mathematical statistics class, the simulated estimates from this app could be used to corroborate analytic solutions.Wed, 23 Mar 2016 11:38:42 -0700[Shiny App] Longest Run of Heads or Tails
https://www.merlot.org/merlot/viewMaterial.htm?id=1142667
One popular class activity to help students understand chance behavior is to observe the runs of consecutive heads or tails in a sequence of coin flips. When asked to write down a simulated sequence of 100 tosses of a fair coin, most students are hesitant to create runs of heads or tails exceeding 4. Students are often surprised to find that the longest run of heads or tails turns out to be much higher based on 100 tosses of an actual coin.This Shiny app allows the user to simulate the outcomes of a fair coin flipped n times (n = 10, 20, ..., 400). In an accompanying plot of outcomes any runs of at least a specified length are marked in color, and the length of the longest run is displayed. The user can easily re-randomize the sequence of coin flips and quickly get a sense of typical longest run values. From the plot students may also be quite surprised to see how many long runs occur in the sequence.The user may choose to display the predicted approximate length of the longest run and an approximate 95% prediction interval for the length of the longest run. Details on these two estimators can be found in Schilling (1990). See Schilling (2012) for a more recent and related article.Wed, 23 Mar 2016 11:36:17 -0700[Shiny App] Chaos Game: Three Dimensions
https://www.merlot.org/merlot/viewMaterial.htm?id=1142661
In the three dimensional version of the Chaos Game we start with a regular polyhedron and mark selected points which will typically be the vertices. These points will be called endpoints and will be marked with red squares. The game begins by randomly choosing a starting point and one of the endpoints. Mark a new point at a fixed distance ratio from the starting point to the endpoint (e.g., halfway to the endpoint). Select another endpoint at random and, with the most recently created point, repeat the process to generate the next point and continue. By applying the right distance ratio the resulting set of points can converge to a beautiful image known as a fractal. For each polyhedron the required distance ratio to yield a fractal will be provided, but try different settings to see what other patterns may arise!Wed, 23 Mar 2016 11:33:12 -0700[Shiny App] Chaos Game: Two Dimensions
https://www.merlot.org/merlot/viewMaterial.htm?id=1142650
In the two dimensional version of the Chaos Game we start with a regular polygon and mark selected points which will typically be the vertices. These points will be called endpoints and will be marked in red. The game begins by randomly choosing a starting point and one of the endpoints. Mark a new point at a fixed distance ratio from the starting point to the endpoint (e.g., halfway to the endpoint). Select another endpoint at random and, with the most recently created point, repeat the process to generate the next point and continue. By applying the right distance ratio the resulting set of points can converge to a beautiful image known as a fractal. For each polygon the required distance ratio to yield a fractal will be provided, but try different settings to see what other patterns may arise!Wed, 23 Mar 2016 11:29:29 -0700[Shiny App] Testing Violation of the Constant Variance Condition for ANOVA
https://www.merlot.org/merlot/viewMaterial.htm?id=1142645
The ANOVA F-test is used to test for difference in means between groups, and requires the conditions of normality (or large sample size), independence, and constant variance. A common rule of thumb for the constant variance condition is that the ratio of largest to smallest standard deviation is less than or equal to two. This application implements a user-guided simulation study to assess the consequences of non-constant variance on the Type I error rate of the ANOVA F-test. The application enables the user to visualize data with different standard deviations, reinforces the concepts of sampling distribution, null distribution, and Type I error, and allows the user to uncover a rule of thumb for the constant variance condition. At left, the user specifies standard deviations for three hypothetical populations and sample sizes to be drawn from each of the populations. When the user presses the “Draw samples” button, data will be simulated from normal distributions with mean zero and the specified standard deviations and sample sizes and displayed in dot plots in the left graph. The ANOVA F-statistic for the simulated data is plotted in the graph at right, and the critical value for a 0.05-level hypothesis test is shown in red. As more samples are drawn (with the option to draw up to 1,000 samples at a time), more F-statistics are plotted in the sampling distribution on the right. The Type I error rate is estimated as the proportion of samples for which the null hypothesis was rejected, and is displayed below the graphs. Below the graphs (not included in the picture above) is guidance for a suggested series of simulation studies allowing the user to compare different specifications systematically and uncover the rule of thumb for the constant variance condition. Wed, 23 Mar 2016 11:26:55 -0700[Shiny App] Length/Coverage Optimal (LCO) Confidence Intervals
https://www.merlot.org/merlot/viewMaterial.htm?id=1142606
In 2014, Schilling and Doi developed a binomial confidence interval procedure that produces coverage probabilities always at least equal to the stated confidence level (e.g., a strict method), and which, among all procedures that have this property, give confidence intervals having the minimum possible average length and the highest possible coverages. They called this the LCO method (for length/coverage optimal). This Shiny app generates LCO confidence intervals for any n = 200 and any confidence level between 80% and 99%. The user may select the accuracy of the intervals to be at the 2nd, 3rd, or 4th decimal place.Wed, 23 Mar 2016 11:09:47 -0700