\documentclass{beamer}
\input{bepackage}
\usepackage{color}


% Define the footline template to display the authors' names on the right side
\setbeamertemplate{footline}{%
  \hfill%
  \scriptsize{\insertauthor}%
  \hspace*{0.5cm}%
  \insertframenumber/\inserttotalframenumber%
  \hspace*{0.5cm}%
}


% Title, subtitle, and other information
\title{Stat472/572 Sampling: Theory and Practice}
%\subtitle{Slides are intended for a course based on the book: \textit{Sampling: Design and Analysis, Third Edition} by Sharon L. Lohr}
\author[Yan Lu]{Instructor: Yan Lu}
\institute[UNM]{University of New Mexico}
\date{}

% Declare the logo
\pgfdeclareimage[height=2.0cm]{logoUNM}{./plots/unmlog} 

% Begin the document
\begin{document}

% Set bullet and enumeration styles
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{itemize subitem}[square]
\setbeamertemplate{itemize subsubitem}[circle]
\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{enumerate subitem}[square]
\setbeamertemplate{enumerate subsubitem}[circle]

% Set captions to be numbered
\setbeamertemplate{caption}[numbered]

% Title slide
\begin{frame}[plain] % Use plain to remove header/footer on the title slide
    \titlepage
    \vspace{-1cm} % Add space between the title page and chapter information
    \centering
    \textbf{\Large Chapter 2: Simple Probability Samples} % Emphasize chapter title

      % Adjusted Logo Position
    \begin{textblock*}{2.0cm}(0.0cm,-3.5cm) % Move slightly left and down to fit on the slide
        \pgfuseimage{logoUNM}
    \end{textblock*}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Chapter 2}
\begin{frame}
{\bf Probability Sampling}
 A sampling method in which every member of a population has a known, non-zero chance (or probability) of being selected.

Commonly used probability sampling methods:

$$ \left\{
\begin{array}{l}
\mbox{simple random sampling}\\
\mbox{stratified sampling}\\
\mbox{cluster sampling}
\end{array}\right.
$$
Assumption through Chapter 7:
\bi
\item sampled population = target
population
\item no missing data
\item no measurement error
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Simple Random Sample without replacement (SRS):}

 Randomly select a size $n$ sample from
size $N$ population
\bi
\item Every possible subset of $n$ units in the
population has the same chance to be in the sample
\item Each individual is equally likely to be in the
sample
\ei

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Framework for Probability Sampling:}
\bi
\item $U = \{1; 2; \cdots ;N\}$: universe finite population
\item $S$: sample
\item $\pi_i = p(\mbox{unit } i \mbox{ in the sample})$
\item 
{\small
\begin{tabular}{ccc}
&Population quantities & Sample quantities\\
\hline
Size & $N$ & n\\
\hline
Mean & $\bar y_U = \sum_{i=1}^N y_i/N$ & $\bar y_S = \sum_{i\in S} y_i/n$\\
\hline
Total & $t =\sum_{i=1}^N y_i$ & $\hat t =N \bar y_S$\\ 
\hline
Variance &  $S^2 = \ds\frac 1 {N-1}\sum_{i=1}^N (y_i - \bar y_U)^2$ & $s^2 = \ds\frac 1 {n-1} \sum_{i\in S} (y_i -\bar y_S)^2$\\
\hline
\end{tabular}
}
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\bi
\item $E[\hat t] = \sum_S \hat t_S p(S)$
\item Bias $[\hat t] = E[\hat t]-t$
\item
\begin{eqnarray*}
V(\hat t) &=& E[(\hat t - E[\hat t])^2]\\
&= &\sum_{S} p(S) (\hat t_S -E[\hat t])^2
\end{eqnarray*}
\item
\begin{eqnarray*}
MSE(\hat t) &=& E[(\hat t -t)^2]\\
&=& E[\hat t - E(\hat t) + E(\hat t) -t]^2\\
&=& E[(\hat t -E(\hat t))^2] + (E(\hat t) -t )^2 \\
&=& V(\hat t) +(\mbox{bias} [\hat t])^2
\end{eqnarray*}

\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\bi
\item Unbiased, $E[\hat t] =t$ (Archer A)
\item Precise, $V[\hat t] = E[(\hat t - E(\hat t))^2]$ is small, measures how
close estimates from different samples are to each other (Archer B)
\item Accurate, $MSE [\hat t] = E[(\hat t -t)^2]$ is small, measures how
close the estimate is to the true value (Archer C)
\ei
\end{frame}


 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
   \begin{frame}
    \begin{figure}[!htp]
        \centering
        \includegraphics[width=0.8\textwidth]{./plots/archers}
        \caption{Unbiased, precise and accurate archers}
         \label{archers}
    \end{figure}
    \vspace{-0.3cm} % Adjust spacing as needed
    \begin{center}
        \textit{\scriptsize Source: Figure 2.3 of Sampling: Design and Analysis, 3rd edition, by Sharon L. Lohr}
    \end{center}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Example 1:} $U = \{1, 2, 3, 4\}, N = 4, n =2$\\
$
\left(
\begin{array}{c}
4\\
2
\end{array}\right)
$
possible samples\\
$S_1 = \{1,2\}, S_2 = \{1,3\},S_3 = \{1,4\}$\\
$S_4 = \{2,3\}, S_5 = \{2,4\},S_6 = \{3,4\}$\\
In probability sampling, each of the possible samples $S$ from the
population has a known probability $p(S)$ of being selected, and $\sum
p(S) =1$ \\
 SRS: $p(S_i) = 1/ \left(
\begin{array}{c}
4\\
2
\end{array}\right)
=1/6$\\
$\pi_i = p(\mbox{unit } i \mbox{ in the sample})$ \\
 $=\left(
\begin{array}{c}
N-1\\
n-1
\end{array}\right)/\left(
\begin{array}{c}
N\\
n
\end{array}\right)=n/N= 2/4 = 1/2
$ 

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
We can also set up different selection probability for
different samples\\
{\bf Example 2:} $U = \{1, 2, 3, 4\}, N = 4, n =2$\\
$S_1 = \{1,2\}, S_2 = \{1,3\},S_3 = \{1,4\}$\\
$S_4 = \{2,3\}, S_5 = \{2,4\},S_6 = \{3,4\}$\\
Assume a list of letters, $a,a,b,f,f,f$
\bi
\item if $a$ is chosen, $S_1$ is the sample; \\
if $b$ is chosen, $S_2$ is the sample;\\
 if $f$ is chosen, $S_6$ is
the sample
\item $P(S_1) = 1/3$, $P(S_2) = 1/6$, $P(S_6) = 1/2$, $P(S_3) = P(S_4) =P(S_5)=
0$\\
{\bf What are the $\pi_i$s?}

