STAT 440 - Spring 2019 - Midterm Project

STAT 440 - Spring 2019 - Midterm Project
Recall that you may use your notes, books, or even the internet to help answer these questions, but all of the
work should be your own and you should not ask anyone for help or about any details related to the class
and project during this 60 hour period (this includes face to face interactions, emails, internet forums, etc.).
You have half of Wednesday and all of Thursday and Friday to work on this project. You are to turn it in by
midnight on Friday. You will be graded on the accuracy of your answers, the efficiency of your coding, and
the organization/clarity of your write up. You should have plenty of writing to convey what you are doing as
well as comments in your code to explain and make it easier to read. Show all of your work.
You should turn in an RMarkdown file as well as the output through Canvas. If you have any clarifying
questions or notice any issues, don’t hesitate to contact me and Nick. Note that in some of these questions, it
is up to you to select certain things; this is done on purpose so choose wisely and explain your decisions.
1. Consider the following density
f(x) = Cx3e4
for x ≥ 0.
a. Find the CDF and determine the normalizing constant C.
b. Use the inverse CDF method to simulate 100,000 draws from f. Plot the histogram of your sample.
Create a second plot where you zoom in on the x-axis and plot a kernel density estimate as well as
the true density. Comment on the results.
c. Suppose you want to use the normal density with mean 0 and variance σ
2, call it g(x|σ2), to
produce samples from f. Find a constant such that
f(x)g(x|σ2)≤ M,
for all x. Note this constant can/should depend on σ2
. Feel free to either do this analytically or
do this numerically for a few different values of σ2. Try to find a σ2, which produces a small value
of M. Provide a few plots to justify your choice (or show the mathematics if you can).
d. Using your choice of σ2
from above, produce a sample of size 10,000 from f using the accept/reject
method. Produce a histogram and use the sample to estimate the mean of f and produce a
standard error of your estimate.
e. Using the same σ

代做STAT 440作业
2 and g, use importance sampling (sample size 10,000) to again estimate the
mean of f and produce a standard error for your estimate. Compare with what you saw in (d).
2. The file Szeged_Weather_Summary.csv contains monthly averages for different weather metrics in
Szeged, Hungary.
a. The variable WindBearing denotes the direction in which the wind is originating. The units are in
degrees with 0 denoting due north, 90 due east, 180 due south, and 270 due west. All of the winds
come from either the south east or south west. Create a new variable, Direction which indicates if
the direction is southeast (<=180) or southwest (>180). Construct boxplots of temperature vs
Direction.
b. Use a permutation test to determine if Direction is associated with Temperature (measured in
Celcius).
c. Use a bootstrap method to construct a 95% confidence interval for the effect of Direction on
Temperature (response variable here is Temperature). Do both a parametric and nonparametric
bootstrap. Compare the results.
1
d. Pick another variable of your choice to associate with Temperature while also including Direction as
another predictor. Explain why you think this variable is either important or interesting (to you).
Fit a linear regression model with the two predictors and use a bootstrap method to construct a
95% confidence interval of the two variables. Interpret your results in the context of the problem.
e. Suppose we wish to compare Temperature and ApparentTemp, as we suspect they may be quite
similar. Let μ1 be the true mean of Temperature and μ2 be the true mean of ApparentTemp. Use
the nonparametric bootstrap to test H0 : μ1 = μ2 versus H1 : μ1 =6 μ2. Use a 5% significance level.
Perform similar two-tailed tests using nonparametric bootstrap for the median and IQR. For each
test, be sure to include the test statistic, p-value, and a proper conclusion.

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

微信:codinghelp

原文地址:https://www.cnblogs.com/welhoa/p/10462615.html

时间: 2024-07-30 18:58:08

STAT 440 - Spring 2019 - Midterm Project的相关文章

Spring 2019 HW1 MAT 331

Spring 2019 HW1 MAT 331Homework 1: MAT 331Due: 11:59pm, Feb 5, 2019Collaboration policy: You are welcome to work with others on this homework assignment. Butthe code and explanations you turn in should actually be written by you. In particular, you s

CS530, Spring 2019, Program Assignment

CS530, Spring 2019, Program Assignment #226 Feb 2019You and your team shall develop, test, and deliver a disassembler program for theXE variant of the SIC/XE family of machines.XE DISASSEMBLER REQUIREMENTS:The XE disassembler program shall open an XE

CS560/460 Spring 2019

CS560/460 Spring 2019Programming Assignment 1(Due February 12, 2019 by 11:59pm) 1.Geometric Primitives Drawing Description: The line drawing function is the basic function provided by many graphics tools, such as the MS Word, power point, etc. A numb

CS 105 – Intro to Computing Non-Tech Spring 2019

CS 105 – Intro to Computing Non-Tech Spring 2019Page 1 of 3MP 7 – Extra CreditIn this MP, you will create 3 simple functions in one module. It is VERY important you name the moduleand the functions exactly as you are instructed. If the names are not

Math 353/DSC 301, Spring 2019, Final Exam

Math 353/DSC 301, Spring 2019, Final ExamPlease remember to write down your name and student ID. This is the take-home portion whichhas four problems. Only independently-finished and fully-justified answer will receive full credit.1. [11 = 3 + 2 + 4

learning spring for Init Project (一)

reference:https://spring.io/quickstart 内容概要: 1 .初始化工程: 首先打开Idea软件, File->New->Project,如下图所示: 选中上图Spring Assistant,这是一个插件用来初始化spring工程.点击上图下一步,如下图所示: 点击Next.如下图所示: 选中上图的Web->Spring Web,然后点击Next,如下图所示: 输入项目名称,选项工程存放路径,点击Next. 如下图所示: 等待工程自动下载相关的jar包

spring学习七 spring和dynamic project进行整合

spring和web项目进行整合,其实就是在项目启动时,就创建spring容器,然后在servlet中使用spring容器进行开. 注意:为了页面可以访问到servlet,因此servlet必须放进tomcat或者类似的服务器容器中,如果把servlet放进spring容器中,前端页面是无法访问的 第一步:导入spring-web.jar包,因为有一些别的依赖关系,还需要导入spring-tx.jar,spring-aop.jar等包 第二步:编写web.xml配置文件 在web.xml配置一个

The second curriculum design experiment report in spring 2019

2019年第二次课程设计实验报告 一.实验项目名称 贪吃蛇 二.实验项目功能描述 1.小蛇的移动 玩家可以通过 W A S D控制小蛇的上左下右移动,通过函数改变小蛇部位的位置 2.判断游戏失败 当小蛇与边框或自生发生碰撞时,游戏就算失败 四.实现界面展示 五.代码托管链接 https://gitee.com/The-king-of-the-apocalypse/two_storehouse 六.实验总结 问题:对于像这种分区式的,工作明确的函数问题,如何保证他们的相互协调发展 解决办法:暂时无

Extending Justin’s Guide to MATLAB in MATH 240

Extending Justin’s Guide to MATLAB in MATH 240 - Part 41. MethodWe assume you are comfortable with (and remember or can review) commands used in the earlierprojects.2. New Commands(a) Eigenvalues can be found easily. If A is a matrix then:>> eig(A)w