\documentclass[a4paper,12pt,reqno,twoside,usenames,dvipsnames]{amsart}

\usepackage{amssymb} \usepackage{graphicx} \usepackage{amsmath} \usepackage{hyperref} \usepackage{verbatim} \usepackage[margin=2cm]{geometry} \usepackage{natbib} \usepackage{pictexwd} \usepackage{pdftricks} \usepackage{comment} \usepackage{subfigure}
\usepackage{setspace} \usepackage{amsfonts} \usepackage{color} \usepackage{palatino}

\hypersetup{breaklinks=true,
pagecolor=white,
colorlinks=true,
linkcolor= blue,
hyperfootnotes= true,
urlcolor=blue
}
\urlstyle{rm}

 
 

\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\newcommand{\revertstretch}{\setstretch{1.4}}
\revertstretch
\renewcommand{\datename}{\textit{Date Printed}.}
\newcommand{\eps}{\varepsilon}
\newcommand{\var}{\operatorname{var}}
\newcommand{\cov}{\operatorname{cov}}
\newcommand{\E}{\operatorname{E}}
 
 
 \newcommand{\comments}[1]{}
\renewcommand{\baselinestretch}{1.2}

 
  \parindent 24pt \parskip 10pt
 


%\setcounter{page}{1}
%\setlength{\oddsidemargin}{0in}
%\setlength{\textwidth}{6.5in}
%\setlength{\textheight}{9.25in}
%\setlength{\topmargin}{0in}
%\setlength{\headheight}{0in}
%\setlength{\headsep}{0in}


\begin{document}

\titlepage

\vspace*{12pt}

\begin{center}

{\large {\bf    Heteroskedasticity}
}

 May 19, 2021

\bigskip



  Eric B.  Rasmusen

{\it Abstract}

\end{center}

\begin{small}

  We can correct for heteroskedasticity even when estimating a mean. 


\noindent
   Professor of 
