Midterm II Statistics 449 (Winter 2016)
*FJ
Name: Q
I
Instructions: Show all work to receive credit. Partial credit may be given where work is
shown. Use the chi-square table where needed. Most calculators use LN for the natural log.
Total points: 7'5
1)

Homework 3 Solutions
1
1
0
Sample Logit
2
3
1a) The plot of the sample logits against x is given below followed by the R code. There
appears to be a linear trend.
24
26
28
30
Crab Width
y <- c(5,4,17,21,15,20,15,14)
ny <- c(9,10,11,18,7,4,3,0)
ymat <- cbi

Homework 3 Solutions
1a) The R code and the plot of x against the sample logits are given below. There appears
to be a linear trend, so we will t the model that treats age as a continuous variable.
yes <- c(1,2,3,5,6,5,13,8)
no <- c(9,13,9,10,7,3,4,2)
yma

Midterm I Statistics 449 (Winter 2016)
Name: l' e 3
Instructions: Show all work to receive credit. Partial credit may be given, but work must
be shown. Use the chi-square table where needed. Most calculators use LN for the natural
logarithm. For any stati

It is this adapting of absurd ` knots ' and patterns from old books to any
surface where a flower garden has to be made that leads to bad and frivolous
design - wrong in plan and hopeless for the life of plants .
Many small investors are facing a double w

STATS 449 - Lecture 22
STATS 449 - Lecture 22 p. 1/27
Proportional Hazards Regression
STATS 449 - Lecture 22 p. 2/27
Introduction
b
In this lecture we study the proportional hazards model for censored survival data
b
This model is often called the Cox mod

STATS 449 - Lecture 17
STATS 449 - Lecture 17 p. 1/19
Practice With Bayesian Data Analysis
STATS 449 - Lecture 17 p. 2/19
Introduction
b
Lecture 16 was designed to be an introduction to Bayesian data analysis
b
The purpose was to show what BDA is, and how

STATS 449 - Lecture 13
STATS 449 - Lecture 13 p. 1/44
Binary Logistic Regression
STATS 449 - Lecture 13 p. 2/44
Introduction
b
Until now, our study of logistic regression has focused on the analysis of
categorical data, sometimes called grouped data
b
Tha

Pump Data Example
The data below show number of failures of pumps at a power plant for 10 pumps. Two
dierent kinds of pumps were in use. Also shown is the length of operation in thousands
of hours for each pump.
y = number of pump failures
t = length of o

STATS 449 - Lecture 12
STATS 449 - Lecture 12 p. 1/34
Loglinear Models 2
STATS 449 - Lecture 12 p. 2/34
Collapsibility in Three-Way Contingency Tables
b
From our previous work, we know that associations in partial tables may differ
from marginal associati

Likelihood Ratio Tests
The Likelihood Ratio Test (LRT) is one of the most common tests used for
making statistical inference. For normal theory linear regression models, the
F-test is a LRT.
In our class, we have t many kinds of regression models. But the

Page 1
STAT 406: HW3
All computer code should be written using the language R. Type ALL your
code into one PLAIN Text format file. Plain text format is available by
default in R. Please do not use Microsoft Word .doc format or .rtf format of
.pdf format.

STATS 449 - Lecture 19
STATS 449 - Lecture 19 p. 1/28
Introduction To Survival Analysis
STATS 449 - Lecture 19 p. 2/28
What Is Survival Analysis ?
b
Survival Analysis is a class of statistical methods for studying the occurrence
and timing of events
b
The

STATS 449 - Lecture 21
STATS 449 - Lecture 21 p. 1/32
Parametric Regression Models for
Censored Survival Data
STATS 449 - Lecture 21 p. 2/32
Introduction
b
R can be used to produce estimates for parametric regression models with
censored survival data usi

STATS 449 - Lecture 15
STATS 449 - Lecture 15 p. 1/31
Logistic Regression for Matched
Case-Control Pairs
STATS 449 - Lecture 15 p. 2/31
Introduction
b
In the Prime Minister approval example in the previous lecture, the data for each
matched pair came from

STATS 449 - Lecture 18
STATS 449 - Lecture 18 p. 1/23
More Practice with Bayesian Data Analysis
STATS 449 - Lecture 18 p. 2/23
A Bioassay Experiment
b
In development of drugs and other chemical compounds, bioassay
experiments are commonly performed on ani

STATS 449 - Lecture 11
STATS 449 - Lecture 11 p. 1/29
Loglinear Models 1
STATS 449 - Lecture 11 p. 2/29
Loglinear Models for the 2x2 Table
STATS 449 - Lecture 11 p. 3/29
Notation for the 2x2 Table
b
The cell frequencies are denoted by nij and the expected

STATS 449 - Lecture 16
STATS 449 - Lecture 16 p. 1/22
Introduction to Bayesian Data Analysis
STATS 449 - Lecture 16 p. 2/22
Background
b
Until now, we have been fitting logistic (logit) and loglinear regression models to
categorical data
b
The utility of

STATS 449 - Lecture 20
STATS 449 - Lecture 20 p. 1/21
Estimating and Comparing Survival Curves
STATS 449 - Lecture 20 p. 2/21
Introduction
Survival curves are useful for
b
Preliminary examination of the data
b
Computing derived quantities from regression

STATS 449 - Lecture 14
STATS 449 - Lecture 14 p. 1/18
Matched Pairs Data
STATS 449 - Lecture 14 p. 2/18
Introduction
b
We now introduce methods for comparing categorical responses for two samples
when each sample has the same subjects (repeated measures)

STATS 449
1 / 22
The Likelihood Ratio Test
2 / 22
Hey Man !
Is Paul Green Really Steve Jobs ?
3 / 22
Why ?
Spock, why do we study statistics ?
Captain, because its cool .
4 / 22
Introduction
The Likelihood Ratio Test (LRT) is one of the most common tests

Homework 6 (Due 4-4)
Instructions: Use R for all problems in this homework. Show R code and output where
relevant. Late homework cannot be accepted.
1) The data for this problem are in the file leuk.csv and are stored on Canvas in the Data
folder. These d

Page 1
STAT 406: HW5
All computer code should be written using the language R. Type ALL your
code into one PLAIN Text format file. Plain text format is available by
default in R. Please do not use Microsoft Word .doc format or .rtf format of
.pdf format.

HomeworkSet7
Statistics408
Winter2015
1. Describe how the range, mean absolute deviation, the varianceandtheentropymeasures
arecalculatedasmeasuresofvariation.
Th
sh is
ar stu
ed d
vi y re
aC s
o
ou urc
rs e
eH w
er as
o.
co
m
Therangeofacollecteddatasetc

Page 1
STAT 406: HW2
All computer code should be written using the language R. Type ALL your
code into one PLAIN Text format file. Plain text format is available by
default in R. Please do not use Microsoft Word .doc format or .rtf format of
.pdf format.

ECON251
FALL 2016
SAMPLE MIDTERM EXAM SOLUTIONS
Name and Student ID (as it appears in the Registrar):
Instructions
This exam consists of 9 pages in total. Please, check the number of pages of your exam
and contact the exam proctor if your exam has any mis

Homework 2 Solutions
1) The SAS code is shown below
1a) The odds ratio is 3.71 and the 95% CI is (2.14, 6.45). The odds of death are about 3.71
times greater for those who took the standard treatment compared to those who took the
new drug. The result is

Homework 5 / Practice Problem 2 Solutions
1.0
1a) Kaplan-Meier estimates are shown in the plot below. For the treatment group the estimated
probability a patient remains in remission for 15 weeks or greater is 0.69. For the placebo group
the estimated pro

Homework 4 Solutions
1a) The time series plots of and and the posterior density plot of are shown below.
The posterior mean of is 1.042 and the standard deviation is 0.6511. Answers may vary
slightly due to simulation.
1b) The correlation between the simu

STATS 449 - Lecture 8
STATS 449 - Lecture 8 p. 1/25
Three-Way Contingency Tables
STATS 449 - Lecture 8 p. 2/25
Introduction
An important part of most research studies is the choice of control variables
This lecture generalizes Lecture 7 about 2 2 continge