# UCLA Coefficients Independent Variables and Classification Methods Worksheet

Description

3 questions(Do it by hand… you may use R for double-checking, if you want)
A sample of size n = 6 contains two independent variables X1, X2 and one categorical
response variable Y . However, response for the 3rd sampling unit is missing.
X1 -2 -1 0 1 2 3
X2 2 -2 0 0 3 2
Y B B ??? A A B
Your task is to reconstruct the missing Y3 by different classification methods.
(a) Predict Y3 by KNN method with k = 1.

(b) Predict Y3 by KNN method with k = 3.
(c) Logistic regression, without the 3rd sampling unit, produced the following results.
> z = 1*(y==“B”)

> lreg = glm( z ∼ x1 + x2, family=binomial)

> summary(lreg)
Coefficients:
(Intercept)
x1

x2
Estimate the probability that Y3 = “B”.
Estimate
0.8373
-0.4494
-0.0778
(d) Suppose that X1 and X2 are independent Normal random variables with the same
variance σ2 = 1. Assuming equal prior probabilities P(A) = P(B) = 0.5, predict Y3 by
the linear discriminant analysis.

1 attachmentsSlide 1 of 1attachment_1attachment_1

Unformatted Attachment Preview

attachment

Tags:
logistic regression

independent variables

categorical response

classification methods

independent normal

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

## Reviews, comments, and love from our customers and community:

This page is having a slideshow that uses Javascript. Your browser either doesn't support Javascript or you have it turned off. To see this page as it is meant to appear please use a Javascript enabled browser.

Peter M.
So far so good! It's safe and legit. My paper was finished on time...very excited!
Sean O.N.
Experience was easy, prompt and timely. Awesome first experience with a site like this. Worked out well.Thank you.
Angela M.J.
Good easy. I like the bidding because you can choose the writer and read reviews from other students
Lee Y.
My writer had to change some ideas that she misunderstood. She was really nice and kind.
Kelvin J.
I have used other writing websites and this by far as been way better thus far! =)
Antony B.
I received an, "A". Definitely will reach out to her again and I highly recommend her. Thank you very much.