2. (15 marks) Consider the following program: >> Precondition: x and y E Z. Postcondition: Return...
17. hy the correctness of the following program segment with the precondition and postcondition shown {x60 if x > 0 then y = 2 ** else y=(-2) *x end if {y >0} 18. Verify the correctness of the following program segment to compute x, the absolute value of x, for a nonzero number x. {r* 0 if x >= 0 then abs = r else abs = -x end if
Let z=5 where x, y, z E R. Prove that z? +z2+z?>
(b) Trace the following code. // Precondition: n > 0 // <method description here> public static int dothing (int n) { int ans = ; for (int x 1; x <= n; x++) ( for (int y = x; y <= n; y++) ( ans+ } return ans; } (ii) If you were asked to write a one-line description above this method, what would it be? (iii) Could you rewrite the method so that it runs more efficiently?
X Y Z iid Suppose for random variable X, P(X > a) - exp( random variable Y, P(Y > y) exp(-0y) for y > 0, and for random variable , P(Z > z)--exp(-фа) for z > 0. (a) Obtain the moment generating functions of X, Y and Z. (b) Evaluate E(X2IX > 1) and show it is equal to a quadratic function of λ. (c) Calculate P(X > Y Z) if λ-1, θ--2 and φ--3. -λα) for x > 0,...
b-a e-ylu f(y)= e for y > 0 and L* (u ) c=constant U 1=1 i=1 Prove the likelihood for u can be expressed as: tulo: D-ring 9: 1-9 Then derive the log-likelihood for u.
3. Use the mean value theorem to prove the following inequality. (1 +x)" >1 for z >0 andnEN
Could someone explain how these to get these phase portraits by hand with ẋ=y and ẏ=ax-x^2 especially for a=0 case where you have eigenvalues all equal to zero? 6.5.4 a>0 Sketch the phase portrait for the system x = ax-x, for a < 0, a = 0, and For a -(0 We were unable to transcribe this imageFor a>0 ES CS
PROBLEM 1 Let the joint pdf of (X,Y) be f(x, y)= xe", 0<y<<< a. Compute P(X>Y). b. What is the conditional distribution of X given Y=y? Are X and Y independent? c. Find E(X|Y = y). d. Calculate cov(X,Y).
Prove that A = B for: A = {(x,y) e Rº : +y/<1} B = {(z,y) € RP: (71+ y)² < 1}
Any help would be appreciated! Problem 4 Let (X, Y)~ N and Z = X1(XY > 0}-X1(XY < 0} (1) Find the distribution of Z (2) Show that the joint distribution of Y and Z is not bivariate normal.