Posts Tagged ‘ simulation ’

Simulate data from a generalized Gaussian distribution

September 21, 2016
By
Simulate data from a generalized Gaussian distribution

Although statisticians often assume normally distributed errors, there are important processes for which the error distribution has a heavy tail. A well-known heavy-tailed distribution is the t distribution, but the t distribution is unsuitable for some applications because it does not have finite moments (means, variance,...) for small parameter values.

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Simulate data from a generalized Gaussian distribution

Coverage probability of confidence intervals: A simulation approach

September 8, 2016
By
Coverage probability of confidence intervals: A simulation approach

The article uses the SAS DATA step and Base SAS procedures to estimate the coverage probability of the confidence interval for the mean of normally distributed data. This discussion is based on Section 5.2 (p. 74–77) of Simulating Data with SAS. What is a confidence interval? Recall that a confidence

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Coverage probability of confidence intervals: A simulation approach

Head-tail versus head-head: A counterintuitive property of coin tosses

April 13, 2016
By
Head-tail versus head-head: A counterintuitive property of coin tosses

I saw an interesting mathematical result in Wired magazine. The original article was about mathematical research into prime numbers, but the article included the following tantalizing fact: If Alice tosses a coin until she sees a head followed by a tail, and Bob tosses a coin until he sees

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Head-tail versus head-head: A counterintuitive property of coin tosses

Generate points uniformly inside a d-dimensional ball

April 6, 2016
By
Generate points uniformly inside a d-dimensional ball

Last week I showed how to generate random points uniformly inside a 2-d circular region. That article showed that the distance of a point to the circle's center cannot be distributed uniformly. Instead, you should use the square root of a uniform variate to generate 2-D distances to the origin.

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Generate points uniformly inside a d-dimensional ball

Generate points uniformly inside a circular region in 2-D

March 30, 2016
By
Generate points uniformly inside a circular region in 2-D

It is easy to generate random points that are uniformly distributed inside a rectangle. You simply generate independent random uniform values for each coordinate. However, nonrectangular regions are more complicated. An instructive example is to simulate points uniformly inside the ball with a given radius. The two-dimensional case is to

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Generate points uniformly inside a circular region in 2-D

Simulate from the multinomial distribution in the SAS DATA step

March 16, 2016
By
Simulate from the multinomial distribution in the SAS DATA step

There are several ways to simulate multinomial data in SAS. In the SAS/IML matrix language, you can use the RANDMULTINOMIAL function to generate samples from the multinomial distribution. If you don't have a SAS/IML license, I have previously written about how to use the SAS DATA step or PROC SURVEYSELECT

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Simulate from the multinomial distribution in the SAS DATA step

Monte Carlo estimates of pi and an important statistical lesson

March 14, 2016
By
Monte Carlo estimates of pi and an important statistical lesson

Today is March 14th, which is annually celebrated as Pi Day. Today's date, written as 3/14/16, represents the best five-digit approximation of pi. On Pi Day, many people blog about how to approximate pi. This article uses a Monte Carlo simulation to estimate pi, in spite of the fact that

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Monte Carlo estimates of pi and an important statistical lesson

Four essential sampling methods in SAS

February 15, 2016
By
Four essential sampling methods in SAS

Many simulation and resampling tasks use one of four sampling methods. When you draw a random sample from a population, you can sample with or without replacement. At the same time, all individuals in the population might have equal probability of being selected, or some individuals might be more likely

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Four essential sampling methods in SAS

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.