å 1 13 Practice Final Examination Solutions - = CS109 Dec 5, 2018

Similar documents
Random Variables. ECE 313 Probability with Engineering Applications Lecture 8 Professor Ravi K. Iyer University of Illinois

2. Independence and Bernoulli Trials

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand DIS 10b

CHAPTER 6. d. With success = observation greater than 10, x = # of successes = 4, and

UNIVERSITY OF OSLO DEPARTMENT OF ECONOMICS

D KL (P Q) := p i ln p i q i

Logistic regression (continued)

Lecture 9. Some Useful Discrete Distributions. Some Useful Discrete Distributions. The observations generated by different experiments have

Bayes (Naïve or not) Classifiers: Generative Approach

Third handout: On the Gini Index

1 Solution to Problem 6.40

Special Instructions / Useful Data

Econometric Methods. Review of Estimation

Channel Models with Memory. Channel Models with Memory. Channel Models with Memory. Channel Models with Memory

Chapter 14 Logistic Regression Models

Parameter, Statistic and Random Samples

Lecture 3. Sampling, sampling distributions, and parameter estimation

1 Onto functions and bijections Applications to Counting

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

Homework 1: Solutions Sid Banerjee Problem 1: (Practice with Asymptotic Notation) ORIE 4520: Stochastics at Scale Fall 2015

Chapter 5 Properties of a Random Sample

STK3100 and STK4100 Autumn 2017

Mu Sequences/Series Solutions National Convention 2014

CS 2750 Machine Learning Lecture 5. Density estimation. Density estimation

Ordinary Least Squares Regression. Simple Regression. Algebra and Assumptions.

8.1 Hashing Algorithms

Lecture 3 Probability review (cont d)

Ideal multigrades with trigonometric coefficients

= lim. (x 1 x 2... x n ) 1 n. = log. x i. = M, n

9 U-STATISTICS. Eh =(m!) 1 Eh(X (1),..., X (m ) ) i.i.d

Qualifying Exam Statistical Theory Problem Solutions August 2005

Maximum Likelihood Estimation

UNIVERSITY OF OSLO DEPARTMENT OF ECONOMICS

Class 13,14 June 17, 19, 2015

STK4011 and STK9011 Autumn 2016

THE ROYAL STATISTICAL SOCIETY 2016 EXAMINATIONS SOLUTIONS HIGHER CERTIFICATE MODULE 5

MATH 371 Homework assignment 1 August 29, 2013

{ }{ ( )} (, ) = ( ) ( ) ( ) Chapter 14 Exercises in Sampling Theory. Exercise 1 (Simple random sampling): Solution:

Application of Generating Functions to the Theory of Success Runs

Chapter 5 Properties of a Random Sample

STK3100 and STK4100 Autumn 2018

UNIT 2 SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS

Chapter 3 Sampling For Proportions and Percentages

hp calculators HP 30S Statistics Averages and Standard Deviations Average and Standard Deviation Practice Finding Averages and Standard Deviations

Generative classification models

X ε ) = 0, or equivalently, lim

Summary of the lecture in Biostatistics

Chapter 4 Multiple Random Variables

Feature Selection: Part 2. 1 Greedy Algorithms (continued from the last lecture)

Dr. Shalabh Department of Mathematics and Statistics Indian Institute of Technology Kanpur

CHAPTER VI Statistical Analysis of Experimental Data

Point Estimation: definition of estimators

Bounds on the expected entropy and KL-divergence of sampled multinomial distributions. Brandon C. Roy

Pr[X (p + t)n] e D KL(p+t p)n.

CHAPTER 4 RADICAL EXPRESSIONS

Simple Linear Regression

Functions of Random Variables

CS 109 Lecture 8 April 13th, 2016

7.0 Equality Contraints: Lagrange Multipliers

Midterm Exam 1, section 2 (Solution) Thursday, February hour, 15 minutes

