Uncertainties and Chi-Squared Explained 1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Focus on Error and Uncertainties:

There are two types of uncertainties


1. Absolute Uncertainty → has the same units as the initial measurement. Is generally 12 the smallest unit of
measurement for analogue measurement, and 1 on the smallest decimal number
Example:
Analogue →  the graduated cylinder: smallest unit of measurement is 1ml, therefore the
uncertainty would be 0.5ml
Digital → the timer: if the timer was rounded to two decimal places,  then the uncertainty would
be 0.01 seconds. If the timer was rounded to three decimal places, then the uncertainty would be
0.001 seconds
2. Relative or Percent Uncertainty → has no units, and is calculated from the absolute uncertainty
Example: if we have 3.3 0.2 kg , 0.2 is the absolute uncertainty. This could also be written as
3.3kg 6.1%, 6.1% is the relative uncertainty.

How to work with uncertainties:

 Adding and Subtracting: when adding and subtracting values that have an uncertainty, you add the
absolute uncertainties
o note: all uncertainties must be in the same units
 Multiplying and Dividing: when multiplying or dividing values that have an uncertainty, you must first
find the relative uncertainty for each value, and second add the relative uncertainties together, third
convert the new relative uncertainty back to an absolute uncertainty for your processed value.

Worked Examples:

Adding and Subtracting


Consider the numbers: (6.5 ± 0.5) m and (3.3 ± 0.1) m

Adding:
(6.5 ± 0.5) m + (3.3 ± 0.1) m    
= (6.5+ 3.3) ± (0.5+0.1) m
=(9.8 ± 0.6) m
Subtracting:
(6.5 ± 0.5) m - (3.3 ± 0.1) m
= (6.5- 3.3) ± (0.5+0.1) m
=(3.2 ± 0.6) m

Multiplying and Dividing

Consider the numbers: 5.0  ± 0.2)m and (3.0 ± 0.1)s


Multiply: (5.0  ± 0.2)m (3.0  ± 0.1)s
Note: you need to convert to relative uncertainties first (uncertaintyvalue100)
0.25.0100=4.0%
0.13.0100 = 3.3%
Then continue with the problem:
(5.0 m ± 4.0%) x (3.0 s ± 3.3%)
= (5.03.0 m•s) ±( 4.0+3.3)%
=(15.0 m•s ± 7.3%)
You must convert back to the absolute uncertainty (value relative uncertainty100)
= 15.0 m•s ± (15.07.3100)
= (15.0 ± 1.1) m•s

Divide: (5.0  ± 0.2)m (3.0  ± 0.1)s


Note: you need to convert to relative uncertainties first (uncertaintyvalue100)
0.25.0100=4.0%
0.13.0100 = 3.3%
Then continue with the problem:
(5.0 m ± 4.0%) (3.0 s ± 3.3%)
= (5.03.0 m/s) ±( 4.0+3.3)%
= (1.7 m/s ± 7.3%)
You must convert back to the absolute uncertainty (value relative uncertainty100)
= 1.7m/s ± (1.77.3100)
= (1.7  ± 0.1)m/s

Apply your Skills

1. What was the uncertainty for the volume measurements?

2. What was the uncertainty for the time measurements?

3. Calculate the uncertainty for flow rate? (Show all your work for one example)

4. Calculate the uncertainty for average flow rate?(show all your work for one example)
Chi Square Goodness of Fit Test

Purpose: to determine if the data you have gathered (sample data) is a good fit with what would be expected of the
data (expected distribution).
For example, in a deck of cards, if I were to draw 20 cards I would expect that I would draw 5 of each suit
(25% chance) however I may draw 6 hearts, 4 diamonds, 5 spades and 5 clubs. The Chi Square goodness of fit test
will statistically tell me if this is ‘within reason’.

The Chi Square goodness of fit tests starts with a null and alternative hypothesis, at the end of the test we will either
accept or reject the null hypothesis.

Null Hypothesis: Ho →  The data are consistent with a specified distribution.


Alternative Hypothesis: Ha →  The data are not consistent with a specified distribution.

The Chi Square (x2)is calculated with the formula:


x2= Σ[(O-E)2/E] where O represents the observed value and E represents the expected value .

Worked Example (from the card example above)


Hearts Diamonds Spade Clubs

Observed 6 4 5 5

Expected 5 5 5 5

O-E 1 -1 0 0

(O-E)2 1 1 0 0

(O-E)2/E 1/5 1/5 0 0

x2= Σ[(O-E)2/E] 2/5

Therefore x2=⅖
We then compare our calculated x2 value to the critical x2 value at a specified degrees of freedom (degrees of
freedom are found looking at the number of categories and subtracting 1 → 4 categories -1 = 3 )
 The critical value is found using the chi square distribution table
