Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

(1)  Checkout the repository:  


Use this link to accept the assignment and create your repository on GitHub:   ??? :   https://classroom.github.com/a/8VlnHq58

After you accept the assignment and the repository and it exists in your GitHub, clone the repository into your working area on Rivanna. 

...

For this exercise, you will perform a simulation of a real-world situation. Consider the following, it is a hot and damp August on Grounds and the mosquitoes are very hungry. For any given meter you walk, there are 100 mosquitoes that may draw blood. Fortunately, mosquitoes aren't very well organized, so the probability of a given mosquito biting is only 0.0001. But another 100 mosquitoes await you in the next meter, et cetera…

...

(3)   Simulated Falling - 10,000 times (5 Points)

Main Idea: Create pseudo-experiments to simulate an object falling, then fit the simulations to extract values for acceleration due to gravity (g) with the uncertainty (part d).

In the last several classes, we used the simple example of an object falling under the force of gravity to discuss using the chi-squared value to compare levels of agreement between the data and different models. We also used it as a simple example for learning about fitting.

In science, we often call it a pseudo-experiment when we simulate data for a fake experiment. In class, we made one pseudo-experiment for the falling object. Now I want you to write a program (falling.py or falling.ipynb) that:

a) Generates 10,000 pseudo-experiments for the falling object. In each simulated experiment, you will generate the data for the first 10 seconds using the equation v=9.8*t, but you will randomly 'smear' the calculated velocities. Using a random number from a uniform distribution you should add a +/- variation of 20% for each velocity generated (we did this in the class work Notebook, so look there to get started). 

b) Each pseudo-experiment will have 10 data points, so fit those data points using the model v=atto extract the parameter 'a'. 

c) Make a histogram of all of the resulting 'a' values obtained from your 10,000 fake experiments (save as falling_a.png)What are the features of this plot? Is it uniform? Why or why not? Try to fit this distribution to a Gaussian and extract the mean and sigma.  Draw the best-fit line on the histogram. 

d)  Want to be an A student?  Try this part for 1 point:

  Make a histogram of all of the resulting fit uncertainties on the 'a' values obtained from your fake experiments (save as falling_a_error.png). What are the features of this plot? Is it uniform? Why or why not?  Try to fit this distribution to a Gaussian and extract the mean and sigma.  Draw the best-fit line on the histogram.  


For problem 2 (this part), you will turn in:

Done? Make sure you answered any questions, then clean up your code and include some useful comments, then post bite.py, bite_200.png, bite_2500.png,  falling.py(or .ipynb), falling_a.png, and falling_a_error.png to GitHub.

...