Answers for test 2

advertisement
1
NAME
____________________
STUDENT #____________________
SC/BIOL 2060 3.0 STATISTICS FOR BIOLOGISTS
TEST #2
Nov 7, 2014
(TOTAL PAGES = 10 )
(TOTAL MARKS = 40)
(TIME = 90 MINS)
INSTRUCTIONS:
1) WRITE YOUR NAMES AND STUDENT NUMBER ON THE TEST
PAPER
2) PLEASE KEEP YOUR TEST PAPER TO YOURSELF!
3) ANSWER ALL QUESTIONS DIRECTLY ON THE TEST PAPER
ITSELF IN THE SPACE PROVIDED.
4) READ QUESTIONS CAREFULLY, AND THINK CAREFULLY
BEFORE ANSWERING, PROVIDING THE BEST ANSWER.
5) YOU MAY USE A non-programmable CALCULATOR.
6) YOU MAY USE ONE 5 INCH X 8 INCH INDEX CARD WITH
ANYTHING YOU LIKE WRITTEN ON IT.
7) BUDGET YOUR TIME APPROPRIATELY.
8) VARIOUS STATISTICAL TABLES ARE AT THE END OF
THE TEST PAPER on pgs 9&10
2
1. Given a normally distributed population with μ = 8 and σ2 = 4, what is the probability
of sampling randomly a single individual of size x > 6?
(2 marks)
z = (x – μ)/ σ, here σ = √4 = 2
1/2
we want P[x > 6], which is same as P[z > (6 – 8)/2]
= P[z > -1]
= 1 – P[z > 1] = 1- 0.15866 1/2
Therefore the probability of finding an individual > 6 is 0.84134 1
2. Given a normally distributed population with μ = 7 and σ = 4, what is the probability
of sampling randomly an individual that falls into the range 6 < x < 9 ?
(2 marks)
z = (x – μ)/ σ,
This can be resolved by determining the probability of sampling an individual less than 6, and the
probability of sampling an individual greater than 9, and subtracting those two probabilities from 1.
P[x < 6] = P [z < (6-7)/4] which is the same as P[z > .25] = 0.40129 ½
P[x > 9] = P [z > (9-7)/4] which is P [z > 0.5] = 0.30854 ½
Therefore the probability of an individual that falls into the range 6 < x < 9
is P[6 < x < 9] = 1- 0.40129 - 0.30854 = 0.29017 1
3. Given a normally distributed population with μ = 8 and σ = 6, what is the probability
of obtaining a random sample of n = 9 individuals with a mean x̄ < 9?
(3 marks)
z = ( x̄ - μ)/ σx̄
where σx̄ = σ/ √9 = 2
1
P [ x̄ < 9] = P[z < (9-8)/2] = P[z< 0.5] 1
The answer is given by 1 - P[z> 0.5] = 1 – 0.30854 = 0.69146
So the probability of sampling a mean where x̄ < 9, is 0.69146 1
3
4) The ratio of flower colour forms of a species of monkey flower from a particular cross
is expected to be: 1 white : 2 pink : 4 purple : 9 red.
A random sample of plants from the cross gives the following
results: 3 white : 4 pink : 10 purple : 53 red
(5 marks)
Conduct the most appropriate hypothesis test.
Ho: ratio of flower colour is 1 white : 2 pink : 4 purple : 9 red 1/2
Ha: ratio of flower colour is not 1 white : 2 pink : 4 purple : 9 red 1/2
α = 0.05 1/2
Include calculations in here
n = 3+4+10+53 = 70
White
Pink
Purple
Red
Obs
3
4
10
53
exp
70/16 =4.375
2x70/16 =8.75
4x70/16=17.5
9x70/16=39.375
½ for all expected collectively
Since the expected number of white is less than 5 we must pool two categories (white and pink).
X2 calc = (7- 13.125) 2/13.125 +(10-17.5) 2/17.5 + (53-39.375) 2/39.375
X2calc = 10.8 1/2
DF = 3 – 1 = 2, 1/2
therefore critical value is χ2df=2 = 5.99. 1/2
State assumptions of the statistical test: plants are sampled randomly and independently 1/2
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Since X2calc = 10.8 is greater than χ2df=2 = 5.99 we reject Ho so the ratio doesn’t follow the expected.
1/2
There are too many red flowered plants and a deficiency of all other colours 1/2
4
5) A researcher suspects that the proportion of albino budgies from a cross is less than the
expected 40% as a result of mortality of some of the albinos prior to hatching. The
researcher conducts the cross and finds 2 albino budgies and 13 green budgies. (5 marks)
Conduct the most appropriate statistical test.
Ho: the proportion of albino budgies is 0.4 (p = 0.4) 1/2
Conduct a statistical test of the hypothesis using the spaces provide below
Ha: the proportion of albino budgies is less than 0.4 (p < 0.4) 1/2
α = 0.05
Include calculations in here use a 1-tailed binomial test
Pr[x] = n!/(x!(n-x)!) px (1-p)n-x ½
Where p is expected proportion of albino, n = 15, and x is number of budgies.
Since we want probability of result as extreme or more extreme, x = 0, 1, 2
Pr[0 budgies] = 15!/(0!15!) .40 (.6)15 = 0.00047 ½
Pr[1 budgies] = 15!/(1!14!) .41 (.6)14 = 0.00470 ½
Pr[2 budgies] = 15!/(2!13!) .42 (.6)13 = 0.02194 ½
Sum the probabilities gives Pvalue = 0.027 1/2
State assumptions of the statistical test: budgies are randomly and independently sampled 1/2
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Since the Pvalue is less than α = 0.05, we reject Ho 1/2
There are fewer albino budgies than expected. 1/2
5
6) You wish to determine if there is an association between proportion of cryptically
coloured versus non-cryptically coloured butterflies in three sites that differ in the kind of
predators present at the site (hunt visually, or using scent of chemicals or hunt by
listening for prey) . Conduct the most appropriate statistical test
(5 marks)
Butterfly colour
Number cryptic
Number not cryptic
Visual predator
30
20
Chemical predator
60
40
Auditory predator
10
40
Ho: butterfly colour frequency is independent of type of predator ½
Ha: butterfly colour frequency is not independent of type of predator (or is associated with
or dependent on type of predator) ½
α = 0.05
Include all calculations in here
Observed table with row and column totals
Butterfly colour
Visual predator
Chemical predator
Number cryptic
30
60
not cryptic
20
40
total
50
100
Auditory predator
10
40
50
Total
100
100
200
Expected table under assumption of independence of colour and predator type
Butterfly colour
Visual predator
Chemical predator
Auditory predator
Number cryptic
50x100/200=25
100x100/200=50
50x100/200=25
Number not cryptic
50x100/200=25
100x100/200=50
50x100/200=25
1 for correct expected table
X2 calc = (30- 25) 2/25 +(60-50) 2/50 +…+ (40-25) 2/25 = 24 ½
DF = (nrows-1)(ncols-1) = (2-1)(3-1) = 2 ½
χ2df=2 = 5.99 ½
State assumptions of the statistical test: butterflies are sampled randomly and independently ½
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Since X2calc = 24 is greater than χ2df=2 = 5.99 we reject Ho and therefore butterfly colour freq is not
independent of predator type. ½
Comparing the observed and expected tables we note that there are too few cryptic butterflys in the
presence of the auditory predators compared to the other predator types ½
6
7) You wish to determine if mussels are randomly distributed along the bottom of the
Grand River. You randomly sample 100 1-meter square quadrats and count the number of
mussels in each. Test the hypothesis above.
(7 marks)
Results: 30 quadrats had 0 mussels; 50 had 1 mussel; 20 had 2 mussels
Ho: mussels are randomly distributed ½
Ha: mussels are not randomly distributed ½
Conduct a statistical test of the hypothesis using the spaces provide below
α = 0.05
Include all calculations in here: use goodness of fit test to a Poisson distribution
Pr(x) = e-μμx/x! ½ , where x is number of mussels (0, 1, 2), n = 100 quadrats
We must estimate μ by x̄ and the variance, s2, is required later on
x̄ = (0x30 + 1x50 + 2x20)/100 = 0.9 ½
∑x2= 02x30 + 12x50 + 22x20 = 130
s2= (130 – 902/100)/99 = 0.495 ½
Pr(0) = e-.9.90/0! = .4066 ½
Pr(1) = e-.9.91/1! = .3659 ½
Pr(2) = 1- Pr(0)- Pr(1) = .2275 ½
Number of mussels
0
1
2
Obs number quadrats
30
50
20
Exp number quadrats
100x.4066=40.66
100x.3659=36.59
100x.2275=22.75
X2 calc = (30- 40.66) 2/40.66 +(50-36.59) 2/36.59 + (20-22.75) 2/22.75 = 8.04 ½
DF = 3 -1 -1 =1 ½
χ2df=1 = 3.84 ½
State assumptions of the statistical test: quadrats sampled randomly and independently ½
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Since X2calc = 8.04 is greater than χ2df=1 = 3.84 we reject Ho and conclude mussels are not randomly
distributed. ½
Since the variance, s2 = 0.495 is less than the mean, x̄ = 0.9, mussels show a more uniform spatial
distribution. ½
7
8. To test the hypothesis that the number of spotted versus unspotted progeny from
crosses among guppies follows a binomial distribution, you randomly sample 3 progeny
from each of 200 guppy families and record the number of families with 0 out of 3
spotted progeny, 1 out of 3 spotted and so on up to 3 out of 3 spotted. The data are
tabulated below. Test the hypothesis above.
(7 marks)
Number of
families
0 progeny
spotted out
of 3
65
1 spotted
progeny out
of 3
95
2 spotted
progeny out
of 3
35
3 spotted out
of 3
5
Ho: number of spotted vs unspotted guppies in families of 3 follows a binomial distribution ½
Ha: number of spotted vs unspotted is not binomially distributed ½
α = 0.05
Include all calculations in here. Do a goodness of fit test to the binomial distribution.
Here there are 200 families of n=3 guppies each, and p is the proportion of spotted guppies.
Estimated proportion of spotted guppies p = (0x65+1x95+2x35+3x5)/(3 x 200) =0.3 ½
Binomial distribution is given by Pr[x]=n!/(x!(n-x)!) px (1-p)n-x where x is number of spotted guppies.
½ for equation above
Pr[0spot] = 3!/(0!3!) .30 (.7)3 = 0.343 ½
Pr[1spot] = 3!/(1!2!) .31 (.7)2 = 0.441 ½
Pr[2spot] = 3!/(2!1!) .32 (.7)1 = 0.189 ½
Pr[3spot] = 3!/(3!0!) .33 (.7)0 = 0.027 ½
0 spotted
1 spotted
2 spotted
3 spotted
Observed # families
65
95
35
5
Expected # families
200x.343=68.6
200x.441=88.2
200x.189=37.8
200x.027=5.4
X2 calc = (65- 68.6) 2/68.6 +…+ (5-5.4) 2/5.4 = 0.95 ½
DF = 4-1-1 =2 ½ (since we estimated one additional parameter, p, from the data)
χ2df=2 = 5.99 ½
State assumptions of the statistical test: guppies and families sampled random and independ. ½
Decision made about the null hypothesis and a short (1 sentence) statement of conclusions.
Since X2calc = 0.95 is less than χ2df=2 = 5.99 we do not reject Ho. ½
We have no reason to doubt that the guppy colours follow a binomial distribution ½
Or guppy colour APPEAR to follow a binomial distribution.
8
9) Write all the SAS programming code necessary to carry out a goodness of fit test that
tests the hypothesis that the proportion of people with various blood groups follows the
proportions: 0.4 type A : 0.1 type B : 0.05 type AB : 0.45 type O (4 marks)
The data are: 90 type A : 50 type B : 20 type AB : 60 type O
DATA BLOOD; ½
INPUT BLTYPE $ NUMB; ½
DATALINES; (OR CARDS;) ½
A 90
B 50
AB 20 1 for all data correctly entered
O 60
;
PROC FREQ ORDER=DATA; ½
WEIGHT NUMB; ½
TABLES BLTYPE/CHISQ NOCUM TESTP=(0.4 0.1 0.05 0.45); ½
RUN;
9
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
10
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
Download