Posts Tagged ‘ simulation ’

The probability that two random chords of a circle intersect

July 11, 2018
By
The probability that two random chords of a circle intersect

In a previous article, I showed how to find the intersection (if it exists) between two line segments in the plane. There are some fun problems in probability theory that involve intersections of line segments. One is "What is the probability that two randomly chosen chords of a circle intersect?"

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on The probability that two random chords of a circle intersect

Video: New random number generators in SAS

June 15, 2018
By

My 2018 SAS Global Forum paper was about "how to use the random-number generators (RNGs) in SAS." You can read the paper for details, but I recently recorded a short video that summarizes the main ideas in the paper. In particular, the video gives an overview of the new RNGs

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Video: New random number generators in SAS

Sample and obtain the results in random order

June 6, 2018
By
Sample and obtain the results in random order

The SURVEYSELECT procedure in SAS 9.4M5 supports the OUTRANDOM option, which causes the selected items in a simple random sample to be randomly permuted after they are selected. This article describes several statistical tasks that benefit from this option, including simulating card games, randomly permuting observations in a DATA step,

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Sample and obtain the results in random order

Independent streams of random numbers in SAS

May 9, 2018
By
Independent streams of random numbers in SAS

In a previous blog post, I discussed ways to produce statistically independent samples from a random number generator (RNG). The best way is to generate all samples from one stream. However, if your program uses two or more SAS DATA steps to simulate the data, you cannot use the same

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Independent streams of random numbers in SAS

Independence and overlap in streams of random numbers

May 7, 2018
By
Independence and overlap in streams of random numbers

Simulation studies require both randomness and reproducibility, two qualities that are sometimes at odds with each other. A Monte Carlo simulation might need to generate millions of random samples, where each sample contains dozens of continuous variables and many thousands of observations. In simulation studies, the researcher wants each sample

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Independence and overlap in streams of random numbers

Random permutations without duplicates

April 16, 2018
By
Random permutations without duplicates

A colleague and I recently discussed how to generate random permutations without encountering duplicates. Given a set of n items, there are n! permutations My colleague wants to generate k unique permutations at random from among the total of n!. Said differently, he wants to sample without replacement from the

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Random permutations without duplicates

A zipper plot for visualizing coverage probability in simulation studies

March 26, 2018
By
A zipper plot for visualizing coverage probability in simulation studies

Simulation studies are used for many purposes, one of which is to examine how distributional assumptions affect the coverage probability of a confidence interval. This article describes the "zipper plot," which enables you to compare the coverage probability of a confidence interval when the data do or do not follow

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on A zipper plot for visualizing coverage probability in simulation studies

The distribution of shared birthdays in the Birthday Problem

February 7, 2018
By
The distribution of shared birthdays in the Birthday Problem

If N random people are in a room, the classical birthday problem provides the probability that at least two people share a birthday. The birthday problem does not consider how many birthdays are in common. However, a generalization (sometimes called the Multiple-Birthday Problem) examines the distribution of the number of

The post Read more »

Tags: ,
Posted in SAS | Comments Off on The distribution of shared birthdays in the Birthday Problem

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.