# Normal Distribution Simulator

In statistics we often record data and then do calculations in the hopes of discovering truth. But sometimes we can be over-confident in our results.

Here we start with some theoretical "truth" (a true mean and standard deviation), then create some random data (following a Normal Distribution) that we imagine we just recorded.

Then we can see how closely our data leads us back to the truth.

Play with this so you get a good "feel" for data. Try different sample sizes, etc and see what you get. Use Refresh a lot. See how sometimes the results are good or bad.

### Example: Testing A New Medicine

You don't know it, but the medicine actually reduces the risk of heart attack to 0.9 of the usual value, so is very valuable. But results vary widely (standard deviation of 0.3)

Enter 0.9 and 0.3 and 10 samples (testing is expensive!)

Now click "Generate" and see if your research has shown how valuable this new medicine really is (less than 1 is good)

Try "Generate" many times and imagine each one is a "clinical trial". Notice that some may greatly exaggerate the benefit, others may say the medicine makes things worse.

Try differernt sample sizes, such as 30, 100, 500.

You can also try a mean of 1.0 (the medicine is useless).

## How to Use

For a population that follows a Normal Distribution first enter the True Mean, True Standard Deviation and How Many in Sample in the top three boxes.

Then click "Generate" to generate a random sample of the chosen size from the population.

This will then give you the Sample Mean, the Sample Standard Deviation and the Confidence Interval (choose from 80% to 99.9% from the drop down menu) for the randomly generated sample.

You can then compare the data for the sample with the data for the population.

## Footnote

The data is created using the "Box-Muller Transformation" and then adjusted for your chosen mean and standard deviation.
{"ft_lang_label":"__label__en","ft_lang_prob":0.89982426,"math_prob":0.9375896,"size":1904,"snap":"2019-35-2019-39","text_gpt3_token_len":427,"char_repetition_ratio":0.11368421,"word_repetition_ratio":0.0,"special_character_ratio":0.22321428,"punctuation_ratio":0.096,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95155066,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-23T06:22:16Z\",\"WARC-Record-ID\":\"<urn:uuid:b3ae4821-7036-4d08-a6b3-6864e9efb3f5>\",\"Content-Length\":\"6229\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bdd0f9e5-89d3-48da-b1a4-df0173368823>\",\"WARC-Concurrent-To\":\"<urn:uuid:4ecafb0e-51d7-4d98-b194-beeed896752d>\",\"WARC-IP-Address\":\"104.20.213.26\",\"WARC-Target-URI\":\"https://www.mathsisfun.com/data/normal-distribution-simulator.html\",\"WARC-Payload-Digest\":\"sha1:5DXIPFA7UU366AX7OORL7CGKFTRUKJKU\",\"WARC-Block-Digest\":\"sha1:L3BSHWFYVNCCP2LJ4ILQXTRAGFIENK4X\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514576047.85_warc_CC-MAIN-20190923043830-20190923065830-00226.warc.gz\"}"}