Skip to main content

Distribution Sampling in Excel

In this tutorial, we will generate a sample from a Normal distribution and one from a Uniform distribution in Excel using XLSTAT.

Dataset for sampling a distribution

We want to generate two samples, the first one sampled in a Normal N(2,2) distribution (mean = 2, standard deviation (sigma) = 2), the second one in a Uniform distribution, between -1.5 and 5. To do that, we use the "Distribution sampling" tool available in the "Preparing data" section.

Setting up the sampling of data in a distribution

After opening XLSTAT, select the XLSTAT / Preparing data / Distribution sampling command, or click on the corresponding button of the Preparing data menu (see below). XLSTAT Function for Distribution Sampling

Once you've clicked on the button, the dialog box appears.

Select the distribution to use, and the corresponding parameters.

Then enter the size of the sample to generate.

The dialog box displayed below corresponds to the generation of a 1000 cases normal N(2,2) sample.

XLSTAT dialog box for distribution sampling (normal)

The computations begin once you have clicked on the OK button, and the sample is displayed.

A second sample is then generated using a Uniform distribution between -1.5 and 5. To generate that sample next to the other one, deactivate the option "Display the report header" and select the range next to the first sample name.

XLSTAT dialog box for distribution sampling (uniform)

Click on Ok and the second sample is displayed.

Was this article useful?

  • Yes
  • No