Writing your own code create a simulation that approximates

Writing your own code, create a simulation that approximates the *standard error *for the sampling distribution of some distribution for a fixed sample size.

Write the code in Python 2.7.

Solution

%\\documentclass[10pt,b5paper]{book} \\documentclass[12pt]{book} %\\usepackage[width=5.5in,height=8.5in, % hmarginratio=3:2,vmarginratio=1:1]{geometry} % for some of these packages, you might have to install % texlive-latex-extra (in Ubuntu) %\\usepackage[T1]{fontenc} %\\usepackage{textcomp} %\\usepackage{mathpazo} %\\usepackage{pslatex} \\usepackage{url} \\usepackage{hyperref} \\usepackage{fancyhdr} \\usepackage{graphicx} \\usepackage{subfig} \\usepackage{amsmath} \\usepackage{amsthm} %\\usepackage{amssymb} \\usepackage{makeidx} \\usepackage{setspace} \\usepackage{hevea} \\usepackage{upquote} \\title{Think Stats} \\author{Allen B. Downey} \ ewcommand{\\thetitle}{Think Stats} \ ewcommand{\\thesubtitle}{Exploratory Data Analysis in Python} \ ewcommand{\\theversion}{2.0.36} % these styles get translated in CSS for the HTML version \ ewstyle{a:link}{color:black;} \ ewstyle{p+p}{margin-top:1em;margin-bottom:1em} \ ewstyle{img}{border:0px} % change the arrows in the HTML version \\setlinkstext {\\imgsrc[ALT=\"Previous\"]{back.png}} {\\imgsrc[ALT=\"Up\"]{up.png}} {\\imgsrc[ALT=\"Next\"]{next.png}} \\makeindex \ ewif\\ifplastex \\plastexfalse \\begin{document} \\frontmatter \ ewcommand{\\Erdos}{Erd\\H{o}s} \ ewcommand{\ hat}{\\hat{N}} \ ewcommand{\\eps}{\\varepsilon} \ ewcommand{\\slope}{\\mathrm{slope}} \ ewcommand{\\inter}{\\mathrm{inter}} \ ewcommand{\\xs}{\\mathrm{xs}} \ ewcommand{\\ys}{\\mathrm{ys}} \ ewcommand{\ es}{\\mathrm{res}} \ ewcommand{\\xbar}{\\bar{x}} \ ewcommand{\\ybar}{\\bar{y}} \ ewcommand{\\PMF}{\\mathrm{PMF}} \ ewcommand{\\PDF}{\\mathrm{PDF}} \ ewcommand{\\CDF}{\\mathrm{CDF}} \ ewcommand{\\ICDF}{\\mathrm{ICDF}} \ ewcommand{\\Prob}{\\mathrm{P}} \ ewcommand{\\Corr}{\\mathrm{Corr}} \ ewcommand{\ ormal}{\\mathcal{N}} \ ewcommand{\\given}{|} %\ ewcommand{\\goodchi}{\\protect\ aisebox{2pt}{$\\chi$}} \ ewcommand{\\goodchi}{\\chi} \\ifplastex \\usepackage{localdef} \\maketitle \ ewcount\\anchorcnt \ ewcommand*{\\Anchor}[1]{% \\@bsphack% \\Hy@GlobalStepCount\\anchorcnt% \\edef\\@currentHref{anchor.\\the\\anchorcnt}% \\Hy@raisedlink{\\hyper@anchorstart{\\@currentHref}\\hyper@anchorend}% \\M@gettitle{}\\label{#1}% \\@esphack% } \\else %%% EXERCISE \ ewtheoremstyle{exercise}% name of the style to be used {\\topsep}% measure of space to leave above the theorem. E.g.: 3pt {\\topsep}% measure of space to leave below the theorem. E.g.: 3pt {}% name of font to use in the body of the theorem {}% measure of space to indent {\\bfseries}% name of head font {}% punctuation between head and body { }% space after theorem head; \" \" = normal interword space {}% Manually specify head \\theoremstyle{exercise} \ ewtheorem{exercise}{Exercise}[chapter] %\ ewcounter{exercise}[chapter] %\ ewcommand{\ extexercise}{\ efstepcounter{exercise}} %\ ewenvironment{exercise}{\ extexercise \ oindent \\textbf{Exercise \\thechapter.\\theexercise} \\begin{itshape} \ oindent}{\\end{itshape}} \\input{latexonly} \\begin{latexonly} \ enewcommand{\\blankpage}{\\thispagestyle{empty} \\quad \ ewpage} %\\blankpage %\\blankpage % TITLE PAGES FOR LATEX VERSION %-half title-------------------------------------------------- \\thispagestyle{empty} \\begin{flushright} \\vspace*{2.0in} \\begin{spacing}{3} {\\huge \\thetitle}\\\\ {\\Large \\thesubtitle } \\end{spacing} \\vspace{0.25in} Version \\theversion \\vfill \\end{flushright} %--verso------------------------------------------------------ \\blankpage \\blankpage %\\clearemptydoublepage %\\pagebreak %\\thispagestyle{empty} %\\vspace*{6in} %--title page-------------------------------------------------- \\pagebreak \\thispagestyle{empty} \\begin{flushright} \\vspace*{2.0in} \\begin{spacing}{3} {\\huge \\thetitle}\\\\ {\\Large \\thesubtitle} \\end{spacing} \\vspace{0.25in} Version \\theversion \\vspace{1in} {\\Large Allen B. Downey\\\\ } \\vspace{0.5in} {\\Large Green Tea Press} {\\small Needham, Massachusetts} %\\includegraphics[width=1in]{figs/logo1.eps} \\vfill \\end{flushright}
Writing your own code, create a simulation that approximates the *standard error *for the sampling distribution of some distribution for a fixed sample size. Wr

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site