0.025<p<0.05
f. What is the conclusion of the hypothesis test?
Reject Ho
Page 4 of 4
V1
3. (7 marks = 2+2+2+1) The researcher in Question 1 splits her sample into males and females.
Statistical summar
Exercises January 14
STA 4508S (Spring, 2014)
1. BNC 4.5 Suppose Yij , i = 1, . . . , m; j = 1, . . . , r are independent Bernoulli
random variables with
Pr(Yij = 1) =
ei +j
,
1 + ei +j
where m j = 0.
Exercises January 7
STA 4508S (Spring, 2014)
1. SM 4.3.3 Plot the likelihood for based on a random sample y1 , . . . , yn
from the density
f (y; ) =
1/(2c) c < y < + c,
0,
otherwise,
where c is a know
Exercise January 28
STA 4508S (Spring, 2014)
SM, Exercise 10.6.4. A model for over-dispersed binomial data can be obtained by assuming that R follows a Binomial(m, p) distribution, and p itself
follow
Exercise February 4
STA 4508S (Spring, 2014)
The data set heart in the R library MASS has the Stanford heart-transplant
data, a famous data set from the early 70s, that also appears in the survival
da
Edema is the
accumulation of uids in
body tissues.
10.8 - Survival Data 549
computed using only the risk set at time y_,-. A nonconstant plot of observed S_,- against
y,- suggests this type of model f
STA 4508: Likelihood and derived quantities
Given a model for Y which assumes Y has a density f (y; ),
the following denitions:
observed likelihood function
log-likelihood function
score function
obse
Exercises January 21
STA 4508S (Spring, 2014)
Suppose Yi = (Yi1 , . . . , Yid ) N (0, R), with Rij = 1, if i = j; , if i = j.
1. Show that the pairwise composite log-likelihood function takes the form
# Set random seed. Don't remove this line.
set.seed(1)
# Chop up iris in my_iris and species
my_iris <- iris[-5]
species <- iris$Species
# Perform k-means clustering on my_iris: kmeans_iris
kmeans_iri
f. What is the conclusion of the hypothesis test?
Reject Ho
Page 4 of 4
V1
3. (7 marks = 2+2+2+1) The researcher in Question 1 splits her sample into males and females.
Statistical summaries of the da
Page 4 of 4
V1
3. (7 marks = 2+2+2+1) The researcher in Question 1 splits her sample into males and females.
Statistical summaries of the data are shown below.
nx s
Females 14 7.20 0.50
Males 11 8.46
# iris is available from the datasets package
# Reveal number of observations and variables in two different ways
str(iris)
dim(iris)
# Show first and last observations in the iris data set
head(iris)
# Fit a linear model called on the linkedin views per day: linkedin_lm
linkedin_lm <- lm(linkedin ~ days)
# Predict the number of views for the next three days: linkedin_pred
future_days <- data.frame
# The cars data frame is pre-loaded
# Set random seed. Don't remove this line.
set.seed(1)
# Explore the cars dataset
str(cars)
summary(cars)
# Group the dataset into two clusters: km_cars
km_cars <-
# Apply the classifier to the avg_capital_seq column: spam_pred
spam_pred <- spam_classifier(emails$avg_capital_seq)
# Compare spam_pred to emails$spam. Use =
spam_pred = emails$spam
# linkedin is alr
# The cars data frame is pre-loaded
# Set random seed. Don't remove this line
set.seed(1)
# Group the dataset into two clusters: km_cars
km_cars <- kmeans(cars, 2)
# Add code: color the points in the
# The emails dataset is already loaded into your workspace
# Show the dimensions of emails
dim(emails)
# Inspect definition of spam_classifier()
spam_classifier <- function(x)cfw_
prediction <- rep(NA
# Set random seed. Don't remove this line.
set.seed(1)
# Take a look at the iris dataset
str(iris)
summary(iris)
# A decision tree model has been built for you
tree <- rpart(Species ~ Sepal.Length + S