NF 18 thankyou
1. (i) Define the terms "sample space" and "random event". Give an example of each. [5 marks] (il) You perform the following experiment: you take a six-sided die, and roll it. If the number that comes up is six, you stop; otherwise you repeat. (a) What is the probability that you roll the die once and then the experiment stops? What is the probability that you roll the die 5 times before the experiment stops? [5 marks] (b) Suppose now that you roll three dice and stop when one or more of the dice come up six. What is the probability that you roll the dice 5 times before the experiment stops ? [5 marks] (ili) Define the conditional probability of an event and state Bayes Rule. [5 marks] (iv) Suppose two websites A and B take hotel bookings. Site A takes 60% of all bookings and site B takes 40%. However, only 75% of the bookings made on site A result in positive reviews after the hotel stay, while on site B it is 90%. Given that a booking received a positive review, what is the probability that booking was made on site B ? Hint: use Bayes Rule. [5 marks] 2. (i) Define the term "random variable" and give an example. What is the probability mass function of a discrete random variable ? Give an example. [5 marks] (ii) Define what it means for two random variables to be independent. [5 marks] Let X and Y be independent random variables that take values in the set (1,2,3). Assume that X and Y are uniformly distributed on (1, 2, 3) i.e. the probability of each value occurring is the same. Let V =2X+2Y. (a) Are V and X independent? Explain using the definition of independence given above. [10 marks] (b) Compute the PMF of V. [5 marks] 3. A web server is connected to the internet via two links. The server is required to serve an object consisting of n packets to a client and has to choose which link to send the n packets across. The time taken to send the n packets across link i is 7, = >"_, X," where X,") is a random variable whose value is the time that would be taken to send packet j across link i. (i) Suppose the transmit times X, "),/ = 1,2, ... on link 1 are independent and identically distributed with mean 0.1 and variance 0.05.(a) What is the expected value of Ti ? Hint: use the linearity of the expectation i.e. that E[X+Y]=E[X]+E[Y]. [5 marks] (b) What is the variance of T1 ? Hint: use the linearity of the variance when variables are independent i.e. that var(X+Y)=var(X)+var(Y). [5 marks] (ii) Using Chebyshev's inequality give an upper bound on the probability that To is greater than or equal to 0.5n. Recall that for random variable X Chebyshev's inequality is: P(| X - H | 2k) S E[(X- u)?]/k? where u=E[X]. [5 marks] (iii) (a) Calculate the expected value and variance of Ti. [5 marks] (b) As the number of packets n goes to infinity, explain what Chebyshev's inequality tells us about the probability that Ti is greater than its expected value ? Hint: recall the weak law of large numbers. [5 marks] 4. Suppose that we observe data (xi, yi), i=1,2,..,n for n people sampled from the population, where x is the distance of the person's home from Dublin city centre, and yi=1 if the i'th person has visited TCD in the last year and 0 otherwise. We model y as an observation of random variable Y and x as an observation of random variable Xi. Recall that a logistic regression classifier uses the model P(Yi=y [X/=xi) = 1/(1+exp(-yz;)) with z;=0xi, 0 a parameter and y either 0 or 1. (i) Assume the Y's are independent and that parameter 0 is known. Using the above model write an expression for the likelihood P([Yi=yi, i=1,2,...,n) | {Xi=xi, i=1,2,...n), 0) i.e. for the probability that data yi, i=1,2,..,n is observed under this model. [5 marks] (ii) Now suppose parameter 0 is not known. What is meant by the maximum likelihood estimate of parameter 0? [5 marks] (iii) Suppose that in addition to the distance of their home from Dublin we also know for person i the number wi of their children who currently study at TCD. Describe how we can modify the above logistic regression classifier to include this information. Hint: we now have two inputs/features x and wi- [5 marks] (iv) This type of logistic model is often said to be most effective for linearly separable data. Explain what linearly separable means, giving an example. What can happen if the data is not linearly separable ? [5 marks] (v) Suppose the data is not linearly separable. How might we change the inputs/features used in the model to accommodate this ? [5 marks]