We will always work with a significance level of 0.05 (which means we can be 95% confident that our results are
not by chance).

If calculated x2 is less than the critical x2 → the data is a good fit to our model

If calculated x2 is greater than the critical x2 → the data is not a good fit to our model

In this case the critical x2 is 7.815 and the calculated x2 value is ⅖. Therefore the data is a good fit and we accept the
null hypothesis.
Apply your skills
We will look to see if the data the grade 11 students collected for the flow rate of a burette lab is a good fit.
Null Hypothesis: ______________________________________________________________________

Alternative Hypothesis: _______________________________________________________________

Degrees of freedom: __________________________________________

Critical Chi Square value: ______________________________________

Total Number of people surveyed: _____________________________

Average -3 Average - 2 Average 1 Average + 2 Average + 3


uncertainties uncertainties uncertainty uncertainties uncertainties

Observed

Expected 1% of people 15% of people 68% of people 15% of people 1% of people


surveyed surveyed surveyed surveyed surveyed

O-E

(O-E)2

(O-E)2/E

Sum → x2= Σ[(O-E)2/E]

Conclusion:  How does your calculated value compare and do you accept or reject the null hypothesis?
Note: Always work with absolute values - therefore the expected % of people surveyed need to be converted into an
absolute number. I.e. if I surveyed 100 people, then I would say the expected values would be 1,15,68,15 and 1
respectively.
Also you will need to change the titles to reflect what what your categories will be based on your data.

Chi Square Test of Independence


Purpose: To determine if there is a significant relationships between categorical data you have collected.
For example, if you collected data about drink preference in different age groups, the Chi Square test of
Independence would determine if there is a significant relationship between age and drink preference.
The Chi Square test of independence starts with a null and alternative hypothesis, at the end of the test we will either
accept or reject the null hypothesis.

Null Hypothesis: Ho →  There is no significant relationship between the categories of data


Alternative Hypothesis: Ha →   There is a significant relationship between the categories of data

The statistic is calculated in the same way as the goodness of fit test x2= Σ[(O-E)2/E] however you will approach
calculating the expected values and degree of freedom differently.

Worked example:
In a school, students in grades 9 to 12 were asked to select their preferred drink. The choices were milk, juice and
water. The data obtained are organized in the following table.

Observed values:
Milk Juice Water Row Total

Grade 9 25 34 15 74

Grade 10 31 30 13 74

Grade 11 18 35 17 70

Grade 12 9 36 26 71

Column Total 83 135 71 289

Expected Values:

The expected values is calculated using the formula :

E=row total x column total ÷ sample total

Milk Juice Water Row total (from previous


table)

Grade 9 7483289 74135289 7471289 74


=21.25 =34.57 =18.17

Grade 10 7483289 74135289 7471289 74


=21.25 =34.57 =18.17

Grade 11 7083289 70135289 7071289 70


=20.10 =32.70 =17.19

Grade 12 7183289 71135289 7171289 71


=20.39 =33.16 =17.44

Column total (from previous 83 135 71 289


table)

Calculating x2= Σ[(O-E)2/E]


Milk Juice Water

Grade 9 (21.25-25)221.25
=0.66 0.01 0.55

Grade 10 4.47 0.60 1.47

Grade 11 0.22 0.16 0.00

Grade 12 6.36 0.24 4.20

Sum: x2= Σ[(O-E)2/E] 18.96

Degrees of Freedom = (rows-1)(columns-1)


Degrees of freedom = (3-1)(4-1)= 6

Critical value (from the Chi Square Distribution Chart)at 6 degrees of freedom = 12.592

If calculated x2 is less than the critical x2 → the data is independent


If calculated x2 is greater than the critical x2 → the data is not independent

Therefore, we reject the null hypothesis since 18.96>12.592 and conclude that drink preference and age are not
independent.

Apply your skills

We will look to see if the number of types of science courses taken by the grade 11 students is independent of their
results

Null Hypothesis: ______________________________________________________________________

Alternative Hypothesis: _______________________________________________________________

Degrees of freedom: __________________________________________


Critical Chi Square value: ______________________________________

Total Number of people surveyed: _____________________________

Observed values:
Below average Average ±1 uncertainty Above average Row Total

1 science SL

1 science HL

2 sciences SL/HL

2 science HL/HL

Column Total

Expected Values:

The expected values is calculated using the formula :

E= row total x column total ÷ sample total

Below Average ±1 Above Row Total (from


average uncertainty average previous table)

1 science SL

1 science HL
2 sciences SL/HL

2 science HL/HL

Column Total from


previous  table)

Calculating x2= Σ[(O-E)2/E]


Below average Average ±1 uncertainty Above average

1 science SL

1 science HL

2 sciences SL/HL

2 science HL/HL

Sum x2= Σ[(O-E)2/E]

Conclusion:

You might also like