﻿ Review of Probability in Advanced Statistics I

# Assignments

Assignments are submitted on blackboard.  They are graded as pass/fail.  A summary 1-page word document should be included.  In the summary, you should state if you were able to get the same answers as those provided. Your R, STATA, or Python code should be included in separate files. No late assignments are accepted.  It is OK to help each other in doing the assignments but not OK to copy and paste work of others.  It is OK to use ChatGPT or other large language models to generate the R code, but you must be transparent about it and report its use.

Question 1: Surviving another day with no falls.  For cases and controls, separately calculate the conditional probability of falling given that you have not fallen in the previous days.  Blanks indicate patients who have not fallen in the 9 days examined.

 ID for Cases Days to fall ID for Controls Days to Fall 1 5 4 2 5 4 3 9 6 5 7

You can do this by counting number at risk, number with 1st fall, and number with no falls for each of the 9 time periods.  Note that the number at risk for current time period is the number at risk in previous time period minus number who had their first fall in previous time period.

Question 2:  The following data show caloric intake and blood pressure levels. Assume that caloric intake up to 2500 is normal, and above this is over indulgence.  Assume systolic blood pressure above 130 is Hypertensive and otherwise non-hypertensive.  (1) Do a chi-squared test to see if caloric intake affects systolic blood pressure (see page 69 to 73). (2) Create a box plot for caloric intake of hypertensive and another box plot for caloric intake of non-hypertensive.

Question 3: The following data show adverse outcomes in cases and controls.  (See page 373 to 376 in the required textbook).  Report the odds of adverse outcomes and the standard deviation of the odds.  Plot percent of patients with adverse outcome for controls (before intervention) and cases (after intervention).