/basicStatisticsAndProbability

Basic Statistics and Probability theory coded using python

Primary LanguagePython

Basic Statistics and Probability using Python 3.0

This module is dedicated to the formulation, usage and visualizations of statistical theory, models and formulas.

Coin Toss Problemset

  1. Think about one experiment where you toss a coin for Ntrial = 200 times, with each toss having a 50% probability for the head. In this experiment, you count the total number of heads Nhead. Write a python code that gives you Nhead. This is a random number and should provide a different number if the experiment is run again.
  2. Now run this experiment 1000 times. Plot a histogram of the 1000 Nhead values from these 1000 experiments. What distribution does the histogram look like?
  3. What is the mean and standard deviation of these 1000 numbers? Does it match the predicted mean and standard deviation using formulae for the Binomial distribution?
  4. Now, think about a coin for which the probability of a head is 0.1%. You toss the coin Ntrial = 10000 times for one experiment. If you repeat the experiment 1000 times, what does the distribution look like? Take the mean and standard deviations of the 1000 Nhead values. Do they match the predicted mean and standard deviation of the Poisson distribution?
  5. Think about the average probability for one resident in Dhaka city to visit the Star Kabab restaurant between 7-8pm. The average probability is not zero. Otherwise, the restaurant won’t have any customers, but we know that they do have customers every day at that time. The number of customers between 7-8pm for different days will be different random numbers. If you collect 50 of these numbers from 50 different days, what distribution would these numbers follow?
  6. If you have counted the number of customers between 7-8pm to be 100 today, what is the expected number and uncertainty for tomorrow 7-8pm?