$\pi_i = p(\mbox{unit } i\mbox{ in the sample})$ \\

\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{eqnarray*}
\pi_1 &=& P(\text{unit 1 is in the sample}) \\
&=& P(\text{unit 1} \in S_1 \text{ or } S_2 \text{ or } S_3) \\
&=& P(S_1) + P(S_2) + P(S_3) \\
&=& \frac{1}{3} + \frac{1}{6} + 0 \\
&=& \frac{1}{2}
\end{eqnarray*}

$\pi_2 = p(S_1) + p(S_4) + p(S_5) = 1/3+ 0+ 0 = 1/3$\\
$\pi_3 = p(S_2) + p(S_4) + p(S_6) = 1/6+ 0 + 1/2= 2/3$\\
$\pi_4 = p(S_3) + p(S_5) + p(S_6) = 0+0+1/2 = 1/2$\\
$\sum \limits_{i=1}^4 \pi_i = 2$ 
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
In general,
$\sum\limits_{i=1}^N \pi_i = n$\\
Proof: Let
$$Z_i = \left\{
\begin{array}{cc}
1 & \mbox{if unit}\quad i\in S \\
0& \mbox{otherwise}
\end{array}\right.$$
$p(Z_i =1) =\pi_i$\\
$E(Z_i) = 1* p(Z_i =1) = \pi_i$\\
$\sum\limits_{i=1}^N \pi_i = \sum\limits_{i=1}^N E(Z_i) =
E\left(\sum\limits_{i=1}^N Z_i\right) =n$
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Continue with Example 2, suppose values of $y_i$ is equivalent to $i$,\\
\begin{tabular}{c|cccc}
 $i$ &  1 & 2 & 3 &4\\
  \hline
  $y_i$ & 1  &  2 & 3 & 4
\end{tabular}
\begin{tabular}{ccccc}
 Possible Sample & $p(S)$ &sample values & $\bar y_S$ & $\hat t_S = N \bar y_S$ \\
  \hline
  $S_1=\{1,2\}$ & 1/3 & 1,2 & $\bar y_{S_1} = 1.5$ & $\hat t_1 = 6$\\
  $S_2=\{1,3\}$ & 1/6 & 1,3 & $\bar y_{S_2}=2$ & $\hat t_2=8$\\
  $S_6=\{3,4\}$ & 1/2 &3,4 & $\bar y_{S_3}=3.5$ & $\hat t_3=14$\\
\hline
\end{tabular}

$$t= \sum_{i=1}^4 y_i = 1+2+3+4=10$$
\begin{eqnarray*}
E[\hat t]& = &\sum_S \hat t_S p(S)\\
&=& \hat t_1 p(S_1) + \hat t_2 p(S_2) +\hat t_6 p(S_6)\\
&=& 6 \times \ds\frac 1 3 + 8 \times
\ds\frac 1 6 + 14 \times \ds\frac 1 2 =\ds\frac {31}{3}
\end{eqnarray*}

$\mbox{Bias} (\hat t) = E(\hat t) -t = 31/3-10 = 1/3$, therefore,  $\hat t$ is biased. 

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Continue with Example 2,  now with same probability of selection
\vspace{1cm}

\begin{tabular}{ccccc}
 Possible S & $p(S)$ &sample values & $\bar y_S$ & $\hat t_S$ \\
  \hline
  $S_1=\{1,2\}$ & 1/6 & 1,2 & $\bar y_{S_1} = 1.5$ & $\hat t_1 = 6$\\
  $S_2=\{1,3\}$ & 1/6 & 1,3 & $\bar y_{S_2}=2$ & $\hat t_2=8$\\
  $S_3=\{1,4\}$ & 1/6 &1,4 & $\bar y_{S_3}=2.5$ & $\hat t_3=10$\\
  $S_3=\{2,3\}$ & 1/6 &2,3 & $\bar y_{S_3}=2.5$ & $\hat t_3=10$\\
  $S_3=\{2,4\}$ & 1/6 &2,4 & $\bar y_{S_3}=3$ & $\hat t_3=12$\\
  $S_3=\{3,4\}$ & 1/6 &3,4 & $\bar y_{S_3}=3.5$ & $\hat t_3=14$\\
  \hline
\end{tabular}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
$$t= \sum_{i=1}^4 y_i = 1+2+3+4=10$$
\begin{eqnarray*}
E[\hat t]& = &\sum_S \hat t_S p(S)\\
&=& \hat t_1 p(S_1) + \hat t_2 p(S_2) +\hat t_3 p(S_3) +\hat t_4 p(S_4) +\hat t_5 p(S_5)+\hat t_6 p(S_6)\\
&=& 6 \times \ds\frac 1 6 + 8 \times
\ds\frac 1 6 + 10 \times \ds\frac 1 6 +10 \times \ds\frac 1 6+12 \times \ds\frac 1 6+14 \times \ds\frac 1 6\\
&=& 10
\end{eqnarray*}

$\hat t$ is unbiased for $t$
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{eqnarray*}
V(\hat t) &=& \sum_S p(S) (\hat t_S - E[\hat t])^2\\
&=& p(S_1) (\hat t_{S_1} - E[\hat t])^2 + p(S_2) (\hat t_{S_2} -
E[\hat t])^2\\
&+ &\cdots + p(S_6) (\hat t_{S_6} - E[\hat t])^2\\
&=& \ds\frac {20} {3}
\end{eqnarray*}

$\mbox{MSE}(\hat t) = V(\hat t) + \mbox{bias}^2 = \ds\frac {20} {3}$

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\begin{frame}
{\bf Remarks on Probability Samples:}
\bi
\item Probability samples ensure that every population unit has a nonzero chance of being selected. 
\item They allow us to quantify the likelihood that our sample is a ``good" one:
    \begin{itemize}
        \item A single probability sample is not guaranteed to be representative of the population for a specific criterion.
        \item However, we can quantify how often the sample meets a criterion of representativeness, similar to interpreting a 95\% confidence interval as containing the true parameter value in 95\% of cases.
    \end{itemize}
\item In practice, we do not perform detailed computations for every sampling design, but the underlying concepts apply to all probability sampling methods.
\item Typically, not all population values $y_1, y_2, \cdots, y_N$ are known; only the $y_i$ values in the sample are observed.
\item The primary objective is to estimate key population parameters, such as the total or mean.
\ei
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Recall:} 

{\bf Simple Random Sampling Without Replacement (SRS)}

\vspace{1em}
Simple random sampling is the most fundamental form of probability sampling. It serves as the theoretical foundation for more complex sampling designs.

