\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{amsmath, amsfonts}
\usepackage{hyperref, graphicx}

\title{CSCI 145 Problem 10: When One Threshold Is Not Enough}
\author{} % TODO: Put your name here
\date{\today}

\begin{document}

\maketitle

\subsection*{Submission Instructions}

Please upload your work to Gradescope by \textbf{11:59pm on DATE}. % TODO: date
\begin{itemize}
\item Turn in a single PDF of \textit{handwritten} solutions. Typed (including \LaTeX) solutions will not be accepted.
\item Problems are grouped into three-week \textbf{cycles}. Once per cycle, you will meet with the grader and present the solution to \emph{one} problem from that cycle, selected at random when you arrive --- so bring your work and be ready to explain any of them.
\end{itemize}

\newpage \section*{Problem 10: When One Threshold Is Not Enough \hfill \textnormal{2 points}}

A scalar measurement $X$ comes from one of two equally likely classes. The class-conditional distributions are
$$
X\mid Y=0\sim\mathcal{N}(0,1),
\qquad
X\mid Y=1\sim\mathcal{N}(0,4).
$$
A researcher proposes fitting ordinary one-feature logistic regression, $\Pr(Y=1\mid X=x)=\sigma(wx+b)$, and argues that the sigmoid can represent the Bayes-optimal probability because it maps every real score into $(0,1)$.

Audit the claim. Derive the exact posterior probability from Bayes' rule and express it as a sigmoid of a score. Characterize the region in which the Bayes classifier predicts class $1$, prove that no choice of $w$ and $b$ in the proposed model has the same decision region, and give the smallest natural feature map that makes logistic regression represent the exact posterior. Explain what this example says about the roles of the sigmoid and the features in determining a classifier's decision boundary.

\paragraph{Results you may use.}
You may quote the Gaussian density and the posterior-odds identity
$$
\frac{\Pr(Y=1\mid X=x)}{\Pr(Y=0\mid X=x)}
=\frac{\Pr(Y=1)}{\Pr(Y=0)}
\frac{p(x\mid Y=1)}{p(x\mid Y=0)}.
$$
If $z=\log(p/(1-p))$, then $p=\sigma(z)=1/(1+e^{-z})$.

%\input{solutions/solution10}

\end{document}