1. A real number x is represented approximately by , and we are told that the relative error is 0.1 %. What is x? Note: There are two answers.

Lecture Note to Rice Chapter 8

LINEAR REGRESSION ANALYSIS

The Mathematical Appendix

Lecture 02: Bounding tail distributions of a random variable

ρ < 1 be five real numbers. The

X X X E[ ] E X E X. is the ()m n where the ( i,)th. j element is the mean of the ( i,)th., then

Multivariate Transformation of Variables and Maximum Likelihood Estimation

Midterm Exam 1, section 1 (Solution) Thursday, February hour, 15 minutes

2SLS Estimates ECON In this case, begin with the assumption that E[ i

CS286.2 Lecture 4: Dinur s Proof of the PCP Theorem

TESTS BASED ON MAXIMUM LIKELIHOOD

IS 709/809: Computational Methods in IS Research. Simple Markovian Queueing Model

LECTURE - 4 SIMPLE RANDOM SAMPLING DR. SHALABH DEPARTMENT OF MATHEMATICS AND STATISTICS INDIAN INSTITUTE OF TECHNOLOGY KANPUR

For combinatorial problems we might need to generate all permutations, combinations, or subsets of a set.

Computations with large numbers

Exercises for Square-Congruence Modulo n ver 11

MS exam problems Fall 2012

PTAS for Bin-Packing

Entropy, Relative Entropy and Mutual Information

Module 7. Lecture 7: Statistical parameter estimation

M2S1 - EXERCISES 8: SOLUTIONS

5 Short Proofs of Simplified Stirling s Approximation

NP!= P. By Liu Ran. Table of Contents. The P versus NP problem is a major unsolved problem in computer

MATH 247/Winter Notes on the adjoint and on normal operators.

Lecture Notes Types of economic variables

NP!= P. By Liu Ran. Table of Contents. The P vs. NP problem is a major unsolved problem in computer

L(θ X) s 0 (1 θ 0) m s. (s/m) s (1 s/m) m s

1. The weight of six Golden Retrievers is 66, 61, 70, 67, 92 and 66 pounds. The weight of six Labrador Retrievers is 54, 60, 72, 78, 84 and 67.

best estimate (mean) for X uncertainty or error in the measurement (systematic, random or statistical) best

Part I: Background on the Binomial Distribution

Dimensionality Reduction and Learning

THE ROYAL STATISTICAL SOCIETY GRADUATE DIPLOMA

Law of Large Numbers

CIS 800/002 The Algorithmic Foundations of Data Privacy October 13, Lecture 9. Database Update Algorithms: Multiplicative Weights

To use adaptive cluster sampling we must first make some definitions of the sampling universe:

Chapter -2 Simple Random Sampling

Mean is only appropriate for interval or ratio scales, not ordinal or nominal.

Lecture 4 Sep 9, 2015

THE ROYAL STATISTICAL SOCIETY 2009 EXAMINATIONS SOLUTIONS GRADUATE DIPLOMA MODULAR FORMAT MODULE 2 STATISTICAL INFERENCE

Transcription:

Chrs Pech Fal Practce CS09 Dec 5, 08 Practce Fal Examato Solutos. Aswer: 4/5 8/7. There are multle ways to obta ths aswer; here are two: The frst commo method s to sum over all ossbltes for the rak of the frst card draw multled by the robablty that the secod card has greater rak, gve the rak of the frst card. The frst card draw ca be of ay of the 3 raks wth equal robablty /3. Let be the rak of the frst card. After the frst card s chose, 5 cards rema, of whch 43 have a rak greater tha. 3 Rak of frst card Rak of secod card > Rak of 3 3 æ ö ç 3 43 4 4 3 3 3 5 35 35 è ø frst card 4 æ ç3 35 è 34 ö ø 4 5 3 7 4 5 8 7 The secod method s to solve ths roblem usg symmetry. After the frst card s draw, there are 5 cards remag. Of those 5 cards there are 48 5 3 that have a rak dfferet rak tha the frst card draw. For a radomly chose rak for the frst card, by symmetry, half of the remag cards 4 48/ wll have a rak hgher tha the frst card, gvg us 4/5.

. a. I order to sell the share of HCI exactly 4 days after buyg t, t meas that the frst two days after buyg t must have cluded oe day of creasg rce deote that as U ad oe day of decreasg rce deoted that by D, the followed by two cosecutve days of creasg or decreasg rce. Thus the ossble outcomes are: Sell o day 4 UDUU DUUU UDDD DUDD 3 3 b. There are two commo ways to comute ths. The frst s to defe a recurrece relato. Namely, the robablty you evetually sell for a ga s the robablty that you ether have two U days a row, or that you have a U day ad a D day so the stock s aga at the startg rce of $0, multled by the robablty that you evetually sell for a ga. Formally, ths ca be wrtte as: sell for $ UU sell for $ ad UD sell for $ ad DU sell for $UD sell for $DU sell for $ sell for $ sell for $ Let sell for $, ad solve for yeldg: / / / / So, sell for $ A secod smler way to comute ths s usg the odds that whe we sell, we are sellg for a ga. Here we essetally gore cacel out ars comosed of a U ad a D before the sale, ad smly focus o whether the two days that determe the sale are Us or Ds. Formally, we have the followg whch mmedately gves us the aswer: sell for $ Us/ Us Ds

3 3. Let A umber of tye W maches o "watch lst" Let B umber of tye maches o "watch lst" Note that A ~ B0, 0. ad B ~ B0, 0.. Thus, we have: E[A] 00. ad E[B] 00. a. Sce A ad W are deedet ad B ad are deedet: E[Y] E[A]E[W] E[B]E[] 4 5 8 0 8 b. We ca defe radom varable C Wa Wb Wc. Notg that all W are deedet, we have that: C ~ Po4 Po4 Po4 Po Here, Y C, so we have: Y ³ 0 C ³ 0 0 e! c. We ca defe radom varable D a b c. Notg that all are deedet, we have that: D ~ N5, 3 N5, 3 N5, 3 N5, 9 Sce the are Normally dstrbuted to beg wth, they are cotuous varables ad so s ther sum. So, comutg a robablty volvg the sum, there s o eed to aroxmate a dscrete quatty usg a cotuty correcto. Here, Y D, so we have: 0 5 Y ³ 0 D ³ 0 D < 0 Z < Z <.67 9 f.67» 0.955 0.0475 Here s what you would have gotte f you had used the cotuty correcto whch ths artcular case, we gave full credt for whe gradg the roblem: 9.5 5 Y ³ 0 D ³ 9.5 D < 9.5 Z < Z <.5 9 f.5» 0.933 0.0668

4 4. Let dcator varable f the th teger geerated s a, ad 0 otherwse. Let dcator varable Y f the th teger geerated s a 5, ad 0 otherwse. Note that ad lkewse Y Y a. Note: E[] /5 ad lkewse E[Y] Y /5. Also ote: E[, Y] 0 wheever, sce a ad 5 caot both be the th teger. Cov, Y E[ Y] E[] E[Y] ì ï í ï î 5 0 whe, sce E[ Y otherwse whe ¹ ] 0 whe, by deedece So, Cov, Y Cov, Y Cov, Y Cov, Y 5 5 b. By defto: r, Y Cov, Y Var Var Y We ote that ~ Ber /5 ad lkewse Y ~ Ber /5 Thus, Var VarY /54/5 4/5 Sce ad all the are deedet: Var Var 4/5 Also, VarY Var 4/5 So, r, Y / 5 4 / 5 / 5 4 / 5 4

5 5. Let the umber of maches we urchase. Let Y the total umber of weeks we use that the th mache urchased utl t des. Note that: We wat to comute a exresso for, such that: Y > 000 > 000 ³ 0.95 Y ù Note that E[] ê é E Y ú E[Y] 00 ë û ù Smlarly, Var. Sce all Y ê é Var Y ú are deedet, we have: ë û ù ê é Var Y ú VarY 5. Thus, Var 5. ë û Now, we aly the Cetral Lmt Theorem: > 000 Y 00 000 00 400 0 > Z > 5 5 Y > 000 We wat to have: 400 0 400 0 400 0 Z > ³ 0.95 Þ Z ³ 0.95 Þ F ³ 0.95 Notg that F C F C, we obta: 0 400 0 400 F ³ 0.95 Þ ³.645, sce F.645» 0.95. Here we wat to determe the mmal value of satsfyg the equalty above. 00 400 Clearly, 0 s too small, sce 0. We cosder, gvg us: 0 0 400 40 400 0 0 0. We kow that 5, so ³ 4 ³. 645, so 5 maches s suffcet to gve us > 000 ³ 0.95.

6 6. Let value retured by Near. E[] So, E[] 0 /4 4 E[6 ] E[8 ] /4 4 6 E[] 8 E[] /40 E[] 5 /E[] E[ ] /4 4 E[6 ] E[8 ] /44 6 36 E[] E[ ] 64 6E[] E[ ] /40 8E[] E[ ] /40 80 E[ ] /4400 E[ ] 00 /E[ ] So, E[ ] 00 00 a. E[Y] So, E[Y] 9 /3 E[ ] E[4 Y] /3 E[] 4 E[Y] /38 E[] E[Y] /38 0 E[Y] 8/3 /3E[Y] b. E[Y ] /3 E[ ] E[4 Y ] /34 4 4E[] E[ ] 6 8E[Y] E[Y ] /34 40 E[ ] 89 E[Y ] /336 00 E[Y ] /3336 E[Y ] So, E[Y ] 336/ 68 VarY E[Y ] E[Y] 68 9 68 8 87

7 7. a. 0 /4 6/64 3 3/4/4 3/8 6/6 4/64 4 3/4/43/4 9/3 8/64 5 3/4/4/4 3/3 6/64 b. E[] 0 6/64 34/64 48/64 56/64 38/64 03/3 c. I the geeral case:, sce we eed to hash strgs wthout ay collsos, ad the get a collso o the last th strg hashed. Note that the roduct above could be wrtte wth ether a or as the to dex. Ether form s equvalet, sce the form wth as the to dex ust does a extra multlcato of the roduct by /. Usg the defto of exectato, we have: 5 P P or ø ö ç ç è æ Õ Õ ø ö ç ç è æ or ] [ P E!!

8 8. a. The mass fucto for the Geometrc dstrbuto wth gve arameter s, where 0. The lkelhood fucto to maxmze s: So, the loglkelhood fucto to maxmze s: Takg the dervatve of LL w.r.t., ad settg t to 0, yelds: Solvg for gves us: b. We have: f Õ L LL ] log [log 0 ] [ LL Þ MLE Þ ú û ù ê ë é 4 0 5 0 5 MLE

9 9. a. The lkelhood fucto s the robablty mass fucto of a Beroull wth robablty : b. Usg cha rule: Lkelhood S S Log Lkelhood S log S log @LL @a @LL @ @ @a Just lke a dee learg etwork: @ S S @a c. Usg cha rule: Starg wth the equato for @ @ a d @a @a You ca otoally reduce your equatos further. If you substtute ad cacel you wll get that: @ S @a @LL @d @LL @ @ @d Ths art s the same: @ S S @a Startg wth the equato for : @ @ a d @d @d You ca otoally reduce your equatos further. If you substtute ad cacel you wll get that: @ S @d

0 d. Use ca estmate the value of all arameters usg gradet ascet. Gradet ascet reeatedly takes a ste alog the gradet wth a fxed ste sze. Just lke whe we mlemeted logstc regresso, we ca rogram our closed form mathematcal soluto for gradets to effcetly calculate the gradet for ay values of our arameters.