\vspace{0.5em}
\bi
\item The population is denoted by $U = \{1, 2, \cdots, N\}$.
\item Each of the $\binom{N}{n}$ possible samples has an equal probability of being selected:  
\[
P(\text{any sample}) = \frac{1}{\binom{N}{n}}
\]
\item Every unit $i$ in the population has the same probability of being selected:  
\[
\pi_i = \frac{n}{N}
\]
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
{\bf Question:} Does $\pi_i = \text{constant for all } i$ imply an SRS?

\vspace{0.5em}
{\bf Answer:} $\pi_i = \text{constant for all } i$ does not necessarily imply a Simple Random Sample (SRS).

\vspace{0.5em}
{\bf Example:}  
100 integers are divided into 20 clusters:  
$\{1,2,3,4,5\}, \{6,7,8,9,10\}, \cdots, \{96,97,98,99,100\}$.  
Randomly select 4 clusters, and observe the 5 observations within the selected clusters.

\begin{align*}
\pi_i &= P(i \in \text{cluster } j \text{ and cluster } j \text{ is selected}) \\
&= P(i \in \text{cluster } j \mid \text{cluster } j \text{ is selected}) \cdot P(\text{cluster } j \text{ is selected}) \\
&= 1 \cdot \frac{4}{20} \\
&= \frac{1}{5}
\end{align*}

%\vspace{0.5em}
This is a \textbf{cluster sample}, not an SRS.
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Parameters of interest:}
\bi
\item Population mean: $\bar y_U = \sum_{i=1}^N y_i/N$
\item Population total: $t = \sum_{i=1}^N y_i = N \bar y_U$

Estimators based on SRS:
\item $\hat {\bar y}_U= \bar y_S = \ds\frac 1 n \sum_{i\in S} y_i$
\item $\hat t =N \bar y_S$\\
----often use $\bar y$ to denote $\bar y_S$
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
{\bf Properties of $\bar{y}$:}
\begin{enumerate}
\item \textbf{Expected Value:} $E(\bar{y}) = \bar{y}_U$ 
    \begin{itemize}
        \item $\bar{y}$ is an unbiased estimator of the population mean $\bar{y}_U$.
    \end{itemize}

\item \textbf{Variance:} $V(\bar{y}) = \left(1 - \frac{n}{N}\right) \frac{S^2}{n}$, where $S^2 = \frac{1}{N-1} \sum\limits_{i=1}^N (y_i - \bar{y}_U)^2$
    \begin{itemize}
        \item $\left(1 - \frac{n}{N}\right)$ is called the \textit{finite population correction (fpc)}.  
        \item If $n = N$, the variance is 0 because there is no sampling variability.  
        \item If $\frac{n}{N}$ is large, the variance is small.  
        \item If $N$ is large and $n$ is small compared to $N$, the fpc is approximately 1.
    \end{itemize}

\item \textbf{Unbiased Estimator of Variance:}  
    $\hat{V}(\bar{y}) = \left(1 - \frac{n}{N}\right) \frac{s^2}{n}$ is an unbiased estimator of $V(\bar{y})$, where $s^2 = \frac{1}{n-1} \sum\limits_{i=1}^n (y_i - \bar{y})^2$.
\end{enumerate}
\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Proof of Properties 1 and 2:}  
\[
Z_i = 
\begin{cases} 
1 & \text{if unit } i \in S \\ 
0 & \text{otherwise}
\end{cases}
\]
\[
\bar{y} = \sum_{i \in S} \frac{y_i}{n} = \sum_{i=1}^N Z_i \frac{y_i}{n}
\]
\[
P(Z_i = 1) = P(\text{unit } i \in S) = \frac{n}{N}, \quad E(Z_i) = E(Z_i^2) = \frac{n}{N}
\]
\begin{eqnarray*}
V(Z_i) &=& E(Z_i^2) - (E[Z_i])^2 \\
&=& \frac{n}{N} - \left(\frac{n}{N}\right)^2 \\
&=& \frac{n}{N} \left(1 - \frac{n}{N}\right)
\end{eqnarray*}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

 For $i \neq j$:
 
 
\begin{eqnarray*}
E[Z_i Z_j] &=& P(Z_i = 1 \text{ and } Z_j = 1) \\
&=& P(Z_j = 1 \mid Z_i = 1) \cdot P(Z_i = 1) \\
&=& \left(\frac{n-1}{N-1}\right) \cdot \frac{n}{N}
\end{eqnarray*}
\begin{eqnarray*}
\text{Cov}(Z_i, Z_j) &=& E[Z_i Z_j] - E[Z_i] E[Z_j] \\
&=& \left(\frac{n-1}{N-1}\right) \cdot \frac{n}{N} - \left(\frac{n}{N}\right)^2 \\
&=& -\frac{1}{N-1} \left(1 - \frac{n}{N}\right) \cdot \frac{n}{N}
\end{eqnarray*}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

\begin{eqnarray*}
E(\bar{y}) &=& E\left[\sum_{i=1}^N Z_i \frac{y_i}{n}\right] \\
&=& \sum_{i=1}^N \frac{n}{N} \cdot \frac{y_i}{n} \\
&=& \sum_{i=1}^N \frac{y_i}{N} \\
&=& \bar{y}_U
\end{eqnarray*}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

{\footnotesize
\begin{eqnarray*}
V(\bar y) &=& \ds\frac 1 {n^2} V\left(\sum_{i=1}^N Z_i y_i\right)\\
&=& \ds\frac 1 {n^2} Cov\left(\sum_{i=1}^N Z_i y_i, \sum_{j=1}^N Z_j
y_j\right)\\
&=& \ds\frac 1 {n^2} \left[\sum_{i=1}^N y_i^2 V(Z_i) + \sum_{i=1}^N
\sum_{j\neq i}^N y_i y_j Cov(Z_i, Z_j)\right]\\
&=& \ds\frac 1 {n^2} \left[\ds\frac n N (1-\ds\frac n N) \sum_{i=1}^N
y_i^2-\sum_{i=1}^N \sum_{j\neq i}^N y_i y_j \ds\frac 1 {N-1}
(1-\ds\frac n N)(\ds\frac n N)\right]\\
&=& \ds\frac 1 {n^2} \ds\frac n N \left(1- \ds\frac n N\right) \left[\sum_{i=1}^N
y_i^2 - \ds\frac 1 {N-1} \sum_{i=1}^N \sum_{j\neq i}^N y_i y_j\right]\\
&=& \ds\frac 1 n \left(1-\ds\frac n N\right) \ds\frac 1 {N(N-1)} \left[(N-1)
\sum_{i=1}^N y_i^2 -(\sum_{i=1}^N y_i)^2 + \sum_{i=1}^N y_i^2\right]\\
&=& \ds\frac 1 n \left(1-\ds\frac n N\right)\ds\frac 1 {N(N-1)} \left[N \sum_{i=1}^N
y_i^2 - (\sum_{i=1}^N y_i)^2\right] = \left(1- \ds\frac n N\right) \ds\frac {S^2} n
\end{eqnarray*}
}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
{\bf Estimating a Proportion: A Special Case of Estimating a Mean}  

