Truly Understanding Logistic Regression
← Question BankSign in to bookmark Sign in to bookmark Sign in to bookmark Sign in to bookmark
Machine Learning
Linear Methods For Classification
Interview questions on Linear Methods For Classification.
5 questions
All subtopicsGeneral ConceptsOdds and Log-oddsThe SigmoidTruly Understanding Logistic RegressionThe Logit Function and Entropy
Sign in to bookmark
Truly Understanding Logistic Regression
Q2. Consider a system for radiation therapy planning (Fig. 2.3). Given a patient with a malignant tumour, the problem is to select the optimal radiation exposure time for that patient. A key element in this problem is estimating the probability that a given tumour will be eradicated given certain covariates. A data scientist collects information relating to this radiation therapy system. <table align='center'> <tr> <td align="center"> <img src="img/lr-3.png" alt="A multi-detector positron scanner used to locate tumors"style="max-width:70%;" /> </td> </tr> <tr> <td align="center">A multi-detector positron scanner used to locate tumors</td> </tr> </table> The following covariates are collected; $X_1$ denotes time in milliseconds that a patient is irradiated with, $X_2$= holds the size of the tumour in centimeters, and$ Y $notates a binary response variable indicating if the tumour was eradicated. Assume that each response’ variable$ Y_i $is a Bernoulli random variable with success parameter$ p_i$, which holds:$$
p_i = \frac{e^{\beta_0+\beta_1x_1+\beta_2x_2}}{1+e^{\beta_0+\beta_1x_1+\beta_2x_2}} \hat{\beta_{0}} = -6 \ \hat{\beta_{1}}= 0.05\ \hat{\beta_{2}} = 1 $$1. Estimate the probability that, given a patient who undergoes the treatment for and who is presented with a tumour sized , the system eradicates the tumour. 2. How many milliseconds the patient in part (a) would need to be radiated with to have exactly a chance of eradicating the tumour?
Truly Understanding Logistic Regression
Q3. Recent research suggests that heating mercury containing dental amalgams may cause the release of toxic mercury fumes into the human airways. It is also presumed that drinking hot coffee, stimulates the release of mercury vapour from amalgam fillings. <table align='center'> <tr> <td align="center"> <img src="img/lr-4.png" alt="A multi-detector positron scanner used to locate tumors"style="max-width:70%;" /> </td> </tr> <tr> <td align="center"> A dental amalgam </td> </tr> </table> To study factors that affect migraines, and in particular, patients who have at least four dental amalgams in their mouth, a data scientist collects data from $200K$ users with and without dental amalgams. The data scientist then fits a logistic regression model with an indicator of a second migraine within a time frame of one hour after the onset of the first migraine, as the binary response variable (e.g., migraine=1, no migraine=0). The data scientist believes that the frequency of migraines may be related to the release of toxic mercury fumes. There are two independent variables: 1. $X_1 = 1$ if the patient has at least four amalgams; $0$ otherwise. 2. $X_2$ = coffee consumption (0 to 100 hot cups per month). The output from training a logistic regression classifier is as follows: <table align='center'> <tr> <td align="center"> <img src="img/lr-5.png" alt= "A dental amalgam" style="max-width:70%;" /> </td> </tr> <tr> <td align="center"> A dental amalgam </td> </tr> </table> 1. Using $X_1$ and $X_2$, express the odds of a patient having a migraine for a second time. 2. Calculate the probability of a second migraine for a patient that has at least four amalgams and drank 100 cups per month? 3. For users that have at least four amalgams, is high coffee intake associated with an increased probability of a second migraine? 4. Is there statistical evidence that having more than four amalgams is directly associated with a reduction in the probability of a second migraine?
Truly Understanding Logistic Regression
Q4. To study factors that affect Alzheimer’s disease using logistic regression, a researcher considers the link between gum (periodontal) disease and Alzheimer as a plausible risk factor. The predictor variable is a count of gum bacteria (Fig. 2.5) in the mouth. <table align='center'> <tr> <td align="center"> <img src="img/lr-7.png" alt= "A chain of spherical bacteria." style="max-width:70%;" /> </td> </tr> <tr> <td align="center"> A chain of spherical bacteria. </td> </tr> </table> The response variable, Y , measures whether the patient shows any remission (e.g. yes=1). The output from training a logistic regression classifier is as follows: <table align='center'> <tr> <td align="center"> <img src="img/lr-8.png" alt= " output from training a logistic regression classifier" style="max-width:70%;" /> </td> </tr> <tr> <td align="center"> output from training a logistic regression classifier </td> </tr> </table> 1. Estimate the probability of improvement when the count of gum bacteria of a patient is 33. 2. Find out the gum bacteria count at which the estimated probability of improvement is 0.5. 3. Find out the estimated odds ratio of improvement for an increase of 1 in the total gum bacteria count. 4. Obtain a 99% confidence interval for the true odds ratio of improvement increase of 1 in the total gum bacteria count. Remember that the most common confidence levels are 90%, 95%, 99%, and 99.9%. Table 9.1 lists the z values for these levels. <table align='center'> <tr> <td align="center"> <img src="img/lr-9.png" alt= "Common confidence levels" style="max-width:70%;" /> </td> </tr> <tr> <td align="center"> Common confidence levels </td> </tr> </table>
Truly Understanding Logistic Regression