studio 3 18 05 spring 2014 jeremy orloff and jonathan
play

Studio 3 18.05 Spring 2014 Jeremy Orloff and Jonathan Bloom - PowerPoint PPT Presentation

Studio 3 18.05 Spring 2014 Jeremy Orloff and Jonathan Bloom frequency density 4 0.4 3 0.3 2 0.2 1 0.1 x x .5 1.5 2.5 3.5 4.5 .5 1.5 2.5 3.5 4.5 Concept questions Suppose X is a continuous random variable. a) What is P ( a X


  1. Studio 3 18.05 Spring 2014 Jeremy Orloff and Jonathan Bloom frequency density 4 0.4 3 0.3 2 0.2 1 0.1 x x .5 1.5 2.5 3.5 4.5 .5 1.5 2.5 3.5 4.5

  2. Concept questions Suppose X is a continuous random variable. a) What is P ( a ≤ X ≤ a )? b) What is P ( X = 0)? c) Does P ( X = 2) = 0 mean X never equals 2? answer: a) 0 b) 0 c) No. For a continuous distribution any single value has probability 0. Only a range of values has non-zero probability. July 13, 2014 2 / 11

  3. Concept question Which of the following are graphs of valid cumulative distribution functions? Add the numbers of the valid cdf’s and click that number. answer: Test 2 and Test 3. July 13, 2014 3 / 11

  4. Solution Test 1 is not a cdf: it takes negative values, but probabilities are positive. Test 2 is a cdf: it increases from 0 to 1. Test 3 is a cdf: it increases from 0 to 1. Test 4 is not a cdf: it decreases. A cdf must be non-decreasing since it represents accumulated probability. July 13, 2014 4 / 11

  5. Exponential Random Variables Parameter: λ (called the rate parameter). Range: [0 , ∞ ). Notation: exponential( λ ) or exp( λ ). f ( x ) = λ e − λ x for 0 ≤ x . Density: Models: Waiting time P (3 < X < 7) .1 F ( x ) = 1 − e − x/ 10 1 x x 2 4 6 8 10 12 14 16 2 4 6 8 10 12 14 16 Continuous analogue of geometric distribution –memoryless! July 13, 2014 5 / 11

  6. Uniform and Normal Random Variables Uniform: U ( a , b ) or uniform( a , b ) Range: [ a , b ] 1 PDF: f ( x ) = b − a Normal: N( µ, σ 2 ) Range: ( −∞ , ∞ ] 1 − ( x − µ ) 2 / 2 σ 2 PDF: f ( x ) = √ e σ 2 π http://web.mit.edu/jorloff/www/18.05/applets/ probDistrib.html July 13, 2014 6 / 11

  7. Table questions Open the applet http://web.mit.edu/jorloff/www/18.05/applets/ probDistrib.html 1. For the standard normal distribution N(0 , 1) how much probability is within 1 of the mean? Within 2? Within 3? 2. For N(0 , 3 2 ) how much probability is within σ of the mean? Within 2 σ ? Within 3 σ . 3. Does changing µ change your answer to problem 2? July 13, 2014 7 / 11

  8. Normal probabilities within 1 · σ ≈ 68% Normal PDF within 2 · σ ≈ 95% within 3 · σ ≈ 99% 68% 95% 99% z σ − 3 σ − 2 σ − σ 2 σ 3 σ Rules of thumb: P ( − 1 ≤ Z ≤ 1) ≈ . 68, P ( − 2 ≤ Z ≤ 2) ≈ . 95, P ( − 3 ≤ Z ≤ 3) ≈ . 997 July 13, 2014 8 / 11

  9. Download R script Download studio3.zip and unzip it into your 18.05 working directory. Open studio3.r in RStudio. July 13, 2014 9 / 11

  10. Histograms Will discuss in more detail in class 6. Made by ‘binning’ data. Frequency : height of bar over bin = # of data points in bin. Density : area of bar over bin is proportional to # of data points in bin. Total area of a density histogram is 1. frequency density 4 0.4 3 0.3 2 0.2 1 0.1 x x .5 1.5 2.5 3.5 4.5 .5 1.5 2.5 3.5 4.5 July 13, 2014 10 / 11

  11. Histograms of averages of exp(1) 1. Generate a frequency histogram of 1000 samples from an exp(1) random variable. 2. Generate a density histogram for the average of 2 independent exp(1) random variable. 3. Using rexp(), matrix() and colMeans() generate a density histogram for the average of 50 independent exp(1) random variables. Make 10000 sample averages and use a binwidth of .1 for this. Look at the spread of the histogram. 4. Superimpose a graph of the pdf of N(1 , 1 / 50) on your plot in problem 3. (Remember the second parameter in N is σ 2 .) Code for the solutions is at http://web.mit.edu/jorloff/www/18.05/r-code/studio3-sol.r July 13, 2014 11 / 11

  12. ������������������ ������������������ ������������������������������������������������ ����������� ��������������������������������������������������������������������������������������������������

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend