Top Banner
BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems
41

BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Dec 16, 2015

Download

Documents

Ethan Patterson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Practice Problems

BINF 702 Practice Problems

Page 2: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem # 1

BINF 702 Spring 2014 Practice Problems

Page 3: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 1 Flow Chart Analysis Only one variable of interest? Yes One sample problem? No (Go to 1) Two-sample problem? Yes

Page 4: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 1 Flowchart Analysis Underlying distribution normal or can the

central-limit theorem be assumed to hold?? No Underlying distribution is

binomial? Yes Are samples independent? Yes

Page 5: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem # 1 Flowchart Analysis Are all expected values greater than or

equal to 5? Yes (go to 6) 2 x 2 contingency table? Yes (go to A) Use two-sample test for binomial

proportion, or 2 x 2 contingency table methods if no confounding is present, or the Mantel-Haenszel test if confounding is present.BINF 702 Spring 2014

Practice Problems

Page 6: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem #1 Solution

BINF 702 Spring 2014 Practice Problems

Page 7: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 1 Solution in R> prop.test(xx)

2-sample test for equality of proportions with continuity correction

data: xx X-squared = 5.6489, df = 1, p-value = 0.01747alternative hypothesis: two.sided 95 percent confidence interval: -0.38358985 -0.08699838 sample estimates: prop 1 prop 2 0.1000000 0.3352941

Page 8: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem # 2

BINF 702 Spring 2014 Practice Problems

Page 9: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 2 Flow Chart Analysis Only one variable of interest? Yes One sample problem? No (Go to 1) Two-sample problem? Yes

Page 10: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 2 Flowchart Analysis Underlying distribution normal or can the central-limit

theorem be assumed to hold??

No Underlying distribution is

binomial? Yes Are samples independent? Yes

Page 11: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem # 2 Flowchart Analysis Are all expected values greater than or

equal to 5? Yes (go to 6) 2 x 2 contingency table? No (go to A) 2 x k contingency table?

Yes (go to B)

BINF 702 Spring 2014 Practice Problems

Page 12: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 2 Flowchart Analysis Interested in trend over k binomial

proportions? Yes

Use chi-square test for trend, if n confounding is present, or the mantel Extension test if confounding is present.

Page 13: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem # 2 Solution

BINF 702 Spring 2014 Practice Problems

Page 14: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem #2 in R> library(stats)> prop.trend.test(x = c(3,7,8,12), n = c(60,50,50,40))

Chi-squared Test for Trend in Proportions

data: c(3, 7, 8, 12) out of c(60, 50, 50, 40) ,

using scores: 1 2 3 4 X-squared = 10.9341, df = 1, p-value = 0.0009441

Page 15: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 3

Page 16: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 3 Flow Chart Analysis Only one variable of interest? Yes One sample problem? No (Go to 1) Two-sample problem? Yes

Page 17: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 3 Flowchart Analysis Underlying distribution normal or can the

central-limit theorem be assumed to hold?? Yes Inference concerning means? Yes (go to 3) Are samples independent? Yes

Page 18: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 3 Flowchart Analysis Are variances of two samples significantly

different? (Note – Should be tested using the F test)

No

Use two-sample t test with equal variances.

Page 19: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 3 Solution

Page 20: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 3 Solution in R

> pt(q=8.94,df = 2198, lower.tail=FALSE)[1] 4.026324e-19

Page 21: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 4

Page 22: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 4 Solution

Page 23: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 5a

Page 24: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 5b

Page 25: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 5c

Page 26: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem #5c in R

> 2 * pt(q=2.73, df = 19, lower.tail=FALSE)

[1] 0.01329876

Page 27: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem #6

Page 28: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem #6a

> 2 * pf(q=2.08, df1 = 24, df2 = 40,lower.tail=FALSE)[1] 0.03939543

Page 29: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem #6b

Page 30: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 6 Flow Chart Analysis Only one variable of interest? Yes One sample problem? No (Go to 1) Two-sample problem? Yes

Page 31: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 6 Flowchart Analysis Underlying distribution normal or can the

central-limit theorem be assumed to hold?? Yes Inference concerning means? Yes (go to 3) Are samples independent? Yes

Page 32: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 6 Flowchart Analysis Are variances of two samples significantly

different? (Note – Should be tested using the F test)

Yes

Use two-sample t test with unequal variances.

Page 33: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem #6c

Perform the test and report a p-value.> 2 * pt(q=5.34, df = 99,lower.tail=FALSE)[1] 5.929004e-07

BINF 702 Spring 2014 Practice Problems

Page 34: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem # 7

BINF 702 Spring 2014 Practice Problems

Page 35: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 7a

Page 36: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 7b

Page 37: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 7c

Which hypothesis test is appropriate here?

Page 38: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 7 Flow Chart Analysis Only one variable of interest? Yes One sample problem? No (Go to 1) Two-sample problem? Yes

Page 39: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

Problem # 7 Flowchart Analysis Underlying distribution normal or can the

central-limit theorem be assumed to hold?? Yes Inference concerning means? Yes (go to 3) Are samples independent? No Use paired t test.

BINF 702 Spring 2014 Practice Problems

Page 40: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 7d

Conduct the hypothesis test and report a p-value.

Page 41: BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.

BINF 702 Spring 2014 Practice Problems

Problem # 7d in Rx = c(142, 100, 112, 92, 104, 100, 108, 94, 104, 98)

y = c(154, 106, 110, 100, 112, 100, 120, 90, 104, 114)t.test(x=x, y = y, paired=TRUE) Paired t-test

data: x and y t = -2.6098, df = 9, p-value = 0.02828alternative hypothesis: true difference in means is not

equal to 0 95 percent confidence interval: -10.4541299 -0.7458701 sample estimates:mean of the differences -5.6