Upload
fatima-d
View
98
Download
2
Tags:
Embed Size (px)
Citation preview
Lecture 13 - Revision for Test BC2 Foundation Mathematics (Standard Track)
Dr Linda Stringer Dr Simon [email protected] [email protected]
INTO City/UEA London
Outline
Lecture 8Pythagoras’ Theorem and TrigonometrySine and Cosine rules, Areas
Lecture 9Probability
Lecture 10Mode, Median and Interquartile rangeMean, Absolute deviation, Standard deviationZ-test
Lecture 11T-test
Lecture 12χ2 -test
Pythagoras’ Theorem
I Only works in right-angled triangles.
a
bc
I
a2 + b2 = hyp2
sin, cos and tan ratios
I Only works in right-angled triangles.
opp
adjhyp A
tan(A) =oppadj
cos(A) =adjhyp
sin(A) =opphyp
Angle rule
I Works in any triangle.
a
bc
B C
A
I
A + B + C = 180
Sine rule
I Works in any triangle.
a
bc
B C
A
I
asin A
=b
sin B=
csin C
Cosine rule
I Works in any triangle.
a
bc
B C
A
I
a2 = b2 + c2 − 2bc cos(A)
Area
I Works in any triangle.
a
bc
B C
A
I
Area =12
ab sin(C)
Probability
I The sum of all probabilities is 1.I The probability an event A happens is denoted P(A) and is
a number between 0 and 1.I The probability A does not happen is 1− P(A).I The probability A and B happens is P(A)× P(B).I The probability A or B happens is P(A) + P(B).
Probability trees
I You can use a probability tree when there is more than oneevent.
I Draw different tiers of branches for different events, andwrite the probability next to the branch.
I Multiply probabilities along the branches (AND)I Add up the probabilities at the end of each branch (OR)I The total of all the probabilities at the end of the branches
should be 1I The probabilities for the second tier may be the same as
for the first tier, or they may be different
Probability tree - roll a fair die twice (or roll two fairdice)
What is the probability that I roll two fours?What is the probability that I roll no fours?What is the probability that I roll exactly one four?What is the probability that I roll at least one four?
First roll Second roll
P(4,4) = 16 ×
16 = 1
36
P(4,¬4) = 16 ×
56 = 5
36
P(¬4,4) = 56 ×
16 = 5
36
P(¬4,¬4) = 56 ×
56 = 25
36
¬4
¬4
5/6
41/65/6
4
¬4
5/6
41/6
1/6
Mode
The mode is the most frequent object in your data.
X = 5 8 -3 7 8 2 8
The mode of X is 8.
Y = 0 2 1 6 5 1 2 3
The modes of Y are 1 and 2.
Median
The median is the middle data.
X = 5 8 -3 7 8 2 8
Order the data
X = -3 2 5 7 8 8 8
7× 1/2 = 3.5
Round up to 4.The median of X is the fourth term 7.
Median
Y = 0 2 1 6 5 1 2 3
Order the data
Y = 0 1 1 2 2 3 5 6
8× 1/2 = 4
Add the fourth term and the fifth term and divide by 2.The median of Y is 2+2
2 = 2.
Interquartile range
I First order the data, with values increasing from left to right.I We want to find two values: the first quartile Q1 and the
third quartile Q3.I Let n be the size of the data set (the number of values).I To find Q1 we multiply n by 1
4 . If n4 is an integer (whole
number) then Q1 is the midpoint of the (n4 )th value and the
(n4 + 1)th value
I If n4 is not an integer then round it up to the nearest integer.
Q1 is the corresponding value.I To find Q3 we multiply n by 3
4 . If 3n4 is an integer then Q3 is
the midpoint of the (3n4 )th value and the (3n
4 + 1)th value
I If 3n4 is not an integer then round it up to the nearest
integer. Q3 is the corresponding value.I The interquartile range is Q3 −Q1.
Interquartile range
The interquartile range is the middle half of the data. Take theordered data
X = -3 2 5 7 8 8 8
Find Q1 :7× 1/4 = 1.75
Round up to 2.The first quartile if X is the second term, Q1 = 2.Find Q3 :
7× 3/4 = 5.25
Round up to 6.The third quartile if X is the sixth term, Q3 = 8.The interquartile range is Q3 −Q1 = 8− 2 = 6
Interquartile range
The interquartile range is the middle half of the data. Take theordered data
Y = 0 1 1 2 2 3 5 6
Find Q1 :8× 1/4 = 2
Add the second term and the third term and divide by 2.The first quartile of X is Q1 = 1+1
2 = 1.Find Q3 :
8× 3/4 = 6
Add the sixth term and the seventh term and divide by 2.The third quartile of X is Q3 = 3+5
2 = 4.The interquartile range is Q3 −Q1 = 4− 1 = 3
Mean
The mean is the average of the data.
x̄ =
∑x
n
5 8 -3 7 8 2 8
x̄ =5 + 8 + (−3) + 7 + 8 + 2 + 8
7=
357
= 5
Absolute deviation
The absolute deviation is the average distance of the data fromthe mean.
AD =
∑|x − x̄|
n
5 8 -3 7 8 2 8
Calculate |x − x̄| (remember that we calculated x̄ = 5)
0 3 8 2 3 3 3
Add these values together and divide by the number of valuesin the list
AD =0 + 3 + 8 + 2 + 3 + 3 + 3
7=
227
Standard deviation
5 8 -3 7 8 2 8
The standard deviation, σ, is a measure of spread.First find the variance, σ2.
σ2 =
∑x2
n− x̄2
Calculate x2:
25 64 9 49 64 4 64
Add these values together, divide by the size of the data andsubtract the mean squared.
σ2 =2797− 52 =
1047
The standard deviation is the square root of the variance
σ = 3.85 to 2 d.p.
Structure of hypothesis tests
The Z-test, the T-test and the χ2-test all have the samestructure
I Hypotheses (H0 and H1)I Critical value (look it up in a table, and for the Z-test and
T-test add a sketch showing rejection regions )I Test statistic (calculate)I Decision (accept/reject H0)I Conclusion (write a sentence)
The Z-test
I The question will tell you the population mean µ and thestandard deviation of the population σ. It may also give youinformation for your alternative hypothesis.
I Write your null hypothesis H0 and your alternativehypothesis H1.
I Read your critical value off the table.This will depend onyour significance level and your alternative hypothesis.
I You will be given a sample mean x̄ and the size of thesample data n. Calculate your test statistic.
Z =x̄ − Aσ/√
n
I Compare the test statistic and the critical value. Decide toaccept or reject the null hypothesis. Write a concludingsentence.
Example
I The National Association of Florists say the perfectsunflower should be 90cm tall with a standard deviation of9.5cm. We grow 100 sunflowers with a mean height of 92cm. We want to see whether or not our sunflowers areperfect to a 5% level of significance.
I H0 : µ = 90.H1 : µ 6= 90.
I We are doing a 2-tailed test. Reading off our table we getcritical values of −1.96 and 1.96.
I The test statistic is 92−909.5/
√100
= 2.11 to 2 d.p.
I The test statistic 2.11 is bigger than the critical value 1.96so we decide to reject the null hypothesis.
I We conclude that our sunflowers are not perfect.
The T-testI The question will tell you the population mean µ. It will also
give you a small table of size n with some data. It may alsogive you information for your alternative hypothesis.
I Write your null hypothesis H0 and your alternativehypothesis H1.
I Read your critical value off the table.This will depend onyour significance level, your alternative hypothesis and thedegree of freedom of your data.
I You will calculate the sample mean x̄ and the samplestandard deviation s. Calculate your test statistic.
T =x̄ − A
s/√
n
I Compare the test statistic and the critical value. Decide toaccept or reject the null hypothesis. Write a concludingsentence.
ExampleI The National Association of Florists say the perfect
sunflower should be 90cm tall. We grow 8 sunflowers.
90 93 87 86 50 92 95 93
We want to see whether our sunflowers are too short at a5% level of significance.
I H0 : µ = 90.H1 : µ < 90.
I We are doing a 1-tailed test, our degrees of freedom is8− 1 = 7. Reading off our table we get a critical value of−1.90.
I The sample mean is 86 and the sample standard deviationis 13.01. It follows the test statistic is −0.87.
I The test statistic −0.87 is bigger than the critical value−1.90 so we decide to accept the null hypothesis.
I We conclude that our sunflowers are perfect.
The χ2-testI The question will give you a table.I Write your null hypothesis H0 that the variables are
independent and your alternative hypothesis H1 that thevariables are dependent.
I Read your critical value off the table.This will depend onyour significance level and the degrees of freedom of yourdata (n − 1)(m − 1).
I Calculate the row and column totals of the observed table.I Calculate the expected table. Row total times column total
divide by grand total.I Calculate the residual table. Observed minus expected.I Calculate the χ2 table. Residual value squared divided by
the expected value.I Calculate the test statistic. Add all the values in the χ2
table.I Compare the test statistic and the critical value. Decide to
accept or reject the null hypothesis. Write a concludingsentence.
ExampleI The Institute for Studies want to know if the weather and
peoples happiness is independent to a 1% level ofsignificance. They collect the following data.
Happy Indifferent SadRain 4 9 20Snow 15 2 10Sun 25 12 3
I H0 : The weather and people’s happiness are independent.H1 : People’s happiness depends on the weather.
I Calculate the totals.
Happy Indifferent Sad Row totalRain 4 9 20 33Snow 15 2 10 27Sun 25 12 3 40
Column total 44 23 33 100
Example
I Calculate the expected table (to 3 d.p.).
14.52 7.59 10.8911.88 6.21 8.9117.6 9.2 13.2
I Calculate the residual table (to 3 d.p.).
-10.52 1.41 9.113.12 -4.21 1.097.4 2.8 -10.2
Example
I Calculate the χ2 table (to 3 d.p.).
7.623 0.262 7.6210.819 2.854 0.1333.111 0.8 7.882
I The test statistic is 31.10 to 2 d.p.I The degree of freedom is (3− 1)× (3− 1) = 4. Our critical
value is 13.28.I Our test statistic is greater than our critical value so we
decide to reject our null hypothesis.I People’s happiness depends on the weather.
Standard Track Test B will be held during theweek beginning 21 April