Skip to content

Commit e65a392

Browse files
committed
add error bar part 2
1 parent 9a4ab45 commit e65a392

7 files changed

Lines changed: 809 additions & 49 deletions

File tree

‎docs/activities.html‎

Lines changed: 78 additions & 48 deletions
Large diffs are not rendered by default.

‎docs/img/howbigerr.png‎

8.01 KB
Loading

‎docs/listings.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"/projects/airpressure.html",
77
"/projects/balloon.html",
88
"/projects/apollo.html",
9+
"/projects/errorbar2.html",
910
"/projects/birds.html",
1011
"/projects/birdslauncher.html",
1112
"/projects/bonk.html",

‎docs/projects/errorbar2.html‎

Lines changed: 644 additions & 0 deletions
Large diffs are not rendered by default.

‎docs/search.json‎

Lines changed: 15 additions & 1 deletion
Large diffs are not rendered by default.

‎img/howbigerr.png‎

8.01 KB
Loading

‎projects/errorbar2.qmd‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: "Are my error bars big or small?"
3+
image: ../img/howbigerr.png
4+
categories:
5+
- All Ages
6+
- Data Science
7+
- Spreadsheets
8+
---
9+
10+
![](../img/howbigerr.png){height=300 fig-align="center"}
11+
12+
How big are my error bars? Let's talk about it
13+
14+
## Calculating error bars
15+
16+
In [Why we love error bars](errorbar1.html) we talked about a tire pressure sensor. The sensor shows three digits of precision on the pressure in PSI units. With some thought we can conclude that the uncertainty would be +/- 0.05 PSI because the uncertainty is the fourth digit that we can't see on the digital gauge.
17+
18+
Another situation where the uncertainty is straightforward is when the user manual for the sensor you are using states the uncertainty. For example the CO2 sensor mentioned in other activities on our website is, according to its manual, only accurate to +/- 20 parts per million whereas the CO2 concentration measurement might be between 400 parts per million and 2000 parts per million depending on whether you are outside or inside in a crowded area.
19+
20+
<p style="text-align: right;">
21+
<b>Key lesson:</b><br>
22+
Sometimes determining the uncertainty is as straightforward<br> as reading the user manual for the sensor
23+
</p>
24+
25+
26+
### Multiple measurements
27+
28+
It is always good to do multiple measurements! Everyone knows to take the average of those measurements but how do you figure out the error bar?
29+
30+
A science fair project that many people do is inflate a soccer ball to different PSI pressure and then they do multiple trials of how far they can kick the ball. In these situations the uncertainty is not in the measurement tools. There is no reason to think that the distance the ball traveled was inaccurately measured.
31+
32+
The key question here is whether the <em> average</em> distance changes with PSI pressure. For each value of PSI for the ball, the error bar we are interested in is the uncertainty on the measured average distance. In science we call this “the error on the mean” or “the standard error”.
33+
34+
### How to calculate the error on the mean
35+
36+
If you have multiple trials with THE SAME CONDITIONS (in the example the same PSI) then you can calculate the error on the mean as follows:
37+
38+
* Calculate the mean of all the trials
39+
* For each trial, subtract that specific number from the mean you just calculated. Take that result and square it.
40+
* Do this step of subtracting the result of each trial from the mean and square it for all your meausrements.
41+
* Take all of these values where you have subtracted the measurement and the mean and squared it and add them all together.
42+
* Take the result of that adding these values together and divide by the number of measurements
43+
* Take the result from dividing by the number of measurements and take the square root
44+
45+
<b>Done!</b> You have calculated the error on the mean (a.k.a. [the standard error](https://youtu.be/Vm1NcJuJeeY?si=oBoA21bTB030B9Ix))
46+
47+
Bear in mind that you <b>only do this when the conditions are the same</b>. In the soccer ball example you would not combine results from different PSI when you do the calculation above because different PSI means different conditions.
48+
49+
### An example
50+
51+
Let's take the example of kicking the soccer ball. We try to kick it with the same effort for ten kicks and the measured distance comes out like this:
52+
53+
35 feet, 39 feet, 40 feet, 42 feet, 37 feet, 34 feet, 41 feet, 35 feet, 36 feet, 40 feet
54+
55+
The average distance would be 37.9 feet.
56+
57+
If you do the procedure in the previous section and take the measurement minus the average and square it and do that for each number and add it all up you would get 72.9. Then divide by the number of measurements which is 10 so then you have 7.29 and then take the square root which would give 2.7 feet.
58+
59+
So the average distance would be 37.9 feet +/- 2.7 feet
60+
61+
### Things to notice
62+
63+
Because we are dividing by the number of measurements, as we do more measurements the error on the mean (a.k.a. [standard error](https://youtu.be/Vm1NcJuJeeY?si=oBoA21bTB030B9Ix)) should decrease, which makes sense because as we do more trials the mean from all those trials should get more and more accurate.
64+
65+
That is why, if you do have an opportunity to work on a research project in college, and you show your advisor a result that disagrees with an established model, they are likely to tell you to do more trials!
66+
67+
### Advanced
68+
69+
What we have done is obtained the error bar from the measurements rather than obtaining the error bar from our knowledge of the measurement methods we are using. This is not the only way to obtain error bars from the measured data. Another more complicated approach is called “bootstrapping”.
70+
71+

0 commit comments

Comments
 (0)