- 80 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' Assignmnet: Simple Random Sampling With Replacement' - galvin-hoffman

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

### Assignmnet: Simple Random Sampling With Replacement

Some Solutions

Question 2: SRSWR

- a. What is the formula to estimate the sample variance

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.

2c. (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)

PROCPRINT DATA=d NOOBS SPLIT="*";

VAR sample sid1-sid3 ;

TITLE2 "Table 2. List of &nsamp Simple Random Samples ";

RUN;

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

2c. (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;
- snum=100*sid1+10*sid2+sid3;
- RUN;
- PROCPRINT DATA=d1 NOOBS SPLIT="*";
- VAR sample snum sid1-sid3 ;
- TITLE2 "Table 2a. List of &nsamp Simple Random Samples ";
- RUN;
- PROCFREQ DATA=d1;
- TABLES snum;
- TITLE2 "Table 2b. Subjects in &nsamp Samples with replacement";
- RUN;

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 selections are subject 3

336 1 2.50 21 52.50

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

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.

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

N

N

N

Sample ______ _______ ______

Position 1 Position 2 Position 3

This counts the samples as different for all subjects selected in all orders.

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

Question 3: SRSWR

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

ID=1, ID=2, ID=3

n

n-1

n-2

Sample ______ _______ ______

Position 1 Position 2 Position 3

When Sampling Without Replacement: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

N

N-1

N-2

Sample ______ _______ ______

Position 1 Position 2 Position 3

When Sampling Without Replacement:3b. How many times would you expect that each sample would occur if 4320 samples were selected?

When Sampling Without Replacement:3b. In how many different orders can the same three subjects be selected? (This is the number of permutations.)

Download Presentation

Connecting to Server..