2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

20
2014.3.26 1 Medical Medical Statistics Statistics Tao Tao Yuchun Yuchun Practice 3 Practice 3 http://cc.jlu.edu.cn/m s.html

Transcript of 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

Page 1: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.261

Medical StatisticsMedical Statistics

Tao YuchunTao Yuchun

Practice 3Practice 3

http://cc.jlu.edu.cn/ms.html

Page 2: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.262

Review Review

1.1. Comparing to a given population mean

(One-sample One-sample tt test test)

I.I. tt test test

•The formula of the test statistic for one-sample The formula of the test statistic for one-sample tt test is: test is:

)(~ t

n

SX

S

Xt

X

1n

• here μ is a given population mean.

Page 3: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.263

2.2. Comparison for Paired Data

(Paired-Samples Paired-Samples tt test test)

• The formula of the test statistic for The formula of the test statistic for paired-samples -samples

tt test is: test is:

)(~00 t

n

Sd

S

dt

dd

1n

• here and Sd refer to the mean and SD of the variable “difference”.d

Page 4: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.264

3.3. Comparison between two sample

means (Independent-Samples Independent-Samples tt test test)

•The formula of the test statistic for independent-sampleThe formula of the test statistic for independent-sample

tt test is: test is:

2

)1()1(

21

222

2112

nn

SnSnSc

2

)()(

21

1

222

1

211

21

nn

XXXXn

ii

n

ii

)11