Define:  
\[
y_i = 
\begin{cases} 
1 & \text{if the unit has the characteristic} \\ 
0 & \text{otherwise}
\end{cases}
\]  

The population proportion is:  
\begin{eqnarray*}
p &=& \frac{\text{number of units with the characteristic in the population}}{N} \\
&=& \frac{\sum\limits_{i=1}^N y_i}{N} = \bar{y}_U
\end{eqnarray*}  

The sample proportion is:  
\[
\hat{p} = \bar{y} = \frac{\sum\limits_{i \in S} y_i}{n}
\]  

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
{\bf Example 2.4: Estimating a Proportion}  

Given:  
\[
U = \{1, 2, 3, 4, 5, 6, 7, 8\}, \quad N = 8, \quad n = 4
\]  

\begin{tabular}{c|cccccccc}
$i$      & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline
Values   & 1 & 2 & 4 & 4 & 7 & 7 & 7 & 8
\end{tabular}  

Define:  
\[
y_i = 
\begin{cases} 
1 & \text{if unit } i \text{ has the value 7,} \\ 
0 & \text{otherwise.}
\end{cases}
\]  

The population proportion is:  
\[
p = \frac{3}{8}
\]  

The sample proportion is:  
\[
\hat{p}_S = \frac{\sum\limits_{i \in S} y_i}{4} 
\]
This represents the proportion of 7s in the sample.  

Find $E(\hat{p})$.  

\end{frame}



\begin{frame}

Probability Distribution and Expectation of $\hat{p}$

\begin{tabular}{c|cccc}
$k$ & $0$ & $\frac{1}{4}$ & $\frac{1}{2}$ & $\frac{3}{4}$ \\
\hline
$p(\hat{p} = k)$ & $\frac{5}{70}$ & $\frac{30}{70}$ & $\frac{30}{70}$ & $\frac{5}{70}$ 
\end{tabular}  

\vspace{0.2cm}

**Probability Calculation:**  
For \(k = 0\):  
\[
p(\hat{p} = 0) = \frac{\binom{5}{4} \binom{3}{0}}{\binom{8}{4}} = \frac{5}{70}
\]  

**Expectation of \(\hat{p}\):**  
\[
E(\hat{p}) = 0 \cdot \frac{5}{70} + \frac{1}{4} \cdot \frac{30}{70} + \frac{1}{2} \cdot \frac{30}{70} + \frac{3}{4} \cdot \frac{5}{70} = \frac{3}{8}
\]  



\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
**Variance Calculation:**  
\begin{eqnarray*}
S^2 &=& \frac{\sum\limits_{i=1}^N (y_i - p)^2}{N-1} \\
&=& \frac{\sum_{i=1}^N y_i^2 - 2p\sum_{i=1}^N y_i + Np^2}{N-1} \\
&=& \frac{Np - 2p \cdot Np + Np^2}{N-1} \\
&=& \frac{N}{N-1} p(1-p)
\end{eqnarray*}  
\begin{eqnarray*}
V(\hat p) &=& \left(1- \ds\frac n N\right) \ds\frac 1 n S^2\\
& =& \left(1- \ds\frac n N\right) \ds\frac 1 n \ds\frac N {N-1} p
(1-p)\\
&=& \ds\frac {N-n}{N-1}\times \ds\frac {p (1-p)}{n}
\end{eqnarray*}

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
In our example,
\begin{eqnarray*}
V(\hat p) &=&\ds\frac {N-n}{N-1}\times \ds\frac {p (1-p)}{n}\\
&=&\ds\frac {8-4}{8-1}\times \ds\frac {\frac 3 8 (1-\frac 3 8)}{4}\\
&=& \ds\frac {15}{448}
\end{eqnarray*}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
**Sample Variance and Variance Estimate**

The sample variance is given by:  
{\small
\begin{eqnarray*}
s^2 &=& \frac{\sum\limits_{i \in S} (y_i - \hat{p})^2}{n - 1} \\
&=& \frac{\sum\limits_{i \in S} y_i^2 - 2\hat{p} \sum\limits_{i \in S} y_i + n \hat{p}^2}{n - 1} \\
&=& \frac{n \hat{p} - 2 \hat{p} \cdot n \hat{p} + n \hat{p}^2}{n - 1} \\
&=& \frac{n}{n - 1} \hat{p} (1 - \hat{p})
\end{eqnarray*}  
}
The variance estimate is:  
{\small
\begin{eqnarray*}
\hat{V}(\hat{p}) &=& \left(1 - \frac{n}{N}\right) \frac{1}{n} s^2 \\
&=& \left(1 - \frac{n}{N}\right) \frac{1}{n} \frac{n}{n - 1} \hat{p} (1 - \hat{p}) \\
&=& \left(1 - \frac{n}{N}\right) \frac{\hat{p} (1 - \hat{p})}{n - 1}
\end{eqnarray*}  
}
Here, \(\hat{p}\) is derived from the sample.
\end{frame}

%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
{\bf Coefficient of Variation (CV)}  

Under Simple Random Sampling (SRS) and \(\bar{y}_U \neq 0\):  
\[
CV(\bar{y}) = \frac{\sqrt{V(\bar{y})}}{E(\bar{y})} = \sqrt{1 - \frac{n}{N}} \cdot \frac{S}{\sqrt{n} \cdot \bar{y}_U}
\]  
\[
\widehat{CV}(\bar{y}) = \frac{SE(\bar{y})}{\bar{y}} = \sqrt{1 - \frac{n}{N}} \cdot \frac{s}{\sqrt{n} \cdot \bar{y}}
\]  
--- The standard error expressed as a percentage of the mean.

\begin{itemize}
    \item A standardized measure of dispersion in a probability or frequency distribution.
    \item Measures relative variability.
    \item Does not depend on the unit of measurement.
    \item \(CV(\hat{t}) = CV(\bar{y})\).
\end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Confidence Intervals}  

\begin{itemize}
    \item Repeatedly draw samples and construct confidence intervals for each sample.
    \item Expect approximately 95\% of the resulting intervals to include the true value of the parameter (for a 95\% confidence level).
    \item In probability sampling from a finite population:
    \begin{itemize}
        \item Only a finite number of possible samples exist.
        \item The probability of choosing each sample is known.
    \end{itemize}
    \item This allows for the exact confidence level of a confidence interval procedure to be calculated.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Example 2.10 \\
