A4 Python for engineers · Practice
Statistics of measurements
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
Check
The starter simulates n = 16 noisy readings. Set m, s (sample standard deviation), sem (standard error of the mean) and ci to the half-width of an approximate 95% interval, sem.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
The starter's readings are a mix of two groups. Set counts, edges with np.histogram(x, bins=30) and mode_center to the center of the bin with the most counts.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
You compute from V = 5 V (±0.5%) and R = 100 Ω (±5%), both independent. Set P and uP to its relative uncertainty in percent, combined in quadrature.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Two instruments measure the same voltage: x1 = 3.301 V ± 0.002 V and x2 = 3.305 V ± 0.001 V. Set xw to the weighted mean and sw to its uncertainty.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
The starter's 200 readings include a few glitches. Set m and s to their mean and sample standard deviation, then clean to an array of the readings within 3 s of m, n_removed to how many were dropped, and m_clean to the mean of clean.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Readings scatter with a standard deviation of 4 mV. How many must you average to bring the standard error of the mean down to 0.5 mV or less?
Check
Readings have a standard deviation of s = 4 mV. Set n to the smallest number of readings whose standard error of the mean is at most target = 0.1 mV.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Set d = a - b and ud to its uncertainty, with a = 10 ± 0.1 and b = 7 ± 0.1, independent.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in A4