Business Economics and Public Policy, Kelley School of Business, Indiana
University,   1309 East Tenth Street, Bloomington, Indiana,  USA 47405, (812) 855-9219 (secretary),   Erasmuse@indiana.edu,
  \url{http://www.rasmusen.org/papers/heteroskedasticity}.

  
 
 
 


\end{small}
 


\newpage

\noindent
 {\bf 1. Introduction}
 asdfadfds




Serial correlation is about having a random sample. Heteroskedasticity is about having data of different quality. 

 
 

 
\bigskip
\noindent
 {\bf 2. The Weighted  Mean}


  We want to estimate the mean $\mu$ from $N$ observations $y_i = \mu + \epsilon_i$, where the  $\epsilon_i$ are independently distributed with   mean 0 and variance $\sigma^2_i$.  Suppose we    estimate the population mean by using    a weighted mean:
\begin{equation} \label{a1}
\hat{\mu}^* \equiv \frac{ \Sigma_{i=1}^N    w_i   y_i }{N},
 \end{equation} 
where we choose $w_i$ so that $ \Sigma_{i=1}^N    w_i  = N$. We could use $w_i =1$, for example, which is the same as the unweighted mean. 


This is an unbiased estimator. 
\begin{equation} \label{a1}
E \hat{\mu}^*  = E \frac{\Sigma_{i=1}^N  w_i y_i}{N} =  E \frac{\Sigma_{i=1}^N (w_i\mu +w_i\epsilon_i )}{N}  =    \frac{ \mu}{N} \Sigma_{i=1}^N w_i   +  E\frac{\Sigma_{i=1}^N  w_i \epsilon_i }{N}   = \frac{ \mu}{N} N + 0 = \mu
 \end{equation} 


The variance of the estimator is 
\begin{equation} \label{a1}
\begin{array}{lll}
Var(\hat{\mu}^*) &= & E  \frac{ \left(\frac{\Sigma_{i=1}^N w_i y_i  }{N}   - \mu \right)^2}{N} \\
& &\\
&= &    E  \frac{ \left(\frac{\Sigma_{i=1}^N w_i \mu + w_i \epsilon_i  }{N}   - \mu \right)^2}{N}\\
& &\\
&= &     E  \frac{ \left(  \mu +  \frac{\Sigma_{i=1}^N w_i \epsilon_i  }{N}   - \mu \right)^2}{N} \\
& &\\
&= &      \frac{   \frac{\Sigma_{i=1}^N w_i^2  \sigma_i^2  }{N} }{N} \\
& &\\
&= &  \frac{   \frac{\Sigma_{i=1}^N w_i^2  \overline{\sigma}^2 }{N} }{N} \\
\end{array}
 \end{equation} 
Notice, in particular, that if $w_i=1$ for all $i$, then 
\begin{equation} \label{a1}
\begin{array}{lll}
Var(\hat{\mu}^*)   &= &  \frac{   \frac{\Sigma_{i=1}^N    \overline{\sigma}^2 }{N} }{N}  =\frac{\overline{\sigma}^2 }{N}. \\
\end{array}
 \end{equation} 

But we can do better than that. Let's choose $w_i$ to minimize  the variance. How do we do that? With a giant lagrangian? We want to minimize the variance such that $\Sigma w_i =N$.  So we solve  
\begin{equation} \label{a1}
\begin{array}{lll}
  Minimize_{w_i}     \frac{\Sigma_{i=1}^N w_i^2  \sigma_i^2  }{N^2}   - \lambda (\Sigma w_i  - N)\\
\end{array}
 \end{equation} 
 This has the first order conditions for each $i$, 
\begin{equation} \label{a1}
\begin{array}{lll}
      \frac{2w_i   \sigma_i^2  }{N^2}   - \lambda =0,
\end{array}
 \end{equation} 
so
\begin{equation} \label{a1}
\begin{array}{lll}
 w_i  = \frac{N^2 \lambda }{2 \sigma_i^2 }
\end{array}
 \end{equation}  
 or
\begin{equation} \label{a1}
\begin{array}{lll}
\lambda = \frac{2 \sigma_i^2  w_i}{N^2  } =  \frac{2 \sigma_j^2  w_j}{N^2  }
\end{array}
 \end{equation}  
  
 Thus, $ \sigma_i^2  w_i =   \sigma_j^2  w_j $ and $\frac{w_i}{w_j} =  \frac{\sigma_j^2}{ \sigma_i^2}$. A weight that satisfied that first order condition and the constraint is: 
\begin{equation} \label{a1}
\begin{array}{lll}
w_i^* =  \frac {\overline{\sigma}^2}  {  \sigma_i^2  }\\
\end{array}
 \end{equation}  
   This puts more weight on the better data, the observations with lower variance. 
   


The average variance of the residuals, the sample variance, is (with the N-1 correction so as to be unbiased): 
\begin{equation} \label{a1}
\begin{array}{lll}
Var(\hat{\epsilon_i}^*)& =& E \frac{ \Sigma_{i = 1}^N \left( \frac{\Sigma_{j=1}^N w_j y_j}{N} - y_i \right)^2}{N-1} \\
& &\\
& =&  E \frac{ \Sigma_{i = 1}^N \left( \frac{\Sigma_{j=1}^N \left( w_j\mu + w_j\epsilon_j \right)}{N}-  \mu - \epsilon_i \right)^2}{N-1} \\
& &\\
& = & E \frac{ \Sigma_{i = 1}^N \left( \frac{\Sigma_{j=1}^N w_j \epsilon_j}{N} -   \epsilon_i \right)^2 }{N-1}\\
& &\\
& = & E  \Sigma_{i = 1}^N    \left(  \frac{
\left( \Sigma_{j=1}^N w_j \epsilon_j \right)^2}{N^2(N-1)}   - 2\frac{  \Sigma_{j=1}^N w_j\epsilon_j  \epsilon_i }{N(N-1)}  + \frac{ \epsilon_i^2   }{N-1}   
\right)\\
& &\\
& = &    \Sigma_{i = 1}^N    \left(  \frac{
  \Sigma_{j=1}^N  w_j^2 \sigma_j^2    }{N^2(N-1)}   -  \frac{  2 w_i  \sigma_i^2 }{N(N-1) }  +  \frac{\sigma_i^2  }{N-1}
\right)\\
 & &\\
& = &    \Sigma_{i = 1}^N    \left(  \frac{
  \Sigma_{j=1}^N w_j^2\sigma_j^2    }{N^2(N-1)}   - \frac{2N  w_i   \sigma_i^2 }{N^2(N-1) }  +  \frac{N^2\sigma_i^2  }{N^2(N-1)}
\right)\\
& &\\
& = &    \frac{N^2\overline{\sigma}^2    }{N^2(N-1) }   -  \frac{    2N^2\overline{\sigma}^2 }{N^2(N-1) }  +  \frac{N^3  \overline{\sigma}^2} {N^2(N-1)}sdfsfsdd \\
& &\\
& = &        -  \frac{   \overline{\sigma}^2 }{ N-1  }  +  \frac{N \overline{\sigma}^2} { N-1 } sdfsdfd\\
& &\\
& = &    \frac{(N-1) \overline{\sigma}^2}   {   N-1 }  sdfsdf  \\
& &\\
& = &      \overline{\sigma}^2 sdfdf    \\
\end{array}
 \end{equation} 
 
How do we estimate $\sigma_i^2$?

 
 
\bigskip
\noindent
 {\bf 4.  Template stuff}


 \hspace*{-48pt} \begin{minipage}[c]{ \linewidth}
   \begin{center} 
     
       {\sc    Figure 1:\\
    sdfsafsdfadfd     Reaction Curves  $x_1$ and $x_2$   } \label{fig2.png}

  \includegraphics[width=3in]{fig2.png}
            \end{center}
   \end{minipage}
  



\bigskip


\noindent
{\bf References} 
 
Kennedy

 White

 
\end{document}