$U = \{1, 2, 3, 4, 5, 6, 7, 8\}, N = 8, n =4$\\
\begin{tabular}{c|cccccccc}
 $i$ &  1 & 2 & 3 &4 & 5 &6 &7 & 8\\
  \hline
  values & 1  &  2 & 4 & 4 & 7 & 7 & 7 & 8
\end{tabular}
\bi
\item choose an arbitrary procedure for calculating a confidence
interval
\begin{equation}\label{eq:ci}
 CI({\cal {S}}) = [\hat t_{\cal {S}} - 4s_{\cal S}, \hat t_{\cal{S}} + 4s_{\cal S}]
\end{equation}

Use (\ref{eq:ci}) to illustrate the concept of a confidence interval. Let
$$\mu({\cal {S}}) = \left\{
\begin{array}{cc}
1 & CI({\cal {S}}) \mbox{ contains the population value t = 40}\\
0& \mbox{otherwise}
\end{array}\right.$$
\ei
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{table}
\caption{Confidence intervals for possible samples from this small
population}
\begin{tabular}{cccccc}
\hline
${\cal {S}}$ & $y_i, i\in {\cal {S}}$ & $\hat t_{\cal {S}}$ & $s_{\cal {S}}$ & $CI({\cal {S}})$ & $\mu({\cal {S}})$ \\
\hline {1, 2, 3, 4} & 1,2,4,4 & 22 & 1.50 & [16.00, 28.00] & 0\\
{1, 2, 3, 5} & 1,2,4,7 & 28 & 2.65 & [17.42, 38.58] & 0 \\
{1, 2, 3,6} & 1,2,4,7 & 28& 2.65& [17.42, 38.58] &0\\
{1, 2, 3, 7} &1,2,4,7& 28& 2.65 &[17.42, 38.58]& 0 \\
{1, 2, 3, 8} &1,2,4,8& 30& 3.10& [17.62, 42.38]& 1\\
$\vdots$ & & $\vdots$ & & &$\vdots$
\end{tabular}
\end{table}
$$\mbox{Confidence level:} \sum_S p({\cal {S}}) \mu({\cal {S}}) = 0.77$$
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Confidence Intervals in Practice}  

\begin{itemize}
    \item When taking an SRS of four elements without replacement from a population of eight elements:
    \begin{itemize}
        \item There is a 77\% chance that our sample is one of the ``good" ones, where the confidence interval contains the true value (e.g., 40).
    \end{itemize}
    \item This procedure results in a 77\% confidence interval using (\ref{eq:ci}).
    \item In practice, we take only one sample and do not know the population total $t$.
    \item Consequently, we cannot determine if our sample is:
    \begin{itemize}
        \item One of the ``good" samples (e.g., ${\cal{S}} = \{2, 3, 5, 6\}$), or 
        \item One of the ``bad" samples (e.g., $S = \{4, 6, 7, 8\}$).
    \end{itemize}
    \item The confidence interval provides only a probabilistic statement about how often we expect to be correct.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Assumptions for Asymptotic Results}

\begin{itemize}
    \item The population is finite.
    \item Aim: Apply asymptotic results in finite population sampling.
    \item Approach:
    \begin{itemize}
        \item Treat the population as part of a larger **superpopulation**.
        \item Assume the superpopulation is a subset of an even larger superpopulation, and so on.
        \item This embedding into a sequence of increasingly large superpopulations provides properties like:
        \begin{itemize}
            \item **Consistency**
            \item **Asymptotic Normality**
        \end{itemize}
    \end{itemize}
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Hajek's Central Limit Theorem for SRS Without Replacement (1960)}

\begin{itemize}
    \item If certain conditions hold and if $n$, $N$, and $N-n$ are all "sufficiently large," then:
    $$\frac{\bar y - \bar y_U}{\sqrt{\left(1-\frac{n}{N}\right)} \cdot \frac{S}{\sqrt{n}}}$$ 
    is approximately normal with:
    \begin{itemize}
        \item Mean $0$
        \item Variance $1$
    \end{itemize}
    \item A large-sample $100(1-\alpha)\%$ confidence interval (CI) for the population mean is given by:
    \[
    \left[\bar y - z_{\alpha/2} \sqrt{\left(1-\frac{n}{N}\right)} \cdot \frac{S}{\sqrt{n}}, \, 
    \bar y + z_{\alpha/2} \sqrt{\left(1-\frac{n}{N}\right)} \cdot \frac{S}{\sqrt{n}}\right]
    \]
    where:
    \begin{itemize}
        \item $z_{\alpha/2}$ is the $(1-\alpha/2)$th percentile of the standard normal distribution.
    \end{itemize}
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Sample Size Requirement for Normal Approximation}

\begin{itemize}
    \item **Sugden et al. (2000):** Extend Cochran's rule (Cochran, 1977, p. 42) for determining the sample size required for the normal approximation to be adequate.
    \item The minimum sample size is given by:
    \[
    n_{\text{min}} = 28 + 25 \left(\frac{\sum\limits_{i=1}^{N} (y_i - \bar y_U)^3}{N S^3}\right)^2
    \]
    where:
    \begin{itemize}
        \item \(\frac{\sum\limits_{i=1}^{N} (y_i - \bar y_U)^3}{N S^3}\) is the **skewness** of the distribution.
    \end{itemize}
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Example 2.11}
\begin{figure}[!htp]
\caption{Histogram: number of acres devoted to farms
in 1992, for an SRS of 300 counties. Note the skewness of the data.
Most of the counties have fewer than 500,000 acres in farms; some
counties, however, have more than 1.5 million acres in farms.}
       \centering
       \includegraphics[width=0.90\textwidth,
       height=0.6\textheight]{./plots/hist.pdf}
       \label{view}
     \end{figure}

\end{frame}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
$$s = 344,551.9$$
$$\sum_{i=1}^{300}(y_i - \bar y)^3/n = 1.05036 \times 10^{17}$$
$$n_{\mbox{min}} = 28+ 25\left(\ds\frac{1.05036 \times
10^{17}}{(344,551.9)^3}\right)^2 \approx 193$$

The sample of size $300$ appears to be sufficiently large for the
sampling distribution of $\bar y$ to be approximately normal.
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\bi
\item In practice, often, substitute $t_{\alpha/2, n-1}$, the $(1-
\alpha/2)$th percentile of a $t$ distribution with $n-1$ degrees of
freedom, for $z_{\alpha/2}$\\
----large sample, $t_{\alpha/2, n-1} \sim z_{\alpha/2}$\\
----small sample, $t$ produce a wider CI

