18.01 Section, November 30, 2015 Section leader: Eva Belmont (ebelmont@mit.edu, E18-401B) . Midterm 4 review, part 1: Fourier approximation, probability, moving averages Review • Fourier series: a + a1 cos(x) + b1 sin(x) + a2 cos(2x) + b2 sin(2x) + . . . where Z 2π Z Z 1 1 2π 1 2π a= f (x) dx ak = cos(kx)f (x) dx bk = sin(kx)f (x) dx 2π 0 π 0 π 0 R∞ • Probability density function: p(x) ≥ 0 such that −∞ p(x) dx = 1. • Normal distribution: p(x) = s√12π e− R∞ • Expectation: E = −∞ x p(x) dx R∞ • Variance: −∞ (x − E)2 p(x) dx √ • Standard deviation: Variance (x−µ)2 2s2 with mean µ and standard deviation s • Moving average of f with window size h: (T f )(x) = 1 h R x+h x f (u) du Problems 1. I sample the following amplitudes of a 2π-periodic wave: 0 2π 7 ·1 2π 7 ·2 2π 7 ·3 2π 7 2π 7 ·4 −13.00 11.38 30.21 29.30 9.34 ·5 2π 7 ·6 −14.64 −24.58 Estimate its first-order Fourier approximation (that is, just constant term, cos x, and sin x). 1 2. I have a “random number generator” that generates numbers between 0 and 2. It is uniformly distributed on the intervals [0, 1] and [1, 2] but you are twice as likely to get a random number in [1, 2] as in [0, 1]. (a) Write down the probability density function for this situation, and draw it. (b) Write an integral expressing the expected value. (c) Using the fact that the answer to (b) is 67 , write an integral for the standard deviation. q (d) Using the fact that the answer to (c) is 11 36 ≈ 0.55277, find the probability of getting a number that is at least one standard deviation above the mean. 3. Let f be the 2π-periodic function defined by f (x) = 2x on [−π, π]. Calculate the moving average with window size 0.1, for −π ≤ x ≤ π. What is the period of T f ? 4. Bonus question: Come up with a non-constant function such that the moving average T1 f (x) with window size 1 is a constant function. Is it possible to have a non-constant function such that the moving averages T fh (x) are constant for all window sizes h? 2