Lab 2: Summary Statistics#

For the class on Wednesday, January 17th

Tip

Looking for hints?

A. Sample Average and Central Limit Theorem#

Setup and Steps#

  1. Generate \(n=500\) random variates from the exponential distribution with \(\lambda = 0.5\) (corresponding to scale=2; see Lab 2A). Calculate the sample average and variance.

  2. Repeat [Step 1] \(k=1,000\) times. You will get \(k\) different values of the sample average. Plot a histogram of these \(k\) sample averages.

Questions#

  1. The Central Limit Theorem (CLT) states that the distribution of the sample averages will approach a normal distribution as \(n\) increases. Does your result agree with CLT? What is the variance of the these \(k\) sample averages?

  2. If you change the value of \(n\), will the variance of the the \(k\) sample averages (from [Step 2]) change? Make a prediction, reason your prediction, and evaluate your prediction.

  3. If you change the value of \(k\), will the variance of the the \(k\) sample averages (from [Step 2]) change? Make a prediction, reason your prediction, and evaluate your prediction.


// Add your answers here


# Include your implementation for Part A here

B. Propagation of Uncertainty#

Setup and Steps#

You are measuring the resistance of a resistor with a simple DC circuit. You measure both the voltage across the resistor and the current through the resistor, and then use Ohm’s law \(V=IR\) to calculate the resistance. If your voltage and current measurements both have an uncertainty of 1%, what is the uncertainty of the calculated resistance?

  1. Sample from some probability distribution to simulate repeated voltage measurements, such that the standard deviation of those measurements is about 1%.

  2. Repeat Step 1 to simulate repeated current measurements.

  3. Calculate the resistance by pairing the simulated voltage and current measurements from Step 1 and 2.

  4. Repeat Steps 1-3 but make the voltage and current measurements positively coorelated.

Questions#

  1. What is the standard deviation of the calculated resistance values from [Step 3] (i.e., when the voltage and current measurements are independent)? Make a prediction, reason your prediction, and evaluate your prediction.

  2. How does standard deviation of the calculated resistance change when the voltage and current measurements become correlated in [Step 4]? Make a prediction, reason your prediction, and evaluate your prediction.


// Write your answers here


# Include your implementation for Part B here

Final question#

Roughly how much time did you spend on this lab (not including the time you spent in class)?


// Write your answers here


Tip

How to submit this notebook on Canvas?

Once you complete this lab and have all your code, text answers, and all the desired results after running the notebook properly displayed in this notebook, please convert the notebook into HTML format by running the following:

jupyter nbconvert --to html /path/to/labs/02.ipynb 

Then, upload the resulting HTML file to Canvas for the corresponding assignment.