\item Most software use
$$\left[\bar y - t_{\alpha/2,n-1} \sqrt {\left(1-\ds\frac n N\right)} \cdot\ds\frac s {\sqrt
n}, \quad \bar y + t_{\alpha/2,n-1} \sqrt {\left(1-\ds\frac n
N\right)} \cdot \ds\frac s {\sqrt n}\right].$$ 
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Examples 2.7, 2.8, 2.9 (Using Rhandout)} 

Data Description:
\bi
\item The U.S government conducts a census of agriculture every five
years, collecting data on all farms in the $50$ states. The census
of agriculture provides data on number of farms, the total acreage
devoted to farms, farm size, yield of different crops, and a wide
variety of other agriculture measures for $N=3078$ counties and
county-equivalent in the United States.
\item agpop.csv is the population data
\item agsrs.csv is a simple random sample of size $300$ from agpop.csv
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Consider
\bi
\item Response: number of acres devoted to farms in 1992
$$N= 3078, n= 300$$
$$\bar y = 297,896$$
$$ s = \sqrt{\ds\frac {\sum_{i=1}^{300}(y_i - \bar y)^2}{n-1}} = \sqrt{\ds\frac{\sum_{i=1}^{300}(y_i - 297,896)^2}{299}} = 344,551.9$$
$$\hat t = N \bar y = 3078 \times 297897 = 916,927,110$$
$$SE(\bar y) = \sqrt{\left(1-\frac{300}{3078}\right)\frac {s^2}{300}} =
18,898.434428$$
$$SE(\hat t) = 3078 * SE(\bar y) = 3078* 18,898.434428 = 58,169,381$$
$$\widehat{CV}(\hat t) = \widehat {CV}(\bar y) = \ds\frac {SE(\bar
y)}{ \bar y} = \ds\frac{18,898.434428}{297,897} = 0.06344$$
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Data is highly skewed, median number of farm acres in a county is
$196,717$

An approximate 95\% CI for $\bar y_U$, using $t_{\alpha/2,299} =
1.968$ is
$$297,896 \pm (1.968)(18,898.434)\quad \mbox{or} \quad [260706, 335088].$$

An approximate 95\% CI for population total $t$ is
$$916,927,110 \pm
1.968(58,169,381) \quad \mbox{or} \quad [8.02\times 10^8, 1.03\times
10^9]$$

\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Estimated proportion of counties with fewer than $200,000$
acres in farms,
$$\hat p = 153/300 = 0.51$$
Recall that
$$
\hat V (\hat p) = \left(1- \ds\frac n N\right) \ds\frac {\hat p
(1-\hat p)}{n-1}
$$
$$SE(\hat p) = \sqrt{\left(1-\frac{300}{3078}\right) \frac{0.51 \cdot
0.49}{299}} = 0.0275$$ For estimating proportions, the usual
criterion that the sample size is large enough to use the normal
distribution is if both $np \ge 5$ and $n(1- p) \ge 5$.

A 95\% CI for the proportion of counties with fewer than 200,000
acres in farms is


$0.51\pm 1.968(0.0275)$, or $[0.456, 0.564]$.


\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Sampling Weights}

\begin{itemize}
    \item \(\pi_i\): **Selection Probability** – the probability that unit \(i\) is selected to be in the sample.
    \item \(w_i\): **Sampling Weight** – defined as \(w_i = 1 / \pi_i\).
    \item **In a Simple Random Sample (SRS):**
    \[
    \pi_i = \frac{n}{N}, \quad w_i = \frac{N}{n}
    \]
    \item Key Properties:
    \begin{itemize}
        \item \(\sum\limits_{i \in S} w_i = n \cdot \frac{N}{n} = N\)
        \item \(\sum\limits_{i \in S} w_i y_i = \sum\limits_{i \in S} \frac{N}{n} y_i = N \frac{\sum_{i \in S} y_i}{n} = N \bar{y} = \hat{t}\)
        \item \(\frac{\sum\limits_{i \in S} w_i y_i}{\sum\limits_{i \in S} w_i} = \frac{\hat{t}}{N} = \bar{y}\)
    \end{itemize}
    \item **Self-Weighting:** 
    \begin{itemize}
        \item In SRS, all weights are equal (\(w_i = \frac{N}{n}\)).
        \item Every unit in the sample represents the same number of units in the population.
    \end{itemize}
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Simple Random Sampling with Replacement (SRSWR):}

An SRSWR of size \(n\) from a population of size \(N\) can be thought of as \(n\) independent selections of one unit each.

\begin{itemize}
    \item Select one unit from the population with probability \(1/N\).
    \item After selection, the unit is replaced in the population, and a second unit is randomly selected with the same probability \(1/N\).
    \item The procedure is repeated until the sample contains \(n\) units.
    \item \textbf{Note:} In this sampling method, a unit may be selected more than once.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Estimators based on SRSWR:}

Let $Q_i$ = the number of time unit $i$ appears in the sample, $i =
1, 2, \cdots, N$
\bi
\item Estimator of the Population Mean: $$\bar y_r = \ds\frac 1 n \sum\limits_{i=1}^N Q_i y_i$$
\item The Estimator of the Population Total: $$\hat t_{yr} = N \bar
y_r$$
\ei


\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Properties of $Q_1,Q_2,\cdots,Q_N$}
\bi
\item The joint distribution
of $(Q_1,Q_2, \cdots,Q_N)$ is $N$-variate multinomial with $n$
trials and $p_1 = p_2 = \cdots = p_N = 1/ N$
$$f(Q_1, Q_2, \cdots, Q_N) = \ds\frac{n!}{Q_1! Q_2! \cdots Q_N! } p_1^{Q_1} p_2^{Q_2}\cdots  p_N^{Q_N}$$
\item $0 \leq Q_i \leq n, i= 1, 2, \cdots,N$
\item $E(Q_i) = n p_i = \ds\frac n N$
\item $V(Q_i) = n p_i(1 - p_i) = \ds\frac {n(N-1)}{N^2}$
\item $Cov(Q_i,Q_j) = -\ds\frac n {N^2}$
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Prove: \(Cov(Q_i, Q_j) = -\ds\frac{n}{N^2}\)}

 \(Q_i \sim Bin(n, p_i)\) and \(Q_j \sim Bin(n, p_j)\).
 So that \(Q_i + Q_j \sim Bin(n, p_i + p_j)\).
From the variance of the sum:
\begin{equation}\label{eq:vqi}
V(Q_i + Q_j) = n(p_i + p_j)(1 - p_i - p_j)
\end{equation}

Using the variance and covariance relationship:
\begin{eqnarray}\label{eq:vqi2}
V(Q_i + Q_j) &=& V(Q_i) + V(Q_j) + 2 \, Cov(Q_i, Q_j) \\ \nonumber
&=& n p_i(1 - p_i) + n p_j(1 - p_j) + 2 \, Cov(Q_i, Q_j)
\end{eqnarray}