(21

2

2121

21

nnS

XX

S

XXt

cXX

• here Sc2

is pooled estimation of sample variance.

Page 5: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.265

II. II. ZZ test test

1.1. Comparing to a given population mean

for a bigbig sample (One-sample One-sample ZZ test test)

•The formula of the test statistic for one-sample The formula of the test statistic for one-sample ZZ test test is:is:

)1,0(~ N

n

SX

Z

• bigbig means sample size means sample size nn ≥ 50 or 100. ≥ 50 or 100.

Page 6: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.266

2.2. Comparison between two bigbig sample

means (Two-Samples Two-Samples ZZ test test)

•The formula of the test statistic for two-samples The formula of the test statistic for two-samples ZZ test test

is:is:

2

22

1

21

21

22

2121

2121

nS

nS

XX

SS

XX

S

XXZ

XXXX

• bigbig means two sample size all means two sample size all nn ≥ 50 or ≥ 50 or 100.100.

Page 7: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.267

III. III. Statistical description for enumerationStatistical description for enumeration

datadata

1.1. Relative measures

• Absolute measureAbsolute measure

• Relative measures :Relative measures :

(1)(1) Frequency(proportion)

(2) (2) Intensity (Rate)

(3) (3) Ratio

Page 8: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.268

2.2. Standardization for crude frequency

or crude intensity

• direct standardization approachdirect standardization approach• indirect standardization approachindirect standardization approach

IV. IV. Statistical Inference for enumerationStatistical Inference for enumeration

datadata

1.1. Sampling error of frequency

n

XP

n

ppSP

)1(

Page 9: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.269

2.2. Confidence Interval of Probability

95% Confidence interval:

99% Confidence interval:

n

ppp

)1(96.1:

n

ppp

)1(58.2:

• required the sample size required the sample size nn is big enough. is big enough.

Page 10: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2610

3.3. The hypothesis testing of proportion

(Z test)

(1)(1) Comparison of sample proportion and Comparison of sample proportion and population proportion ( One-sample population proportion ( One-sample ZZ test) test)

0100 :: HH

n

pZ

)1( 00

0

If |Z|≥Zα , then reject H0 ; Otherwise,

no reason to reject H0 (accept H0 ).

• π0 is a constant.

Page 11: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2611

(2)(2) Comparison of two sample proportions Comparison of two sample proportions

( Two-samples ( Two-samples ZZ test) test)

211210 :: HH

21

21

ppS

ppZ

)11

)(1(21

21 nnppS ccpp

21

21

nn

XXpc

Page 12: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2612

np np > 5 and > 5 and nn((1-p1-p)) >5>5

•The normal approximation condition

4.4. The hypothesis testing of proportion

(Chi-square test)

(1)(1) Basic idea of Basic idea of χχ22 test test

• the actual frequency ---- the actual frequency ---- AA • the theoretical frequency ---- the theoretical frequency ---- TT

n

nnT CRRC totalRow :Rn alColumn tot :Cn

Page 13: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2613

(2)(2) Chi-square test for 2×2 tableChi-square test for 2×2 table

T

TA 22 )(

= (row-1)(column-1)

a b a+bc d c+da+c b+d n

dbcadcba

nbcad

2

2

a.a. If n≥40, andand everyevery Ti ≥5, 2 test is applicable;

b.b. If n < 40 oror Ti < 1, 2 test is not applicable, you should use

Fisher’s Exact TestFisher’s Exact Test;

c.c. If n≥40, andand only oneonly one 1≤Ti < 5, 2 test needs adjustment.

Page 14: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2614

• The correction formula of 2 test for 222 table2 table :

T

TA2

2 5.0

dbcadcba

nn

bcad

2

2 2

(3)(3) Chi-square test for R×C tableChi-square test for R×C table

1

22

CR nn

An

totalRow :Rn alColumn tot :Cn

Page 15: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2615

Excel’s statistical method Excel’s statistical method • You can use Excel’s statistical function

CHIINV(Probability,Deg_freedom) CHIINV(Probability,Deg_freedom) to get

χ2α,ν , here Probability is α , Deg_freedom

is ν (degree of freedom). • You can use Excel’s statistical function

CHITEST(range1,range2) CHITEST(range1,range2) to get the P-value

of χ2 test, here range1 is the range of all actual

frequencies, range2 is the range of all

theoretical frequencies.

Page 16: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2616

•See the example (stat1.xls updatedupdated)

• You can use the macro for t-tests of statistical

analysis tools to get Paired-Samples t Test and

Two-Samples t Test directly.

Page 17: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2617

Practice in class Practice in class Exercise 1Exercise 1: The weights (kg) of 12 volunteers were

measured before and after a course of treatment with

a “new drug” for losing weight. The data is given in

Table 3-1. Please evaluate the effectiveness of this

drug.

No. 1 2 3 4 5 6 7 8 9 10 11 12Pre-treatment 101 131 131 143 124 137 126 95 90 67 84 101Post-treatment 100 136 126 150 128 126 116 105 87 57 74 109

Table 3-1 The data observed in a study of weight losing

Page 18: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2618

Exercise 2Exercise 2: A physician made a survey of the

roundworm infection of a rural region. There were

60 infected among the 300 randomly sampled males,

and 30 infected among the 200 females. Did females

have lower infection rate than males?

Answer Answer

•See the Excel file (practice3key.xls)

Page 19: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2619

HomeworkHomework 1.1. Dr. L wants to evaluate one remedy, so she randomly chose 10 patients, and recorded the blood sedimentation rate (mm/h) of each patient before and after the treatment. The data is given in Table 3-2. Please evaluate the effectiveness of this remedy.

No. 1 2 3 4 5 6 7 8 9 10

before 10 13 6 11 10 7 8 8 5 9after 6 9 3 10 10 4 2 5 3 3

Tabl e 3- 2 The data observed i n a study of the remedy

Page 20: 2014.3.26 1 Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun Practice 3 .

2014.3.2620

CC

2.2. A test is used for examination of two groups of children

randomly selected from Urban and Rural areas of a city

respectively. The results are listed in table3-3. Are the

positive rates of two groups of children are significantly

different ?

group positive positive rate(%)

Urban 58 18 31.0

Rural 147 26 17.7

total

table3-3 The positive rates of a test for two groups of children