Upload
archibald-harrington
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
Plan Collect Process Discuss
Start screen
What sort of neighbourhood do
you live in?
Plan Collect Process Discuss
Start screen
Plan Collect Process Discuss
Start screen
How safe is the area you live in?
What sort of area do you live in?
CollectPlan Process Discuss
Start screen
How safe do you think it
is?
Discuss
Process
Plan Collect Process Discuss
Plan
Collect
DHCycleThe Problem Solving Approach
You can build on the first try by
continuing here...
First we decide what problem to
solve and what data we need
Then we collect suitable data.Then we examine
our data and make it easier to understand.
Discuss
Process
Plan Collect Process Discuss
Plan
Collect
DHCycleThe Problem Solving Approach
How safe is your neighbourhood?
TV, radio and newspapers regularly report crimes and crime statistics.
Collect Process Discuss
Crime in the Media
Plan
PlanCollect Process Discuss
Set the problem
How safe is your neighbourhood?
Are the crime figures as bad as some of the newspapers suggest?
What are the crime figures like in your neighbourhood?
Are crime figures increasing each year?
Should people be more/less concerned about certain crimes?
Where in the UK is the ‘safest’ place to live?
Where is the ‘crime capital’ of the UK?
In which areas of the UK is crime increasing?
Which places are improving?
Plan Collect Process Discuss
Start screen
How can you find out?
Who should you ask?
What proportion of students worried about safety?
Do most fr
eshers
live in safe
neighbourhoods?
What should you ask them?
Plan
Collect Process Discuss
Crime in the Media
Plan
Is there any association between university town and attitude to
safety?
Do fresh
ers ch
oose
‘safe
’ neighbourh
oods
to liv
e in?
Are students at all
universities worried?
Use a questionnaire?
What crimes worry students most?
Collect Process Discuss
Eight categories
Plan
Develop a model of the population. One variable may depend on another. Turn the model into precise statistical hypotheses (null and alternative).
H0:
H1:
There is no association between university town and concern about being mugged
There is an association
CollectProcess Discuss
Plan
The questionnaire
Discuss
Process
Plan Collect Process Discuss
Plan
Collect
DHCycleThe Problem Solving Approach
You arenow here.
CollectProcess Discuss
Which data
Plan
You did this in your first seminars
Students at three other UK universities have completed the
questionnaire
Discuss
Process
Plan Collect Process Discuss
Plan
Collect
DHCycleThe Problem Solving Approach
You arenow here.
ProcessPlan Collect Discuss
Which processes
If University and scale of worry are INDEPENDENT
P(B and fairly worried) = P(B) х P(2)
250
45
250
65
ProcessPlan Collect Discuss
Which processes
How does this compare with P(B and 2) 0560.0250
14
P(B and 2) = 0468.0250
45
250
65
How close are they??
Expected frequencies
How many would we have expected to be B and 2?
P(B and 2)
If B and 2 are independent
Expected frequency =
250
45
250
65 7.11
250
4565
row total х column total
overall total
х (total number)
250
ProcessPlan Collect Discuss
ProcessPlan Collect Discuss
Which processes
H0:
H1:
There is no association between university and worry about being mugged
There is an association
We also need to choose the level α
Recall that α = P(reject H0 when H0 true)
What is the test statistic?
The test statistic
Expected frequency = row total х column total
overall totali is row number
j is column number
eij is expected frequency for cell (i, j)
oij is the observed (sample) frequency for cell (i, j)
ji ij
ijij
e
eoX
,
2
2 TEST STATISTIC
X2 has a distribution that is approximately
The approximation is good when all of eij ≥5
or when 80% of eij ≥ 5 and all eij ≥ 1
2 (Chi squared)
ProcessPlan Collect Discuss
The distribution2
0 5 10 15
0.0
00
.05
0.1
00
.15
chisq
f(ch
isq)
)( 2f
2
ji ij
ijij
e
eoX
,
2
2
has a chi-squared distribution with (r-1)(c-1) degrees of freedom
(r-1)(c-1) = rc – r – c + 1
number of oij frequencies
number of row totals
number of column totals
(r-1)(c-1) df
Remove double counting
ProcessPlan Collect Discuss
0 2 4 6 8 10 12
0.0
0.1
0.2
0.3
0.4
0.5
chisq
f(ch
isq
)
df = 2
Different 2 distributions
2 d.f.
0 5 10 15 20
0.0
00.
05
0.1
00.
15
chisq
f(ch
isq)
df = 5
5 d.f.
0 20 40 60 80 100
0.0
00
.01
0.0
20
.03
0.0
4
chisq
f(ch
isq
)
df = 50
50 d.f.
0 50 100 150
0.0
00
0.0
05
0.0
10
0.0
15
0.0
20
0.0
25
chisq
f(ch
isq
)
df = 100
100 d.f.
ProcessPlan Collect Discuss
The decision rule2
0 5 10 15
0.0
00
.05
0.1
00
.15
chisq
f(ch
isq)
)( 2f
2
ji ij
ijij
e
eoX
,
2
2
If oij close to eij
(r-1)(c-1) df
2ijij eo will be close to zero and
X2 will be small
If oij very different from eij , 2ijij eo and X2 will be large
DECISION RULE
Reject H0 if X2 is too big
ProcessPlan Collect Discuss
ProcessPlan Collect Discuss
Which processes
Example
H0:
H1:
α = 0.05
There is no association between university and worry about being mugged
There is an association
DECISION RULE
Reject H0 if
28,05.0
22 )(
i ij
ijijcalc e
eoX
d.f. = (3-1)Χ(5-1) = 8
ProcessPlan Collect Discuss
Which processes2
8,05.0
22 )(
i ij
ijijcalc e
eoX
ProcessPlan Collect Discuss
Which processesExample
H0:
H1:
α = 0.05
There is no association between university and worry about being mugged
There is an association
DECISION RULE
Reject H0 if
d.f. = (3-1)Χ(5-1) = 8
From sample data …
507.15)( 2
8,05.0
22
i ij
ijijcalc e
eoX
ProcessPlan Collect Discuss
Which processes
From Minitab
Expected frequencies
Contribution to test statistic
Test statistic
Discuss
Process
Plan Collect Process Discuss
Plan
Collect
DHCycleThe Problem Solving Approach
You arenow here.
H0 : there is no association between university attended and fear of being mugged
H1 : there is an association
α = 0.05
DECISION rule
Reject H0 if
DISCUSS
507.15)( 2
2
i ij
ijij
e
eoX
2f
2
d.f. = (r-1)Χ(c-1) = 8
REJECTDo not reject
From sample data
23.77722 calc
0 5 10 15
0.0
00
.05
0.1
00
.15
0.2
00
.25
chisq
f(ch
isq
)
8 df
DiscussPlan Collect Process
DiscussPlan Collect Process
Discussion
Other questions?
• about what is this due to
• about other questions/associations
What can we conclude?
Discuss
Process
Plan Collect Process Discuss
Plan
Collect
DHCycleThe Problem Solving Approach
You arenow here.
You can build on the first try by
continuing here...
Have you got all the evidence
you want?