Setting Equation (\ref{eq:vqi}) equal to Equation (\ref{eq:vqi2}):
\[
Cov(Q_i, Q_j) = -n p_i p_j
\]

For \(p_i = p_j = 1/N\):
\[
Cov(Q_i, Q_j) = -\ds\frac{n}{N^2}
\]

\textbf{Note:} For fixed \(n\), an increase in one component of a multinomial vector requires a decrease in another component.
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Properties of the Estimators in SRSWR:}

\begin{itemize}
    \item \(E(\bar{y}_r) = \bar{y}_U\)
    \item \(E(\hat{t}_{yr}) = t_y\)
    \item \(V(\bar{y}_r) = \ds\frac{N-1}{N} \cdot \ds\frac{S^2}{n}\)
    \item \(V(\hat{t}_{yr}) = N(N-1) \cdot \ds\frac{S^2}{n}\)
\end{itemize}

{\bf Proof of \(E(\bar{y}_r) = \bar{y}_U\):}
\begin{eqnarray*}
E(\bar{y}_r) &=& E\left(\ds\frac{1}{n} \sum\limits_{i=1}^N Q_i y_i\right) \\
&=& \ds\frac{1}{n} \sum\limits_{i=1}^N y_i E(Q_i) \\
&=& \ds\frac{1}{n} \cdot \ds\frac{n}{N} \sum\limits_{i=1}^N y_i \\
&=& \bar{y}_U
\end{eqnarray*}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Comparison of SRS and SRSWR}

\begin{eqnarray*}
V(\bar{y}) - V(\bar{y}_r) &=& \ds\frac{N-n}{N} \cdot \ds\frac{S^2}{n} -
\ds\frac{N-1}{N} \cdot \ds\frac{S^2}{n} \\
&=& \ds\frac{S^2}{Nn} \left[N-n-N+1\right] \\
&=& -\ds\frac{n-1}{Nn} \cdot S^2 < 0
\end{eqnarray*}

\[
\text{MSE}(\bar{y}) - \text{MSE}(\bar{y}_r) < 0
\]

\begin{itemize}
    \item SRS is more efficient than SRSWR.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf Sample size estimation}

{\large The simplest equation relating the precision and sample size comes from the confidence intervals. Specify the tolerable error
\[
p(|\bar{y} - \bar{y}_U| \leq e) = 1 - \alpha
\]
where \( e \) is called the margin of error. 

For an SRSWR, the variance is given by:
\[
V(\bar{y}_r) = \frac{N-1}{N} \cdot \frac{S^2}{n}
\]
The margin of error \( e \) is:
\[
e = z_{\alpha/2} \sqrt{\frac{N-1}{N}} \cdot \frac{S}{\sqrt{n}}
\]
Thus, the sample size \( n_0 \) is approximately:
\[
n_0 \approx \left(\frac{z_{\alpha/2} S}{e}\right)^2
\]
}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
For an SRSWOR, the margin of error \( e \) is given by:
\[
e = z_{\alpha/2} \sqrt{\left(1 - \frac{n}{N}\right)} \cdot \frac{S}{\sqrt{n}}
\]

The sample size \( n \) can be calculated as:
\[
n = \frac{z_{\alpha/2}^2 S^2}{e^2 + \frac{z_{\alpha/2}^2 S^2}{N}}
\]
or equivalently:
\[
n = \frac{\frac{z_{\alpha/2}^2 S^2}{e^2}}{1 + \frac{\frac{z_{\alpha/2}^2 S^2}{e^2}}{N}}
\]
which simplifies to:
\[
n = \frac{n_0}{1 + \frac{n_0}{N}}
\]
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Example 2.12 sample size estimation}

 Suppose we want to estimate the proportion of recipes
in the {\it better homes \& gardens New cook book} that do not
involve animal products. We plan to take an SRS from the $N=1251$
kitchen-tested recipes, and want to use a 95\% CI with margin of
error .03.

$e =.03, \alpha= .05, z_{\alpha/2} =1.96$ \\
Proportion: $$S^2 = \ds\frac N {N-1} p(1-p) \approx p(1-p),$$ when $N$
is large\\
$S^2$ reaches maximum when $p=1/2$\\
$$n_0 = \left(\ds\frac{z_{\alpha/2} S}{e}\right)^2 = \ds\frac{1.96^2}{4\times .03^2}
\approx 1067$$ will result in a 95\% CI with width at most $2e$

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

Note: The sample size ignoring the fpc is large compared with the
population size, so in this case we would make the fpc adjustment
and use
$$n = \ds\frac{n_0}{1+\ds\frac {n_0}N} = \ds\frac{1067}{1+\ds\frac
{1067}{1251}} = 576$$
\end{frame}

\begin{frame}
{\bf Example 2.12 Sample size estimation}

{\small
Suppose we want to estimate the proportion of recipes in the {\it Better Homes \& Gardens New Cookbook} that do not involve animal products. We plan to take an SRS from the \(N = 1251\) kitchen-tested recipes, and want to use a 95\% confidence interval (CI) with a margin of error of 0.03, i.e.,

\[
e = 0.03, \quad \alpha = 0.05, \quad z_{\alpha/2} = 1.96
\]

For the proportion, the variance is:
\[
S^2 = \frac{N}{N-1} p(1-p) \approx p(1-p), \quad \text{when } N \text{ is large}
\]

The variance \(S^2\) reaches its maximum when \(p = \frac{1}{2}\).

Thus, the sample size without considering the finite population correction (fpc) is:

\[
n_0 = \left(\frac{z_{\alpha/2} S}{e}\right)^2 = \frac{1.96^2}{4 \times 0.03^2} \approx 1067
\]

This will result in a 95\% CI with a width at most \(2e\).}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

Note: The sample size ignoring the finite population correction (fpc) is large compared with the population size. Therefore, we apply the fpc adjustment and use the following formula:

\[
n = \frac{n_0}{1 + \frac{n_0}{N}} = \frac{1067}{1 + \frac{1067}{1251}} = 576
\]
Thus, the adjusted sample size is 576.
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{frame}
{\bf Estimate \( S^2 \):}
\bi
\item When estimating a proportion, use \( \frac{1}{4} \) as an upper bound for \( S^2 \). For other quantities, \( S^2 \) must be estimated or approximated.
\item Pilot sample: A small sample taken to provide information and guidance for the design of the main survey can be used to estimate quantities needed for setting the sample size.
\item Use previous studies or data available in the literature for estimates.
\item Alternatively, estimate or guess the variance based on the context.
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\bi
\item Use the Coefficient of Variation (CV) to estimate the standard error (SE):
  \begin{itemize}
    \item The CV is computed as the standard error (SE) divided by the estimate.
    \item Specifying a CV instead of a target margin of error accounts for the fact that the total estimate and the standard error are likely to change together. Thus, different accounting methodologies that produce different estimates and standard errors can be expected to have similar CVs.
  \end{itemize}
  
