Title: Assignmnet: Simple Random Sampling With Replacement
1Assignmnet Simple Random Sampling With
Replacement
2Question 2 SRSWR
- a. What is the formula to estimate the sample
variance
3Question 2. (SRSWR)
- 2c. (a54p10.sas). Do any samples occur where the
same patient was selected on each of the
selections? - Which ones?
- What is the chance (probability) that this will
happen? - Is the number of times that the same subject was
selected each time equal to what you would
expect? - Why or why not.
42c. (a54p10.sas).
- Do any samples occur where the same patient was
selected on each of the selections? (Note sid1,
sid2, etc are the subject IDs) - PROC PRINT DATAd NOOBS SPLIT""
- VAR sample sid1-sid3
- TITLE2 "Table 2. List of nsamp Simple Random
Samples " - RUN
52c. (a54p10.sas).
- Table 2. List of 40 Simple Random Samples
- 1st 2nd 3rd
- ID ID ID
- sample Sel. Sel. Sel.
- 1 5 6 6
- 2 3 3 6
- 3 2 2 3
- 4 6 3 1
- 5 3 3 3 Subject 3
selected each time - 6 1 1 4
- 7 6 5 5
- 8 4 6 4
- 9 4 3 6
- 10 1 6 5
- 11 5 4 4
- 12 1 6 5
- 13 4 2 3
62c. (a54p10.sas).
- Do any samples occur where the same patient was
selected on each of the selections? (Add these
statements to tabulate distinct samples) - DATA d1
- SET d
- snum100sid110sid2sid3
- RUN
- PROC PRINT DATAd1 NOOBS SPLIT""
- VAR sample snum sid1-sid3
- TITLE2 "Table 2a. List of nsamp Simple Random
Samples " - RUN
- PROC FREQ DATAd1
- TABLES snum
- TITLE2 "Table 2b. Subjects in nsamp Samples
with replacement" - RUN
72c. (a54p10.sas).
- Table 2b. Subjects in 40 Samples with
replacement - The FREQ Procedure
- Cumulative
Cumulative - snum Frequency Percent Frequency
Percent - ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒ - 114 1 2.50 1
2.50 - 121 1 2.50 2
5.00 - 143 1 2.50 3
7.50 - 165 3 7.50 6
15.00 - 166 1 2.50 7
17.50 - 213 1 2.50 8
20.00 - 215 1 2.50 9
22.50 - 223 2 5.00 11
27.50 - 231 1 2.50 12
30.00 - 232 1 2.50 13
32.50 - 233 1 2.50 14
35.00 - 236 1 2.50 15
37.50
8Assignment SRSWR
- 2c. (a54p10.sas). What is the chance
(probability) that the same patient was selected
on each of the selections?
of samples
of samples with same selection 111, 222, 333,
444, 555, 666
9Assignment SRSWR
- 2c. (a54p10.sas). Is the number of times that
the same subject was selected each time equal to
what you would expect?
of samples expected
No- we observed 3, and only expected 1.11
samples. This may be because we only took 40
samples.
10Question 3 SRSWR
- a. If we count samples as different if either
the subjects included are different or if the
order of selection of subjects is different, how
many different possible sample could we select?
Note that N6, n3
N
N
N
Sample ______ _______
______ Position 1 Position 2
Position 3
This counts the samples as different for all
subjects selected in all orders.
113b. How many times would you expect that each
sample would occur if 4320 samples were selected?
Question 3 SRSWR
12Question 3 SRSWR
- g. Suppose that three different subjects are
selected. In how many different orders can 3
different subjects be selected (this is the
number of permutations).
ID1, ID2, ID3
n-2
n-1
n
Sample ______ _______
______ Position 1 Position 2
Position 3
13When Sampling Without Replacement3a. If we
count samples as different if either the subjects
included are different, or if the order of
selection of subjects is different, how many
different possible samples could we select?
N-2
N-1
N
Sample ______ _______
______ Position 1 Position 2
Position 3
14When Sampling Without Replacement3b. How many
times would you expect that each sample would
occur if 4320 samples were selected?
15When Sampling Without Replacement3b. In how
many different orders can the same three subjects
be selected? (This is the number of
permutations.)