Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MA 402 Midterm 1


Problem 1: (10 pts) Mark each of the following statements as TRUE or FALSE. You do not need to justify your answers, and there is no penalty for an incorrect guess.

i) In the IEEE double precision floating point system, every integer between 1 and realmax can be represented exactly.

ii) For all real numbers x between realmin and realmax, the IEEE system guarantees that Ifl(x) _ xI < 2 −53 IxI.

iii) When adding two nonzero numbers x and y, a small relative error in the inputs guarantees that the relative error of the sum will also be small.

iv) If E and F are independent events, then they are also mutually exclusive.

v) If fX  is the PDF of a random variable X, then 0 < fX (t) < 1 for all t e 皿.

vi) If a roulette wheel lands on red six times in a row, the seventh spin is statistically more likely to land on black.

vii) If X ~ u(0, 1) and Y = αX + β, then Y ~ u(β, α + β).

viii) For all random variables X and real numbers α and β, Var[αX + β] = α2Var[X].

ix) For all real numbers α and all vectors x, y e n , |αx _ y|1  < IαI|x|1 + |y|1 .

x) For all vectors x, y e n , |xT y|1  < |x|1 |y|1 .


Problem 2: (10 pts) Find the relative condition numbers of each of the following functions (on the respective domains where these functions are defined.) Noting that 1030  cannot be stored exactly as an IEEE double precision floating point number, for which of the functions (possibly more than one) will evaluating fk(1030 ) in IEEE double precision arithmetic be unlikely to yield an accurate answer? Explain your reasoning, using IEEE roundoff rules and condition numbers as part of your explanation.

a) f1 (x) = sin(x)              b) f2 (x) = |3x


c) A cannon at ground level fires a cannonball at precisely v0  = 80 m/s at an angle of about θ ≈ π/12 radians.  In an idealized system, the distance traveled before the cannonball hits the

ground is given by

d(θ) = ,    g ≈ 9.80665 m/s2 .

Assume that v0  and g are known exactly.  What is the absolute condition number of d(.) at θ?  If you want to compute the flight distance to within 1 meter, about how accurately do you have to measure the angle θ?




Problem 3: (10 pts) For x = [x1 , x2] e 2, let f (x) = Ix1  _ x2 I _ Ix2 I.  Write down the three properties that all norms must satisfy, and determine with justification whether f (.) satisfies each of those properties.  (Don’t forget that positive definiteness has two parts two it. As for potential counterexamples, try cases where x1 = 0 or where x1 = x2 .)




Problem 4: (10 pts) Consider a game where you flip two fair coins. If they both land on heads, you win 7 dollars.  If they both land on tails, you lose 3 dollars.   Otherwise, nothing happens. Assume the outcomes of the two flips are independent.

a) If X  represents the amount of money you win, provide a table or sketch a graph of the probability mass function (PMF) of X .

b) What is 匝[X]?

c) What is Var[X]?

d) If you play this game 1000 times, what are your expected winnings overall?

e) If you play this game 1000 times, use the Central Limit Theorem to estimate the probability that you win at least 800 dollars.



Problem 5: (10 pts) Let X be a continuous random variable with PDF

,

a) What value of α makes fX (t) a valid PDF?

b) What is the CDF of X? Remember to cover all cases!

c) What is Pr[X > 2/3]?

d) What is 匝[X]?

e)  Set up an integral that will allow you to find Var[X]. You do not have to solve it.

f)  Just based on a sketch of fX (t) on [0, 1] and without doing any computations, give an estimate of the standard deviation of X . Explain the reasoning behind your estimate.



Problem 6: (10 pts)

a)  Represent the number _19.5 in IEEE double precision floating point format.  You may find the following table useful:


(_1)s (1.f)2 . 2e − 1023

(_1)s (0.f)2 . 2 − 1022 v = (_1)s . 0

(_1)s o

,NaN


1 < e < 2046

e = 0, f 0

e = 0, f = 0      .

e = 2047, f = 0

e = 2047, f 0


b) What number is represented by the double precision floating point number

0  01111111010  1010000000000000000000000000000000000000000000000000   ?

╱.

49


c) What number is represented by the double precision floating point number

0  00000000000  1010000000000000000000000000000000000000000000000000   ?

╱.

49



Problem 7: (10 pts) For parts (a)–(d), evaluate the following expressions in MA 402 Tiny Arith- metic. You may find the Tiny Precision number line below useful, where every Tiny number greater than or equal to 1 is shown by a tick mark.  For full credit,  show the intermediate  quantities  that are computed, not just the final answer.

a)  (7 + 4) + 1

b)  (14 + 3) _ 5

c)  (14/5) x 2.5

d)  (9/2)/3


_o _14 _23 _22 212 0 0 20 21 22 23 14 +o


e) Give an example of an integer (which can be represented exactly in IEEE double precision) that is divisible by 2 but not “even” in the sense that its final bit is zero. Hint: it will have to be pretty large.