\[
CV(\hat t) = \frac{\sqrt{V(\hat t)}}{E(\hat t)}
\]

\[
\widehat {CV}(\hat t) = \frac{SE(\hat t)}{\hat t} = N \sqrt{1 - \frac{n}{N}} \cdot \frac{s}{\sqrt{n} \cdot \hat{t}}
\]
\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
Example: Suppose the total revenue estimate is \$1 billion. A 10\% CV means the standard error (SE) is \$100 million. At a 95\% confidence level, the margin of error is \$196 million.
\bi

\item Adjust for budget considerations when estimating sample size and error.
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
{\bf A Prediction Approach for SRS}
\bi
\item The randomization theory (also called design-based theory) provides one framework for sampling methods.
\item An alternative is model-based theory.
  \\
  Model (*): Assume \(y_1, y_2, \dots, y_N\) are independent with
  \[
  E_M[y_i] = u \quad \text{and} \quad V_M[y_i] = \sigma^2
  \]
  \[
  t = \sum_{i=1}^N y_i = \sum_{i \in S} y_i + \sum_{i \notin S} y_i
  \]
  \begin{eqnarray*}
  \hat t &=& \sum_{i \in S} y_i + \sum_{i \notin S} \hat y_i \\
  &=& \sum_{i \in S} y_i + \frac{N-n}{n} \sum_{i \in S} y_i \\
  &=& \frac{N}{n} \sum_{i \in S} y_i
  \end{eqnarray*}
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\begin{eqnarray*}
E_M[\hat t - t] &=& \frac{N}{n} \sum_{i \in S} E_M(y_i) - \sum_{i=1}^N E_M[y_i] \\
&=& \frac{N}{n} n u - N u = 0
\end{eqnarray*}
Thus, \( \hat t \) is model-unbiased for \( t \).
Also, we can show that
\[
V(\hat t) = N^2 \left(1 - \frac{n}{N}\right) \frac{\sigma^2}{n}
\]
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

{\small
\begin{eqnarray*}
V(\hat t) &=& E_M[(\hat t - t)^2] \\
&=& E_M \left[\left( \frac{N}{n} \sum_{i \in S} y_i - \sum_{i=1}^N y_i \right)^2 \right] \\
&=& E_M \left[\left( \frac{N}{n} - 1 \right) \sum_{i \in S} y_i - \sum_{i \notin S} y_i \right]^2 \\
&=& E_M \left[\left( \frac{N}{n} - 1 \right) \sum_{i \in S} y_i - \sum_{i \notin S} y_i - \left( \frac{N}{n} - 1 \right) nu + (N - n) u \right]^2 \\
&=& E_M \left[ \left( \frac{N}{n} - 1 \right)^2 \left( \sum_{i \in S} y_i - nu \right)^2 + \left( \sum_{i \notin S} y_i - (N - n) u \right)^2 \right] \\
&=& \left( \frac{N}{n} - 1 \right)^2 n \sigma^2 + (N - n) \sigma^2 \\
&=& N^2 \left( 1 - \frac{n}{N} \right) \frac{\sigma^2}{n}
\end{eqnarray*}
}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\textbf{Note:} Under model (*), the randomization and model-based approaches give:
\bi
\item The same estimator of the population total.
\item The same variance estimator.
\item The same confidence interval.
\ei
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
{\bf Design-based approach v.s model-based approach}

\textbf{Design-Based Approach}
\bi
\item Data: $\{y_i, i = 1, 2, \cdots, N \}$ (fixed values)
\item Random variables: $Z_i$ (1 if selected, 0 otherwise)
\item Inference: Based on repeated sampling from a finite population
\item No assumptions on distribution of $y_i$s (nonparametric)
\ei

\textbf{Model-Based Approach (using model $(*)$)}
\bi
\item Data: $\{y_i, i = 1, 2, \cdots, N \}$ (independent random variables)
\item Inference: Based on probabilities using CLT approximation
\item Assumptions: $y_i$s are independent with the same mean ($u$) and variance ($\sigma^2$)
\ei
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Chapter 2 Summary: Simple Random Sampling}

\begin{itemize}
    \item \(\pi_i = P(i \in S) =\ds \frac{n}{N}\)
    \item \(w_i = \ds\frac{1}{\pi_i} = \ds\frac{N}{n}\)
    \item \(\bar y =\ds \frac{1}{n} \sum_{i \in S} y_i\)
    \item \(s^2 = \ds\frac{1}{n-1} \sum_{i \in S} (y_i - \bar y)^2\)
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Estimators and Standard Errors}

\begin{small}
\begin{tabular}{|c|c|c|}
\hline
\textbf{Population Quantity} & \textbf{Estimator} & \textbf{Standard Error} \\
\hline
\( t = \sum_{i=1}^N y_i \) & \( \hat{t} = \sum_{i \in S} w_i y_i = N \bar{y} \) & \( N \sqrt{\left(1-\ds\frac{n}{N}\right) \ds\frac{s^2}{n}} \) \\
\hline
\( \bar{y}_U = \ds\frac{t}{N} = \ds\frac{1}{N} \sum_{i=1}^N y_i \) & \( \bar{y} =\ds \frac{\hat{t}}{N} =\ds \frac{ \sum_{i \in S} w_i y_i}{\sum_{i \in S} w_i} \) & \( \sqrt{\left(1-\ds\frac{n}{N}\right) \ds\frac{s^2}{n}} \) \\
\hline
\( p \) & \( \hat{p} \) & \( \sqrt{\left(1-\ds\frac{n}{N}\right) \ds\frac{\hat{p}(1-\hat{p})}{n-1}} \) \\
\hline
\end{tabular}
\end{small}


Most software use the following formula for confidence intervals:
\[
\left[ \bar{y} - t_{\alpha/2, n-1} \sqrt{\left(1-\ds\frac{n}{N}\right) \ds\frac{s}{\sqrt{n}}}, \quad \bar{y} + t_{\alpha/2, n-1} \sqrt{\left(1-\ds\frac{n}{N}\right) \ds\frac{s}{\sqrt{n}}} \right]
\]

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Disclaimer}

Slides are intended for a course based on the book: \textit{Sampling: Design and Analysis, Third Edition} by Sharon L. Lohr

All examples, datasets, and pages directly scanned and included in this chapter are from the textbook.

References to papers or books cited in these slides can be found in the Bibliography section of the textbook.
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




































































