The triangulation theorem for polygons says that every simple polygon can be triangulated. In fact, if the polygon has V vertices, you can decompose it into V-2 non-overlapping triangles. In this article, a "polygon" always means a simple polygon. Also, a "random point" means one that is drawn at random
Search Results: simulation (462)
How can you efficiently generate N random uniform points in a triangular region of the plane? There is a very cool algorithm (which I call the reflection method) that makes the process easy. I no longer remember where I saw this algorithm, but it is different from the "weighted average"
You've probably seen many graphs that are similar to the one at the right. This plot shows a regression line overlaid on a scatter plot of some data. Given a value for the independent variable (x), the regression line gives the best prediction for the mean of the response variable
The Poisson-binomial distribution is a generalization of the binomial distribution. For the binomial distribution, you carry out N independent and identical Bernoulli trials. Each trial has a probability, p, of success. The total number of successes, which can be between 0 and N, is a binomial random variable. The distribution
Congratulations to Rick Wicklin for 10 Years of The Do Loop Rick Wicklin, author of The Do Loop I want to take a moment to congratulate my colleague Rick Wicklin on the 10th Anniversary of his blog, The Do Loop. Rick is Distinguished Researcher in Computational Statistics at SAS, and our
In the paper "Tips and Techniques for Using the Random-Number Generators in SAS" (Sarle and Wicklin, 2018), I discussed an example that uses the new STREAMREWIND subroutine in Base SAS 9.4M5. As its name implies, the STREAMREWIND subroutine rewinds a random number stream, essentially resetting the stream to the beginning.
I recently showed how to use simulation to estimate the power of a statistical hypothesis test. The example (a two-sample t test for the difference of means) is a simple SAS/IML module that is very fast. Fast is good because often you want to perform a sequence of simulations over
In the early days of the COVID-19 pandemic, the issue of tax administration was low on the agenda for most. Beyond the obvious public health concerns, most business and government leaders were focused on how best to keep businesses afloat. But for those in federal, state and local governments responsible
The iml action was introduced in Viya 3.5. As shown in a previous article, the iml action supports ways to implement the map-reduce paradigm, which is a way to distribute a computation by using multiple threads. The map-reduce paradigm is ideal for “embarrassingly parallel” computations, which are composed of many
When you write a program that simulates data from a statistical model, you should always check that the simulation code is correct. One way to do this is to generate a large simulated sample, estimate the parameters in the simulated data, and make sure that the estimates are close to
Turn analytical models into business value and smarter decisions with this special collection of papers about SAS Model Management. Without a structured and standardized process to integrate and coordinate all the different pieces of the model life cycle, a business can experience increased costs and missed opportunities. SAS Model Management solutions enable organizations to register, test, deploy, monitor, and retrain analytical models, leveraging any available technology – including open-source models in Python, R, and TensorFlow –into a competitive advantage.
I recently showed how to compute within-group multivariate statistics by using the SAS/IML language. However, a principal of good software design is to encapsulate functionality and write self-contained functions that compute and return the results. What is the best way to return multiple statistics from a SAS/IML module? A convenient
The iml action in SAS Viya (introduced in Viya 3.5) provides a set of general programming tools that you can use to implement a custom parallel algorithm. This makes the iml action different than other Viya actions, which use distributed computations to solve specific problems in statistics, machine learning, and
If you have ever run a Kolmogorov-Smirnov test for normality, you have encountered the Kolmogorov D statistic. The Kolmogorov D statistic is used to assess whether a random sample was drawn from a specified distribution. Although it is frequently used to test for normality, the statistic is "distribution free" in
Rapid demand response forecasting techniques are forecasting processes that can incorporate key information quickly enough to act upon in real time by agile supply chains. Retailers and consumer goods suppliers are urgently trying to determine how changes in consumer behavior will affect their regions, channels, categories, brands and products during
This article introduces the iml action, which is available in SAS Viya 3.5. The iml action supports most of the same syntax and functionality as the SAS/IML matrix language, which is implemented in PROC IML. With minimal changes, most programs that run in PROC IML also run in the iml
Learn how continuous monitoring of suppliers can flag issues and help prevent supply chain disruptions.
In recent posts (March 26, April 21) we've looked at forecasting in the face of chaos and disruption. We've seen that traditional time series forecasting methods (used during "normal" times) can be creatively augmented with additional methods like clustering, similarity analysis, epidemiologic models, and simulation. While it is unreasonable to
Recently I read an excellent blog post by Paul von Hippel entitled "How many imputations do you need?". It is based on a paper (von Hippel, 2018), which provides more details. Suppose you are faced with data that has many missing values. One way to address the missing values is
Forecasting is a daunting task during normal conditions, and even more so during a disruption. But in times of greatest stress our smartest and most creative people stand out, and our true leaders emerge. You'll find these kinds of leaders among my colleagues at SAS -- smart and creative people
Every day we face risks. If we drive to work, we risk a fatal auto accident. If we eat red meat and fatty foods, we risk a heart attack. If we go out in public during a pandemic, we risk contracting a disease. A logical response to risk is to
In a previous article, I discussed the binormal model for a binary classification problem. This model assumes a set of scores that are normally distributed for each population, and the mean of the scores for the Negative population is less than the mean of scores for the Positive population. I
Is it getting harder and harder to find empty Excel spreadsheets cells, as you run out of columns and rows? Do your spreadsheet cell labels have more letters than the license plate on your car? Do you find yourself waking up in the middle of the night in cold
Recently someone on social media asked, "how can I compute the required sample size for a binomial test?" I assume from the question that the researcher was designing an experiment to test the proportions between two groups, such as a control group and a treatment/intervention group. They wanted to know
In my book Simulating Data with SAS, I show how to use a graphical tool, called the moment-ratio diagram, to characterize and compare continuous probability distributions based on their skewness and kurtosis (Wicklin, 2013, Chapter 16). The idea behind the moment-ratio diagram is that skewness and kurtosis are essential for
Did you add "learn something new" to your list of New Year's resolutions? Last week, I wrote about the most popular articles from The DO Loop in 2019. The most popular articles are about elementary topics in SAS programming or univariate statistics because those topics have broad appeal. Advanced topics
What precisely, then, is needed in risk management? Users want a user-friendly interface, so that they can find what they need.
Interview with Line Lyst about how to ensure innovation at Ramboll while taking care of business as usual.
Wir sitzen in einem großen Hörsaal einer Frankfurter Hochschule, die Sitzreihen sind leicht ansteigend, damit alle Studenten nicht nur hören, sondern auch gut sehen können. Ungefähr 150 Zuhörer – zum Großteil keine Studenten - hören dem Referenten zu, keinem Professor, sondern einem dynamisch wirkenden Gründer und Manager eines norditalienischen Start-up.
Is 4 an extreme value for the standard normal distribution? In high school, students learn the famous 68-95-99.7 rule, which is a way to remember that 99.7 percent of random observation from a normal distribution are within three standard deviations from the mean. For the standard normal distribution, the probability