# Random Number Generator Graphing Probability

This random number generator Simon built in Processing simultaneously graphs the probability of the values as you “throw the dice”. This is Simon’s own code and what’s more, he has turned it into a truly scientific experiment/observation. Simon programmed the generator to automatically throw the dice every 60 frames a second (i.e. every 1/15th of a second). The graph showing the probability of certain values should increasingly resemble a perfect isoceles triangle the more throws occur, because the probability of you getting 7 is much higher than those of getting 2 or 12. The perfect triangle was drawn at around 4000 throws.

Simon also experimented with programming the same generator for 3 dice. The graph should then form a bell shaped curve, a parabola, and takes a longer while to shape up. “As the number of dice grows towards infinity, the distribution will change from a uniform distribution to a Gaussian distribution”, – Simon explains.
{"ft_lang_label":"__label__en","ft_lang_prob":0.92809635,"math_prob":0.9354604,"size":953,"snap":"2023-14-2023-23","text_gpt3_token_len":193,"char_repetition_ratio":0.100105375,"word_repetition_ratio":0.0,"special_character_ratio":0.204617,"punctuation_ratio":0.09142857,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95309144,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12],"im_url_duplicate_count":[null,3,null,3,null,3,null,3,null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-03-27T22:36:12Z\",\"WARC-Record-ID\":\"<urn:uuid:f3e9ac51-01bf-4d5e-a0aa-3742b6ab8032>\",\"Content-Length\":\"153688\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:901da255-ee4e-4090-bd2d-55c6b14ddbc1>\",\"WARC-Concurrent-To\":\"<urn:uuid:1f0a9ddb-c305-46aa-9abe-eb8e6e8ef43d>\",\"WARC-IP-Address\":\"192.0.78.24\",\"WARC-Target-URI\":\"https://geeksoutofthebox.com/2018/02/12/random-number-generator-graphing-probability/\",\"WARC-Payload-Digest\":\"sha1:WAEAIB6DPTKAX3KHXQGY3Q626CTY2OV2\",\"WARC-Block-Digest\":\"sha1:VSKYEYC3E7SSPWVH7EM5C4TUGWVX3EUS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296948708.2_warc_CC-MAIN-20230327220742-20230328010742-00720.warc.gz\"}"}