Stat Final Doc

of 6
18 views
PDF
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Document Description
stat final tex document
Document Share
Document Tags
Document Transcript
  %%%%%%%% PREAMBLE\documentclass{article}% Extra packages for graphics, header control, good math typesetting, and margin% control:%\usepackage{amsmath}%My default package%\usepackage{graphicx}%needed to insert figures\usepackage{graphicx, amsmath}%,\usepackage[usenames]{color}%for colored text\usepackage{hyperref}%needed for footnotes, hyperlinks, etc. (must be placed AFTERall the other packages)\hypersetup{colorlinks,%this will make the links the text instead of putting anugly box around the linkscitecolor=blue,%filecolor=blue,%linkcolor=blue,%urlcolor=blue}\definecolor{gray}{gray}{0.95}%defining gray\definecolor{orange}{rgb}{.7,0.5,0}%the last curly brace tells you how much of red,green and blue\definecolor{orange2}{cmyk}{0,0.5,1,0}%another orange%\usepackage{multirow}% \usepackage{pxfonts}%\numberwithin{equation}{section}% Lengths and margins: you're not supposed to monkey around with these in LaTeX,% but default margins waste a lot of paper. For readability, leave lots of space% on the left and right, but feel free to cut down blank space at the top and% bottom of the page.%\usepackage{amsfonts, amsmath, amsthm, graphicx}%\usepackage{setspace}% The amssymb package provides various useful mathematical symbols%\usepackage{amssymb}%\usepackage{harvard}%\usepackage[none]{hyphenat}%\sloppy%\usepackage[ngerman]{babel}%\usepackage[latin1]{inputenc}%\geometry{ left = 1.75in, right = 1.75in, top = 1in, bottom = 1in }%\geometry{ left = 1in, right = 1in, top = 1in, bottom = 1in } %this is for one-inch margins instead of the normal LaTeX margins% Headers and footers with FANCYHDR, a package which provides some useful extra% commands. Note that l, r and c denote left, right and center. The% \headsep line contrals space between your header and the first bit of actual% text on the page. The \headrulewidth line controls the thickness of the line% under your header. Set this to 0 (by un-commenting the line below) if you% don't want a line there.%\newenvironment{packed_enum}{%\begin{itemize}%\setlength{\itemsep}{1pt}  %\setlength{\parskip}{0pt}%\setlength{\parsep}{0pt}%}{\end{itemize}}%\pagestyle{fancy}%\setlength{\headsep}{.5in}%\renewcommand{\headrulewidth}{.25pt}%\lhead{\footnotesize Econ 244}%\chead{Alex, James, Teferi, Sebastian, Deza}%\rhead{\footnotesize February 27th, 2009}%\lfoot{}%\cfoot{\footnotesize Page \thepage}%\rfoot{}% To avoid typing long expressions many times, define your own commands. (In some% cases, LaTeX may already have definitions for the names you've chosen, in which% case you need to re-define them -- this is the difference between %%%%\newcommand% and \renewcommand.)%\setstretch{1.35}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END OFPREAMBLE\begin{document}%\begin{flushright}%Name%\end{flushright}%\begin{center}%title%\end{center}%BEGIN NORMAL WORD PAPER HERE:%%%%%%%%%%%%%%%%%%%lastquestion on final%%%%%%%%%%%%%%%%%%%%%%%%%%%\begin{enumerate}\item[4.] Urban travel times and distances are important factors in the analysis oftraffic flowpatterns. A traffic engineer in Los Angeles obtained the following data from areafreeways.x = miles traveled and y = time in minutes to travel x miles in an automobile.\\\begin{table}[htbp]\caption{}\begin{center}\begin{tabular}{|l|r|r|r|r|r|r|r|r|}\hline\textbf{X} & 5 & 9 & 3 & 11 & 20 & 15 & 12 & 25 \\ \hline\textbf{Y} & 9 & 13 & 6 & 16 & 28 & 21 & 16 & 31 \\ \hline\end{tabular}\end{center}\label{}\end{table}\\\begin{enumerate}%%%%%%%%%%%%%%%%%%%%%part(a.)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\item(5 points) Calculate $\sum{x}, \sum{y}, \sum{x^2}, \sum{y^2}, \sum{xy},\bar{x}, \bar{y}$ and draw the scatter diagram.\\\textit{Comments:} so next is just the algorithm we followed in class(calc. the  above quantities, draw the scatter diagram, show that you can represent the data bya line by making sure r $\geq$ critical value on page 600 of the book, find theequation of $\hat{y}$, draw $\hat{y}$, given an x-value give the corresponding y-value, use a hypothesis test to see if the <i>population</i> can be correlated by aline, and finally, find the confindence interval of y values for a given x value(part (g.))\\\begin{table}[htbp]\caption{}\begin{center}\begin{tabular}{cccccccccc}& $x$ & & $y$ & & $x^{2}$ & & $y^{2}$ & & $xy$ \\& 5 & & 9 & & 25 & & 81 & & 45 \\& 9 & & 13 & & 81 & & 169 & & 117 \\& 3 & & 6 & & 9 & & 36 & & 18 \\& 11 & & 16 & & 121 & & 256 & & 176 \\& 20 & & 28 & & 400 & & 784 & & 560 \\& 15 & & 21 & & 225 & & 441 & & 315 \\& 12 & & 16 & & 144 & & 256 & & 192 \\& 25 & & 31 & & 625 & & 961 & & 775 \\$\sum{x}$= & 100 & $\sum{y}$= & 140 & $\sum{x^{2}}$= & 1630 & $\sum{y^{2}}$= & 2984& $\sum{xy}$= & 2198 \\\end{tabular}\end{center}\label{}\end{table}\\$\bar{x} = \frac{\sum{x}}{n} = \frac{100}{8} = 12.5 $\\$\bar{y} = \frac{\sum{y}}{n}= \frac{140}{8}=17.5$\\For the scatter diagram see \hyperref[scatter]{the appendix}\\%the first bracket isthe name of the label%I need this because otherwise the following text in the next part of the problemcomes before the graph.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%___________________________partb_______________________________________%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\item (5 points) Show analytically that you can correlate the data from this sampleby a line with $\alpha=0.05$\\\begin{align*}%align with the star means that it won't have a numberr &= \frac{n\sum{xy}-\sum{x}\sum{y}}{\sqrt{n\sum{x^{2}}-(\sum{x})^{2}}\sqrt{n\sum{y^{2}}-(\sum{y})^{2}}}\\&=\frac{8(2198)-(100)(140)}{\sqrt{8(1630)-100^{2}}\sqrt{8(2984)-140^{2}}}\\&=\frac{3584}{\sqrt{3040}\sqrt{4272}}\\&= 0.9945\end{align*}Since $r=0.9945 \leq 0.71 = $\text{critical value on page}600(\hyperref[criticalvalue]{see appendix}), we can correlate the data by a line.\item (5 points)Find the equation of the line that best correlates the data fromthe sample\\\textit{Comments: }So for this part we also follow the algorithm for the class(i.e., find $b$, then find $a$, then find $\hat{y}$)\\\begin{align*}b &=\frac{n\sum{xy} -\sum{x}\sum{y}}{n\sum{x^{2}-(\sum{x})^{2}}}=\frac{3584}{3040}=1.18\\a &=\bar{y}-b\bar{x}=17.5-(1.18)(12.5)=2.76\\\hat{y} &=a + bx\\\hat{y} &= 2.76 + 1.18x  \end{align*}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%___________________________partd_______________________________________%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\item (5 points) Draw the line from part (c.) on the scatter plot.\\\textit{Comments:} just pick two $x$'s and find the corresponding $y$-values butplugging in the $x$-values into the $\hat{y}$ formula. For instance, I picked 5 and25 for my $x$ values, but you can pretty much pick which ever values you'd like.\\\begin{table}[htbp]\caption{}\begin{tabular}{|c|c|}\hline$x$ & $y$ \\ \hline5 & 8.7 \\ \hline25 & 32.2 \\ \hline\end{tabular}\label{}\end{table}\begin{align*}2.76 + 1.18(5) &= 8.7\\2.76 + 1.18(25) &= 32.2\end{align*}Then just plot these points on the graph\\%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%___________________________parte_______________________________________%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\item (5 points) Predict time in minutes to travel 31 miles on the Freeway\\\begin{align*}x &= 31\\\hat{y} &= 2.76 + 1.18(31)\\&= 39.3 minutes\end{align*}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%___________________________partf_______________________________________%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\item (15 points) Test hypothesis about the population correlation coefficient with$\alpha = 0.05$.\begin{itemize}\item State the null and alternate hypothesis\\\begin{align*}H_{0} &: \phi = 0\\H_{1} &; \phi > 0\end{align*}\item Compute sample test statistics\\d.f. = n-2 = 8-2 = 6\begin{align*}t &= \frac{r\sqrt{n-2}}{\sqrt{1-r^{2}}}\\&=\frac{.995\sqrt{8-2}}{\sqrt{1-(.995)^{2}}}\\&= \frac{.995\sqrt{6}}{\sqrt{1-(.995)^2}}\\&= 23.3
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x