A uniform distribution is one in which all outcomes are equally likely to occur.
An example is rolling the dice or picking a certain card out of a deck of cards.
Can you alter the above code to create the histogram for a 10-sided dice?
The Normal distribution is perhaps the most important distribution
It is also known as the Gaussian distribution or the bell curve
it arises from random variation around a mean and is also a consequence of the Central Limit Theorem.
We know something is a normal distribution when the graph is symmetric and where most of the values are near its peak
Calculate the mean, variance, and standard deviation for a total number of data points set to 250,000
Expected output to the right -->
(values will be slightly different due to the random number generators)
If you are taking multiple measurements of a parameter and they have random variation, you usually take the average or mean of all your measurements.
BUT if you only sample a small portion of the population, you can’t be sure that the calculated average of your sample group represents the average value of the whole population.
How confident are you in your best estimate value? This is measured by confidence intervals!
In this picture, we have a 95% confidence interval, with z = 1.96. But what does that mean?
Because this is a normal distribution (this does not apply to all distributions), it means that approximately 95% of the time, if we were to test many samples from this population, the true population mean would fall within 1.96 standard deviations of the sample mean!
CI can be difficult to understand! If you need more clarification, feel free to check out this video.
The Lognormal distribution has no negative values and a long tail
It is used to model many different physical processes such as:
Income distributions
Survival time of bacteria in disinfectants
Weight & blood pressure of humans
Milk production by cows
Length of a chess game
EXPLANATION & "EXAMPLE"
Use the np.random.lognormal() command to plot 80,000 points randomly generated on the graph. Print the mean, variance, and standard deviation.
Expected Output (values will be slightly different due to the random number generators)
Imagine you're testing out a new video game and need to analyze how high players can jump. You have data from 100 players who tested your game, and you want to visualize their jump heights and understand some key statistics.
Use what you have learned about probability, random number generators and plots to complete this problem.
Expected Output (values will be slightly different due to the random number generators)