Python Sample Size to Generalize Population (Simulation using Random Module)

Published: 31 January 2018
on channel: Jeffrey James
2,541
18

https://gist.github.com/jrjames83/02e...

We simulate the process of determining how many random samples we need to take, in order to understand distributional (category) properties of a population far too large to analyze manually.

We make good use of the random and collections modules, specifically random.sample and random.choices, along with the Counter class. It seems that around 400 samples from a population of 100k items provides a reasonably good approximation of how many items belong to each category in our overall population.


On this page of the site you can watch the video online Python Sample Size to Generalize Population (Simulation using Random Module) with a duration of hours minute second in good quality, which was uploaded by the user Jeffrey James 31 January 2018, share the link with friends and acquaintances, this video has already been watched 2,541 times on youtube and it was liked by 18 viewers. Enjoy your viewing!