Download answers to test 2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
1
1) Answer the following questions with one or two short sentences.
a) What is a type I error and how can you reduce its probability of occurrence?
(2 marks)
Type I error is the probability of rejecting a null hypothesis that is true
You can reduce its probability by choosing a smaller α-value
(so for example choose α = 0.01 instead of the usual 0.05)
b) You carry out a 1-sample t-test with a 2-sided alternative hypothesis. The sample size
was n = 21 and you calculate the t-statistic and find that t = 3.64. State whether or not you
reject Ho, indicating why you do, or don’t reject it (2 marks)
degrees of freedom, DF = n-1 = 20. The critical t-value = 2.09.
I reject Ho 1 because the calculated t=3.64 is greater than tcrit =2.09.
c) What term best describes the shape of distribution shown below? (1 mark)
Skewed to the right (or positively skewed)
2
2. Given a normally distributed population with mean μ = 6 cm and σ2 = 9, what is the
probability of randomly sampling an individual having a length x < 12 cm ?
(2 marks)
Here μ = 6, σ2 = 9, so σ = 3 ,
z = (x - μ)/ σ
Pr[x < 12 ] = Pr [z < (12-6)/3] or Pr[z < 2].(see sketch below).
I can’t directly get the shaded area from normal dist tables but I can get the unshaded and subtract from 1.
So Pr[x<12] = 1 – Pr[z>2] = 1 – 0.02275.
So the Pr [x < 12 ] = 0.97725
3. Given a normally distributed population with a mean length μ = 7 cm and σ = 2, what
is the probability of randomly sampling an individual that falls into the range 4 < x < 8 ?
(3 marks)
z = (x - μ)/ σ. So here I’ll need to get the unshaded areas and then subtract them from 1.
Pr[x>8] = Pr[z>(8-7)/2] = 0.30854
Pr[x<4] = Pr[z<(4-7)/2] = Pr[z<-1.5] which is the same as Pr[z>+1.5] = 0.06681
So prob x is in the specified range is Pr[4 < x < 8] = 1 - 0.30854 - 0.06681 = 0.62465
4. Given a normally distributed population with μ = 6 and σ = 4, what is the probability
of obtaining a random sample of n = 16 individuals with a mean x̄ > 4?
(3 marks)
σ x̄ = σ/√𝑛, so σ x̄ = 4/ √16, σ x̄ = 1.0 and z = (x̄ - μ)/σ x̄
I can’t directly get the desired shaded area (see below), but I can get the unshaded and subtract from 1.
So 1 – Pr[x<4] is given by 1 – Pr[z< (4-6)/1] or 1 – Pr[z<-2].
By symmetry, this is the same as 1 – Pr[z>+2] = 1 – 0.02275
So prob of obtaining a mean greater than x̄ >4 is 0.97725
3
5) Snails of the species Amphidromus martensi show variation in the direction of coiling
of their shells with some snails having clockwise, and others anti-clockwise coiling. You
randomly sample a population to test whether the two snail shell types are equally
frequent. Your sample has 2 clockwise and 10 anti-clockwise snails. (5 marks)
Conduct the most appropriate statistical test.
Ho: proportion clockwise, p = 0.5. (or they can say proportion are equal, etc).
Conduct a statistical test of the hypothesis using the spaces provide below
Ha: p ≠ 0.5
Include calculations in here. Estimated proportion of clockwise is 𝑝̂ =2/12 =0.167.
So I’ve got fewer clockwise than extected so I’ll do a binomial test and compute the probability
of x=2 clockwise, x=1 clockwise and x=0 clockwise using p = 0.5 and n=12 .
Pr (x) = n!/(x!(n-x)!) px (1-p)n-x
Pr (x=0) = 12!/(0!12!) .50 .512 = 0.000244
Pr (x=1) = 12!/(1!11!) .51 .511 = 0.00293
Pr (x=2) = 12!/(2!10!) .52 .510 = 0.016113
Sum = 0.019287
To get P-value sum and multiply by two since it is two sided
P-value = 0.038574219.
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Reject Ho because P-value =0.039 is less than 0.05.
The snail types are not equally frequent, and there are too few clockwise (𝑝̂ =0.167).
4
6) You attend a very boring lecture on fruitfly genetics. Instead of listening to the
lecture, you try to determine whether the numbers of fruitflies squashed on 12 x 12 inch
floor tiles are randomly distributed. You randomly sample and count the number of tiles
with various numbers of squashed flies on them (7 marks)
Results: 55 tiles had 0 flies; 40 tiles had 1 fly; 5 tiles had 2 flies
Use the most appropriate hypothesis test to address this question.
Ho: flies are randomly distributed on floor tiles
Ha: flies are not randomly distributed on floor tiles
Conduct a statistical test of the hypothesis using the spaces provide below
Include calculations in here: to goodness of fit to Poisson distribution.
Pr (x) = e-μ μx /x!, we must estimate the mean, x̄ , and the standard deviation, s. n = 100 tiles
x̄ = (0 x 55+1 x 40 + 2 x 5)/100, x̄ = 0.5 texts per student
∑ 𝑥 2 = (02 x 55+12 x 40 + 22 x 5) = 60
So s2 = ( 60 – 502/100) /99, or s2 = 0.354
Now calculate probabilities of various outcomes using the Poisson distribution
Pr (0) = e-.5 .50 /0! = 0.6065
Pr (1) = e-.5 .51 /1! = 0.3033
Pr (2) = e-.5 .52 /2! = 0.0902 – get last by subtraction here or in expect Num table.
multiply each by n = 100 to convert to expected numbers and get last one by subtraction:
Obs num
Expect num
0 flys
55
60.65
1
40
30.33
2
5
9.02
X2calc = ∑(obs-exp)2 /exp = (55-60.65) 2/60.65 + … + (5-9.02) 2/9.02
X2calc = 5.40
df = 3-1-1 =1
critical value of with 1 degrees of freedom, χ12 = 3.84
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Reject null hypothesis since calculated X2calc = 5.40 is greater than the critical value χ12 = 3.84
The flys are not randomly distributed and because the variance s2 = 0.354 is less than the mean, x̄ =
0.5, indicates that the data are more uniformly distributed.
5
7) Males of the common side-blotched lizard (Uta stansburiana) differ in having throats
that come in one of three colours (blue, orange or yellow). Test the hypothesis that the
expected proportion of colour forms from a particular cross is:
0.6 blue : 0.3 orange : 0.1 yellow
A random sample of progeny from the cross gives the following observed numbers of
lizards: 80 blue, 45 orange, 25 yellow
Conduct the most appropriate hypothesis test.
(5 marks)
Ho: lizard colours are .6 blue : .3 orange : .1 yellow
Ha: colours don’t follow these proportions .6 blue : .3 orange : .1 yellow
Include calculations in here
observed
expect
blue
80
0.6 x 150 = 90
orange
45
0.3x150 = 45
yellow
25
0.1x150= 15
Total
n = 150
X2calc = (80-90)2/90+(45-45)2/45 +(25-25)2/15
X2calc = 7.78
df = 3 categories – 1 = 2
critical value of χ22 = 5.99
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Since X2calc = 7.78 is greater than χ22 = 5.99, reject the null hypothesis.
The lizard deviate from the predicted colour proportions and there are too many yellow and not
enough blue
6
8) Ants often protect plants from herbivorous insects. You test whether 3 species of ants
(ant species1, ant species2, ant species3) differ in their ability to protect acacia shrubs.
You randomly sample and count acacias, determining which one of three ant species they
have on them, and whether or not the acacias have been damaged by insects. Your counts
of the numbers of damaged or undamaged acacias having different ant species are
tabulated below. Conduct the most appropriate statistical test
(5 marks)
Insect
Number of
Damaged Acacias with
ant species1
Yes
20
No
30
totals
50
Number of
Acacias with
ant species2
30
70
100
Number of
Acacias with
ant species3
40
10
50
totals
90
110
200
Ho: Damage on Acacia is independent of the ant species on them
Ha: Damage on Acacia is depends on the ant species on them
Include calculations in here
Expected table
Insect
Number of
Number of
Damaged Acacias with Acacias with
ant species1 ant species2
Yes
=50x90/200
=100x90/200
=22.5
=45
No
=50x110/200 =100x110/200
=27.5
=55
Number of
Acacias with
ant species3
=50x90/200
=22.5
=50x110/200
=27.5
X2calc = ∑(obs-exp)2 /exp = (20-22.5) 2/22.5 + … + (10-27.5) 2/27.5
X2calc =34.3
df = (nrows-1)(ncols-1) = (3-1)(2-1)
df = 2
critical with 2 degrees of freedom, χ22 = 5.99
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Since X2calc is greater than the critical value, we reject the null hypothesis.
There is an association between damage and ant species with ant species3 giving very poor protection as
expect only 22.5 to be damaged but observe 40 (the other two ant species both show fewer damaged than
expected.
7
9) Write all the SAS programming statements necessary to carry out a goodness of fit test
where the expected proportions of various flower colours in a population of poppies is:
expected proportions: 0.1 red; 0.2 purple; 0.3 yellow; 0.4 black.
(5 marks).
You actually observe the following numbers: 25 red; 35 purple; 40 yellow; 20 black.
DATA FLOWERS;
INPUT COLOUR $ NUMBER;
CARDS; (OR DATALINES;)
red 25
purple 35
yellow 40
black 20
;
PROC FREQ ORDER=DATA;
WEIGHT NUMBER;
TABLES COLOUR/CHISQ NOCUM TESTP=(0.1 0.2 0.3 0.4);
RUN;
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
8
2
ᵡ
Distribution
_________________________________α___________________________________
0.999
0.995 0.99
0.975 0.95
0.05 0.025 0.01 0.005 0.001
df
_____________________________________________________________________
1 0.00001 0.0001 0.0002 0.001 0.004 3.84
5.02 6.63 7.88 10.83
2 0.002
0.01
0.02
0.05 0.10
5.99
7.38 9.21 10.6 13.82
3 0.02
0.07
0.11
0.22 0.35
7.81
9.35 11.34 12.84 16.27
4 0.09
0.21
0.30
0.48 0.71
9.49 11.14 13.28 14.86 18.47
5 0.21
0.41
0.55
0.83 1.15 11.07 12.83 15.09 16.75 20.52
6 0.38
0.68
0.87
1.24 1.64 12.59 14.45 16.81 18.55 22.46
7 0.60
0.99
1.24
1.69 2.17 14.07 16.01 18.48 20.28 24.32
8 0.86
1.34
1.65
2.18 2.73 15.51 17.53 20.09 21.95 26.12
9 1.15
1.73
2.09
2.70 3.33 16.92 19.02 21.67 23.59 27.88
10 1.48
2.16
2.56
3.25 3.94 18.31 20.48 23.21 25.19 29.59
11 1.83
2.60
3.05
3.82 4.57 19.68 21.92 24.72 26.76 31.26
12 2.21
3.07
3.57
4.40 5.23 21.03 23.34 26.22 28.30 32.91
13 2.62
3.57
4.11
5.01 5.89 22.36 24.74 27.69 29.82 34.53
14 3.04
4.07
4.66
5.63 6.57 23.68 26.12 29.14 31.32 36.12
15 3.48
4.60
5.23
6.26 7.26 25.00 27.49 30.58 32.80 37.70
Student’s t-distribution
α(2)
α(1)
df
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
0.2
0.1
0.10
0.05
0.05 0.02 0.01 0.001 0.0001
0.025 0.01 0.005 0.0005 0.00005
1.89
1.64
1.53
1.48
1.44
1.41
1.40
1.38
1.37
1.36
1.36
1.35
1.35
1.34
1.34
1.33
1.33
1.33
1.33
1.32
1.32
1.32
1.32
1.32
1.31
1.31
1.31
1.31
1.31
2.92
2.35
2.13
2.02
1.94
1.89
1.86
1.83
1.81
1.80
1.78
1.77
1.76
1.75
1.75
1.74
1.73
1.73
1.72
1.72
1.72
1.71
1.71
1.71
1.71
1.70
1.70
1.70
1.70
4.30
3.18
2.78
2.57
2.45
2.36
2.31
2.26
2.23
2.20
2.18
2.16
2.14
2.13
2.12
2.11
2.10
2.09
2.09
2.08
2.07
2.07
2.06
2.06
2.06
2.05
2.05
2.05
2.04
6.96
4.54
3.75
3.36
3.14
3.00
2.90
2.82
2.76
2.72
2.68
2.65
2.62
2.60
2.58
2.57
2.55
2.54
2.53
2.52
2.51
2.50
2.49
2.49
2.48
2.47
2.47
2.46
2.46
9.92 31.60
5.84 12.92
4.60 8.61
4.03 6.87
3.71 5.96
3.50 5.41
3.36 5.04
3.25 4.78
3.17 4.59
3.11 4.44
3.05 4.32
3.01 4.22
2.98 4.14
2.95 4.07
2.92 4.01
2.90 3.97
2.88 3.92
2.86 3.88
2.85 3.85
2.83 3.82
2.82 3.79
2.81 3.77
2.80 3.75
2.79 3.73
2.78 3.71
2.77 3.69
2.76 3.67
2.76 3.66
2.75 3.65
99.99
28.00
15.54
11.18
9.08
7.88
7.12
6.59
6.21
5.92
5.69
5.51
5.36
5.24
5.13
5.04
4.97
4.90
4.84
4.78
4.74
4.69
4.65
4.62
4.59
4.56
4.53
4.51
4.48
9
Standard Normal (Z) Distribution
____________________________________________________________________________________________________________________
0
1
2
3
4
5
6
7
8
9
1st 2
2nd digit after decimal
digits______________________________________________________________________________________________________________________________
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
3.0
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
4.0
0.50000
0.46027
0.42074
0.38209
0.34458
0.30854
0.27425
0.24196
0.21186
0.18406
0.15866
0.13567
0.11507
0.09680
0.08076
0.06681
0.05480
0.04457
0.03593
0.02872
0.02275
0.01786
0.01390
0.01072
0.00820
0.00621
0.00466
0.00347
0.00256
0.00187
0.00135
0.00097
0.00069
0.00048
0.00034
0.00023
0.00016
0.00011
0.00007
0.00005
0.00003
0.49601
0.45620
0.41683
0.37828
0.34090
0.30503
0.27093
0.23885
0.20897
0.18141
0.15625
0.13350
0.11314
0.09510
0.07927
0.06552
0.05370
0.04363
0.03515
0.02807
0.02222
0.01743
0.01355
0.01044
0.00798
0.00604
0.00453
0.00336
0.00248
0.00181
0.00131
0.00094
0.00066
0.00047
0.00032
0.00022
0.00015
0.00010
0.00007
0.00005
0.00003
0.49202
0.45224
0.41294
0.37448
0.33724
0.30153
0.26763
0.23576
0.20611
0.17879
0.15386
0.13136
0.11123
0.09342
0.07780
0.06426
0.05262
0.04272
0.03438
0.02743
0.02169
0.01700
0.01321
O.D1017
0.00776
0.00587
0.00440
0.00326
0.00240
0.00175
0.00126
0.00090
0.00064
0.00045
0.00031
0.00022
0.00015
0.00010
0.00007
0.00004
0.00003
0.48803
0.44828
0.40905
0.37070
0.33360
0.29806
0.26435
0.23270
0.20327
0.17619
0.15151
0.12924
0.10935
0.09176
0.07636
0.06301
0.05155
0.04182
0.03362
0.02680
0.02118
0.01659
0.01287
0.00990
0.00755
0.00570
0.00427
0.00317
0.00233
0.00169
0.00122
0.00087
0.00062
0.00043
0.00030
0.00021
0.00014
0.00010
0.00006
0.00004
0.00003
0.48405
0.44433
0.40517
0.36693
0.32997
0.29460
0.26109
0.22965
0.20045
0.17361
0.14917
0.12714
0.10749
0.09012
0.07493
0.06178
0.05050
0.04093
0.03288
0.02619
0.02068
0.01618
0.01255
0.00964
0.00734
0.00554
0.00415
0.00307
0.00226
0.00164
0.00118
0.00084
0.00060
0.00042
0.00029
0.00020
0.00014
0.00009
0.00006
0.00004
0.00003
0.48006
0.44038
0.40129
0.36317
0.32636
0.29116
0.25785
0.22663
0.19766
0.17106
0.14686
0.12507
0.10565
0.08851
0.07353
0.06057
0.04947
0.04006
0.03216
0.02559
0.02018
0.01578
0.01222
0.00939
0.00714
0.00539
0.00402
0.00298
0.00219
0.00159
0.00114
0.00082
0.00058
0.00040
0.00028
0.00019
0.00013
0.00009
0.00006
0.00004
0.00003
0.47608
0.43644
0.39743
0.35942
0.32276
0.28774
0.25463
0.22363
0.19489
0.16853
0.14457
0.12302
0.10383
0.08691
0.07215
0.05938
0.04846
0.03920
0.03144
0.02500
0.01970
0.01539
0.01191
0.00914
0.00695
0.00523
0.00391
0.00289
0.00212
0.00154
0.00111
0.00079
0.00056
0.00039
0.00027
0.00019
0.00013
0.00008
0.00006
0.00004
0.00002
0.47210
0.43251
0.39358
0.35569
0.31918
0.28434
0.25143
0.22065
0.19215
0.16602
0.14231
0.12100
0.10204
0.08534
0.07078
0.05821
0.04746
0.03836
0.03074
0.02442
0.01923
0.01500
0.01160
0.00889
0.00676
0.00508
0.00379
0.00280
0.00205
0.00149
0.00107
0.00076
0.00054
0.00038
0.00026
0.00018
0.00012
0.00008
0.00005
0.00004
0.00002
0.46812
0.42858
0.38974
0.35197
0.31561
0.28096
0.24825
0.21770
0.18943
0.16354
0.14007
0.11900
0.10027
0.08379
0.06944
0.05705
0.04648
0.03754
0.03005
0.02385
0.01876
0.01463
0.01130
0.00866
0.00657
0.00494
0.00368
0.00272
0.00199
0.00144
0.00104
0.00074
0.00052
0.00036
0.00025
0.00017
0.00012
0.00008
0.00005
0.00003
0.00002
0.46414
0.42465
0.38591
0.34827
0.31207
0.27760
0.24510
0.21476
0.18673
0.16109
0.13786
0.11702
0.09853
0.08226
0.06811
0.05592
0.04551
0.03673
0.02938
0.02330
0.01831
0.01426
0.01101
0.00842
0.00639
0.00480
0.00357
0.00264
0.00193
0.00139
0.00100
0.00071
0.00050
0.00035
0.00024
0.00017
0.00011
0.00008
0.00005
0.00003
0.00002
Related documents