DOC PREVIEW
UCLA STATS 100A - Hwk8

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Stat 100 -Intro ProbabilityHomework 8J. SanchezUCLA Department of StatisticsInstructions(1) Homework must be stapled. Two columns not allowed.(2) No late homework accepted under any circumstances. (There is NO R script file requested for this homework.). Hard copy (only) part with answers must be turned in in lecture the due time or before the deadline.(3) Hardcopy with answers must be handed in in person to prof. Sanchez at the beginning of lecture. Homeworkturned in at the end of lecture will get points deducted. No email, mailboxes, fax or other way of turning it in willbe allowed. If you need to turn in your homework early, please contact prof. Sanchez and make arrangementswith her.(4) Write your Last name, first name, ID, Hwk number, date and your section on the upper right corner of the hardcopyhomework. Your script file must conform to sample script file and also have your name inside and as a file name.(5) To get full credit, you must show work even when not asked and pay attention to the instructions and followthem. Points will be deducted for not following instructions given in each problem. You are also responsible foruploading your R script early. No hard copies of R scripts will be accepted. Excuses about individual technicaldifficulties will not be accepted. Plan to do it early to get help from us if needed.(6) Must answer problems in the order given. There should be no R code whatsoever in your hardcopy with answersturned in in lecture. Must use notation used in lecture.(7) It is ok to work with other students for homework but each student must turn in their own writing of the problems.Evidence to the contrary will result in 0 points for all parties involved.(8) Hardcopy part of homework can be hand written or typed. If hand written, your writing must be neat and easy toread. You may not use double columns to write your answers.(9) The R script file must contain only code, comments on what the code is doing and separators (see sample filesseen).Exercises to turn inProblem 1. Machine Learning.Bayes theorem is sometimes used in classification of items where a system has already learnt the probabilities.Suppose there are two classes, y = 1 and y = 2 into which we can classify w, a new value of the item. By Bayestheorem, we can writeP(y = 1 | w) =P(y = 1 ∩ w)P(w)=P(y = 1)P(w | y = 1)P(w)P(y = 2 | w) =P(y = 2 ∩ w)P(w)=P(y = 2)P(w | y = 2)P(w)Dividing,P(y = 1 | w)P(y = 2 | w)=P(y = 1)P(w | y = 1)P(y = 2)P(w | y = 2)Our decision is to classify a new example into class 1 ifP(y = 1 | w)P(y = 2 | w)> 1or equivalently ifP(y = 1)P(w | y = 1)P(y = 2)P(w | y = 2)> 1which means that w goes into class 1 ifP(y = 1)P(w | y = 1) > P(y = 2)P(w | y = 2)1Stat 100 -Intro ProbabilityHomework 8J. SanchezUCLA Department of Statisticsandw goes into class 2 ifP(y = 1)P(w | y = 1) < P(y = 2)P(w | y = 2).WhenP(y = 1)P(w | y = 1) = P(y = 2)P(w | y = 2),the result is inconclusive.The conditional probabilities of P(w | y = 1) and p(w | y = 2) are assumed to be already learnt as are the priorprobabilities P(y = 1) and P(y = 2). If these can be accurately estimated, the classifications will have a high probabilityof being correct. For example, an e-mail spam filter has learned from past e-mails what proportion are spam (y=1)and which are not (y=2). It has also been tracking what proportion of those spam e-mails contain the sentence “clickhere“ (event w), thus knows p(w | y = 1). Similarly, it has been tracking what percentage of e-mails that are not spamcontain the same sentence, thus knows p(w | y = 2). In fact, many commercial spam filters are based on this basictraining based on past e-mails and Bayes theorem. With that information, answer the following question:Suppose the prior probabilities of being in either of the two classes are P(y = 1) = 0.4, and P(y = 2) = 0.6. Alsothe conditional probabilities for the new example w are P(w | y = 1) = 0.5 and P(w | y = 2) = 0.3. Into what classshould you classify the new example? Show the work.Problem 2. Suppose that a person throws a dart at a square dart board. Let X and Y denote, respectively, the x- andy-coordinates (in feet) of the location where the dart lands; the middle of the dart board is at (0,0). Suppose that thedart board is two feet wide and two feet tall, so that the dart only lands on the dart board if −1 ≤ X ≤ 1, −1 ≤ Y ≤ 1.Also suppose that the person always hits the dart board, and moreover, X and Y have joint density:f (x, y) =916(1 − x2)(1 − y2), for −1 ≤ X ≤ 1, −1 ≤ y ≤ 1 and f (x, y) = 0 otherwise.(a) Find theE(X + Y) =Z1x=−1Z1x=−1(x + y)916(1 − x2)(1 − y2)dxdy. You must do this integral showing the work, and provide a final number.(b) Find theVar(X + Y) =Z1x=−1Z1x=−1((x + y) − E(X + Y))2916(1 − x2)(1 − y2)dxdyYou must do this integral and provide a final number(c) Find E(X), E(Y), Var(X), Var (Y) and Cov(X, Y).(d) Confirm, using what you just found in part (c) that the answer to part (a) is the same as the answer toE(X + Y) = E(X) + E(Y)Var(X + Y) = Var(X) + Var(Y) + 2Cov(X, Y)(e) Find the probability that X < Y.Problem 3. A company offers a basic life insurance policy to its employees, as well as a supplemental life insur-ance policy. To purchase the supplemental policy, an employee must first purchase the basic policy. Let X denotethe proportion of employees who purchase the basic policy, and Y the proportion of employees who purchase thesupplemental policy. Let X and Y have the joint density function2Stat 100 -Intro ProbabilityHomework 8J. SanchezUCLA Department of Statisticsf (x, y) = 2(x + y) 0 < y < x < 1Given that 10% of the employees buy the basic policy, what is the probability that fewer than 5% buy the supplementalpolicy? Choose one and explain.(a) 0.4167(b) 0.102(c) 0.03(d) 0.97Problem 4. Consider an 8-hour work day. Alice and Bob each check their email just once per day. Let X and Ydenote the time, respectively, until Alice and Bob each check their emails during the day. Assume that Alice alwayschecks her email first, and that X and Y are uniform on the region where 0 < X < Y < 8. The joint density isf (x, y) = 1/32 0 < x < y < 8The expected value and variance of Y-X, which is the time interval between Alice and Bob checking their emailare, respectively,(a) 13, 34(b) 19/3, -30/3(c) 8/3, 32/9(d) 24/3, 16/3Select one and explain.Problem 5. The joint probability density function of X and Y isf (x, y) = e−(x+y), 0 ≤ x ≤ ∞; 0 ≤ y ≤ ∞.Find(a) P(X < Y)(b)


View Full Document

UCLA STATS 100A - Hwk8

Documents in this Course
HW09Key

HW09Key

3 pages

Normal

Normal

7 pages

clt

clt

3 pages

Load more
Download Hwk8
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Hwk8 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Hwk8 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?