Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignmnet: Simple Random Sampling With Replacement Some Solutions.

Similar presentations


Presentation on theme: "Assignmnet: Simple Random Sampling With Replacement Some Solutions."— Presentation transcript:

1 Assignmnet: Simple Random Sampling With Replacement Some Solutions

2 Question 2: SRSWR a. What is the formula to estimate the sample variance

3 Question 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 N=6, n=3 Sample ______ _______ ______ Position 1 Position 2 Position 3 NNN

4 Question 3: SRSWR g. In how many different orders can 3 different subjects be selected (this is the number of permutations). ID=1, ID=2, ID=3 Sample ______ _______ ______ Position 1 Position 2 Position 3 n-2n-1n

5 Question 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.

6 2c. (a54p10.sas). Do any samples occur where the same patient was selected on each of the selections? PROC PRINT DATA=d NOOBS SPLIT="*"; VAR sample sid1-sid3 ; TITLE2 "Table 2. List of &nsamp Simple Random Samples "; RUN;

7 2c. (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 14 4 6 6 etc

8 2c. (a54p10.sas). Do any samples occur where the same patient was selected on each of the selections?- –DATA d1; – SET d; – snum=100*sid1+10*sid2+sid3; –RUN; –PROC PRINT DATA=d1 NOOBS SPLIT="*"; – VAR sample snum sid1-sid3 ; – TITLE2 "Table 2a. List of &nsamp Simple Random Samples "; – RUN; –PROC FREQ DATA=d1; – TABLES snum; – TITLE2 "Table 2b. Subjects in &nsamp Samples with replacement"; – RUN;

9 2c. (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 312 1 2.50 16 40.00 324 1 2.50 17 42.50 333 3 7.50 20 50.00 The three sselections are subject 3 336 1 2.50 21 52.50

10 Assignment: 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

11 Assignment: 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.

12 3a. 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=6, n=3 Sample ______ _______ ______ Position 1 Position 2 Position 3 N-2N-1N

13 3b. How many times would you expect that each sample would occur if 4320 samples were selected?

14 3b. In how many different orders can the same three subjects be selected? (This is the number of permutations.)


Download ppt "Assignmnet: Simple Random Sampling With Replacement Some Solutions."

Similar presentations


Ads by Google