--- title: "Math 150 - Methods in Biostatistics - Homework 8" author: "your name here" date: "Due: Wednesday, March 27, 2019, in class" output: pdf_document --- ```{r global_options, include=TRUE, message=FALSE, warning=FALSE, echo=FALSE} knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.height=4, fig.width=5, fig.align = "center") library(tidyverse) library(broom) library(tidylog) ``` ### 1. Chp 9, A2 For the chip melting study, describe the event of interest, the time-to-event random variable T, the beginning of time, and the scale for measuring time. ### 2. Chp 9, A4 Use equation (9.1) and the 7 milk chocolate melting times in Table 9.1 to compute $\hat{S}(25)_E$, $\hat{S}(30)_E$, $\hat{S}(40)_E$, and $\hat{S}(60)_E$. ### 3. Chp 9, A5 With the melting times provided in Table 9.2, use the following two approaches to calculate the estimated probability that it takes more than 45 seconds for a chocolate chip to melt, based on the empirical survival function $\hat{S}(45)_E$. a. Treat all the censored times as complete (actual observed) times, and use Equation (9.1) to calculate $\hat{S}(45)_E$. b. Eliminate all censored observations, and then use Equation (9.1) and the remaining complete observations to calculate $\hat{S}(45)_E$. ### 4. Chp 9, A6 Consider the chocolate chip melting time data in Table 9.2. What is $m$? List $t_1$ through $t_m$ for the chip melting times. ### 5. Chp 9, A7 The first two intervals for the chocolate chip melting times are [0,25) and [25, 30). Write out the remaining intervals. Notice that any incomplete times, such as 30+ and 35+, are ignored in creating intervals. (Apropos of nothing, I find the following website to be very helpful in making markdown tables: https://www.tablesgenerator.com/markdown_tables) ### 6. Chp 9, A8 Determine $d_i$, the number of melted chips in each interval, and $n_i$, the number of chips at risk of melting in each interval (all chips with complete or censored times that have not yet occurred), for $i=0,1,2,3,4$. ### 7. Chp 9, A9 What is the value of $\hat{p}_0$? Interpret the value. ### 8. Chp 9, A10 $\hat{p}_1$ is the estimate of the conditional probability that a chip will melt between the 25th second and the 30th second, given that it has remained unmelted through the 25th second. Show that about 14% of the chips that have not melted just prior to the 25th second will melt between the 25th and the 30th second. ### 9. Chp 9, A11 Calculate the remaining estimated conditional probabilities $\hat{p}_3$ and $\hat{p}_4$. Place these values in the appropriate cells in Table 9.3 and interpret the values. ### 10. Chp 9, A12 Calculate the remaining estimated conditional probabilities $1- \hat{p}_3$ and $1-\hat{p}_4$. Place these values in the appropriate cells in Table 9.3 and interpret the values. ### 11. Chp 9, A13 Use the remaining chocolate chip melting times to complete Table 9.3. ### 12. Chp 9, A14 What is the estimate for $S(45)$ in Table 9.3? That is, what proportion of chips in the sample has not melted after 45 seconds? ### 13. Chp 9, A15 Use the entries in Table 9.3 to estimate the proportion of chips that have melted by 35 seconds. ### 14. Chp 9, A16 Use the entries in Table 9.3 to estimate the proportion of chips that have not melted after 50 seconds. ### 15. Chp 10, A17 Assume that no censoring is present in the melting times (see the entries in Table 9.1). Estimate $S(25)$, $S(30)$, $S(45)$, and $S(55)$ using both the empirical survival function and the Kaplan-Meier estimator, and compare your answers. What do your answers suggest about the Kaplan-Meier estimator when no censoring is present?