All published worksheets from http://sagenb.org
Image: ubuntu2004
Generating 10 values of the normal distribution with mean 2 and standard deviation 3.
Generating 10 values of the uniform distribution from 100 to 1000. For scipy, we specify the starting value and the range. For R, we specify the starting and ending values.
Generating 10 values of the Bernoulli distribution with one of the values having probability 0.5 (i.e., a coin-flip). A success is a 1, a failure is a 0.
Generating 10 values of the Binomial distribution. The values below model 30 coin tosses, with the probability of success of each trial being 0.5. The values represent the number of successful (head) flips in the 30 tosses.
Comparing distributions
Suppose we have a 5% failure rate in producing widgets. What is a histogram of the probability of having failures in a box of 20 widgets?