Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Even though logistic regression is formulated with continuous input data in mind, one can also try to apply it to categorical i...Question
                Even though logistic regression is formulated with continuous input data in mind, one can also try to apply it to categorical inputs. For example, consider the following set-up: We observe \, n \, samples \, Y_ i \in \{ 0, 1\} \,, \, i = 1, \dots , n \,, and covariates \, X_ i \in \{ 0, 1\} \,, \, i = 1, \dots , n \,. Moreover, assume that given \, X_ i \,, the \, Y_ i \, are independent.
First, let us apply regular maximum likelihood estimation. To this end, write
\displaystyle f_{00} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 0 \text { and } Y_ i = 0 \}
\displaystyle f_{01} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 0 \text { and } Y_ i = 1 \}
\displaystyle f_{10} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 1 \text { and } Y_ i = 0 \}
\displaystyle f_{11} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 1 \text { and } Y_ i = 1 \}
and assume that \, f_{00}, f_{01}, f_{10}, f_{11} > 0 \,. We can parametrize this model in terms of
\displaystyle p_{01} = {} \displaystyle P(Y_ i = 1 | X_ i = 0)
\displaystyle p_{11} = {} \displaystyle P(Y_ i = 1 | X_ i = 1)
Compute the maximum likelihood estimators \, \widehat{p}_{01} \, and \, \widehat{p}_{11} \, for \, p_{01} \, and \, p_{11} \,, respectively. Express your answer in terms of f_{00} (enter “A"), f_{01} (enter “B"), f_{10} (enter “C"), f_{11} (enter “D") and n.
\widehat{p}_{01}
B/(A+B)
correct
 
\widehat{p}_{11}
D/(C+D)
correct
 
SaveSave your answer
Submit
You have used 2 of 3 attemptsSome problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
(b)
2 points possible (graded)
Although the \, X_ i \, are discrete, we can also use a logistic regression model to analyze the data. That is, now we assume
Y_ i | X_ i \sim \textsf{Ber}\left( \frac{1}{1 + \mathbf e^{-(X_ i \beta _1 + \beta _0})} \right),
 
for \, \beta _0, \beta _1 \in \mathbb {R} \,, and that given \, X_ i \,, the \, Y_ i \, are independent.
Calculate the maximum likelihood estimator \, \widehat{\beta }_0 \,, \, \widehat{\beta }_1 \, for \, \beta _0 \, and \, \beta _1 \,, where we again assume that all \, f_{kl} > 0 \,. Express your answer in terms of f_{00} (enter “A"), f_{01} (enter “B"), f_{10} (enter “C"), f_{11} (enter “D") and n.
\widehat{\beta }_{0}
unanswered
 
\widehat{\beta }_{1}
unanswered
 
SaveSave your answer
Submit
You have used 0 of 3 attemptsSome problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
(c)
0/2 points (graded)
Given the maximum likelihood estimators \, \widehat{\beta }_0 \,, \, \widehat{\beta }_1 \,, what are the associated predicted probabilities
\displaystyle \widetilde{p_{01}} = {} \displaystyle P(Y_ i = 1 | X_ i = 0, \widehat{\beta }_0, \widehat{\beta }_1)
\displaystyle \widetilde{p_{11}} = {} \displaystyle P(Y_ i = 1 | X_ i = 1, \widehat{\beta }_0, \widehat{\beta }_1)
in terms of f_{kl}, for k, l \in \{ 0, 1\}?
Express your answer in terms of f_{00} (enter “A"), f_{01} (enter “B"), f_{10} (enter “C"), f_{11} (enter “D") and n.
\widetilde{p_{01}}
1/A
incorrect
 
\widetilde{p_{11}}
            
        First, let us apply regular maximum likelihood estimation. To this end, write
\displaystyle f_{00} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 0 \text { and } Y_ i = 0 \}
\displaystyle f_{01} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 0 \text { and } Y_ i = 1 \}
\displaystyle f_{10} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 1 \text { and } Y_ i = 0 \}
\displaystyle f_{11} = {} \displaystyle \frac{1}{n} \# \{ i : X_ i = 1 \text { and } Y_ i = 1 \}
and assume that \, f_{00}, f_{01}, f_{10}, f_{11} > 0 \,. We can parametrize this model in terms of
\displaystyle p_{01} = {} \displaystyle P(Y_ i = 1 | X_ i = 0)
\displaystyle p_{11} = {} \displaystyle P(Y_ i = 1 | X_ i = 1)
Compute the maximum likelihood estimators \, \widehat{p}_{01} \, and \, \widehat{p}_{11} \, for \, p_{01} \, and \, p_{11} \,, respectively. Express your answer in terms of f_{00} (enter “A"), f_{01} (enter “B"), f_{10} (enter “C"), f_{11} (enter “D") and n.
\widehat{p}_{01}
B/(A+B)
correct
\widehat{p}_{11}
D/(C+D)
correct
SaveSave your answer
Submit
You have used 2 of 3 attemptsSome problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
(b)
2 points possible (graded)
Although the \, X_ i \, are discrete, we can also use a logistic regression model to analyze the data. That is, now we assume
Y_ i | X_ i \sim \textsf{Ber}\left( \frac{1}{1 + \mathbf e^{-(X_ i \beta _1 + \beta _0})} \right),
for \, \beta _0, \beta _1 \in \mathbb {R} \,, and that given \, X_ i \,, the \, Y_ i \, are independent.
Calculate the maximum likelihood estimator \, \widehat{\beta }_0 \,, \, \widehat{\beta }_1 \, for \, \beta _0 \, and \, \beta _1 \,, where we again assume that all \, f_{kl} > 0 \,. Express your answer in terms of f_{00} (enter “A"), f_{01} (enter “B"), f_{10} (enter “C"), f_{11} (enter “D") and n.
\widehat{\beta }_{0}
unanswered
\widehat{\beta }_{1}
unanswered
SaveSave your answer
Submit
You have used 0 of 3 attemptsSome problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
(c)
0/2 points (graded)
Given the maximum likelihood estimators \, \widehat{\beta }_0 \,, \, \widehat{\beta }_1 \,, what are the associated predicted probabilities
\displaystyle \widetilde{p_{01}} = {} \displaystyle P(Y_ i = 1 | X_ i = 0, \widehat{\beta }_0, \widehat{\beta }_1)
\displaystyle \widetilde{p_{11}} = {} \displaystyle P(Y_ i = 1 | X_ i = 1, \widehat{\beta }_0, \widehat{\beta }_1)
in terms of f_{kl}, for k, l \in \{ 0, 1\}?
Express your answer in terms of f_{00} (enter “A"), f_{01} (enter “B"), f_{10} (enter “C"), f_{11} (enter “D") and n.
\widetilde{p_{01}}
1/A
incorrect
\widetilde{p_{11}}
Answers
                                                    There are no human answers yet.
                                            
                
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.