% This is a simple LaTex sample document that gives a submission format
%   for IEEE PAMI-TC conference submissions.  Use at your own risk.

% Make two column format for LaTex 2e.
\documentclass[12pt,twocolumn]{article} %,twocolumn
\usepackage[dvips]{graphicx,graphics}
%\usepackage{times,amsmath,amsfonts}

% Use following instead for LaTex 2.09 (may need some other mods as well).
% \documentstyle[times,twocolumn]{article}

% Set dimensions of columns, gap between columns, and paragraph indent
\setlength{\textheight}{9.2in} \setlength{\textwidth}{6.875in}
%\setlength{\columnsep}{0.3125in} \setlength{\topmargin}{0in}
\setlength{\headheight}{0in} \setlength{\headsep}{-1in}
\setlength{\parindent}{1pc}
\setlength{\oddsidemargin}{-.1875in}  % Centers text.
\setlength{\evensidemargin}{-.1875in}

% Add the period after section numbers.  Adjust spacing.
\newcommand{\Section}[1]{\vspace{-8pt}\section{\hskip -1em.~~#1}\vspace{-3pt}}
\newcommand{\SubSection}[1]{\vspace{-3pt}\subsection{\hskip -1em.~~#1}
        \vspace{-3pt}}
\newcommand{\bqn}{\begin{eqnarray}}
\newcommand{\eqn}{\end{eqnarray}}
\newcommand {\diff}[1] {\frac{\partial}{\partial #1}}
\newcommand{\jacob}[3]{\frac{\partial^2 #3}{\partial #1 \partial #2}}
\newcommand{\der}[2]{\frac{\partial #2}{\partial #1}}
\begin{document}

% Make title bold and 14 pt font (Latex default is non-bold, 16pt)
\title{Stat 312: Lecture 23\\
Categorical Data}
% For single author (just remove % characters)
\author{Moo K. Chung\\
mchung@stat.wisc.edu}
% For two authors (default example)
\maketitle
\thispagestyle{empty}
\section*{Concepts}
\begin{enumerate}
\item Multinomial data. There are $k$ outcomes (categories): $C_1,
C_2, \cdots, C_k$. The probability of sample $X_i$  belonging to
category $C_j$ is $p_j$, i.e.
$$P(X_i \in C_1)=p_1, \cdots, P(X_i \in C_k)=p_k.$$

\item The null hypothesis of interest is
$$H_0: p_1=c_1, \cdots, p_k=c_k$$
for given constants $c_1,\cdots,c_k$ ($c_1 + \cdots + c_k=1$).
$$H_1: p_j \neq c_j \mbox{ for some } j.$$

\item Let $x_1,\cdots,x_n$ be the observations. Suppose that there
are $N_j$ items in category $C_j$. Note that $N_1 + \cdots +
N_k=n$. We assume $N_1,\cdots N_j$ to be distributed as {\em
multinomial} with parameter $p_1,\cdots,p_k$. The {\em expected}
number of elements in category $C_j$ is $\mathbb{E} N_j = np_j$.

\item {\em Chi-
squared goodness-of-fit test.} The test procedure
involes measuring the relative discrepancy between the expectation
and observation using
$$\chi^2 =\Big(\frac{N_1 -\mathbb{E}N_1}{\mathbb{E}N_1}\Big)^2 + \cdots
\Big(\frac{N_k -\mathbb{E}N_k}{\mathbb{E}N_k}\Big)^2.$$ Assuming
$np_j \geq 5$ for every $j$, $$\chi^2 \sim \chi_{k-1}^2.$$

\end{enumerate}

\section*{In-class problems}
Example 1. There are four blood types (ABO system). It is believed
that 34, 15, 23 and 28 $\%$ of people have blood type A, B, AB and
O respectively. The blood samples of 100 students were collected:
A(12), B(56), AB(2), O(30). Test if the collected blood sample
contradicts the previous belief.

\section*{Self-study problems}
Read p. 616-619. Example 14.1.



\end{document}
