HOMEWORK 4 STAT 305B Spring 2016 Due 3/10(R) Name_________________________________________ PROBLEM 1 (35pts) [See book Problem 5-55 on p.183] In an acid-base titration, a base or acid is gradually added to the other until they have completely neutralized each other. Let X and Y denote (the act of measuring) the milliliters of acid and base, respsectively, needed for equivalence. Assume that . (a)(5pts) For find . Solution: (b)(5pts) Find . Solution: (c)(10pts) Find . Solution: (d)(5pts) Find . To this end, write a Matlab code that uses the Matlab command ‘mvncdf’. Include your code HERE. Solution: (e)(10pts) Find . To this end, (i) show the event as a shaded area in an x-y plot. Then (ii) write a Matlab code that uses the Matlab command ‘mvncdf’. Include your code HERE. Solution: Figure 1(e) Plot showing the event. PROBLEM 2 (40pts) In relation to PROBLEM 1, assume that, in truth, has the bivariate normal distribution given in PROBLEM 1. (a)(5pts) Write a Matlab code that will simulate measurements of , and then produce a scatter plot of the resulting data. Solution: [See code under 2(a) in Appendix] Figure 2(a) Scatter plot for (b)(5pts) From your data in (a) obtain an estimate of . Then compute the percent error of your estimate. Solution: (c)(10pts) Use your data to obtain a linear prediction model . The overlay this model on a scatter plot of the data. Aslo, give the numerical values of your and . Solution: [See code under 2(c) in Appendix] = _______ Figure 2(c) Scatter plot for and prediction line. (d)(10pts) Use 10 4 simulations to arrive at the pdf for the estimator . Also, give the numerical values of and . Solution: [See code under 2(d) in Appendix] Figure 2(d) PDF for using sample size . (e)(5pts) Compute the true value of m. Then comment on how it compares to your value for in (d). Solution: (f)(5pts) Assume that . Find Solution: PROBLEM 3 (25pts) A press fit refers to fitting two parts together, so as to ensure that they will not slip relative to one another. From https://en.wikipedia.org/wiki/Interference_fit we have the following example: A 10 mm (0.394 in) shaft made of 303 stainless steel will form a tight fit with allowance of 3–10 µm (0.0001–0.0003 in). A slip fit can be formed when the bore diameter is 12–20 µm (0.0005–0.0008 in) wider than the rod. Suppose that shafts are machined to conform to a shaft diameter distribution and the bores are machined to conform to a bore diameter distribution . Denote the clearance between the shaft and bore as (a)(3pts) Use the linearity of E(*) to arrive at in units of . Solution: (b)(2pts) Suppose we require that . From this constraint, obtain an expression for as a function of . Solution: (c)(5pts) Suppose that the shaft machining cost as a function of is ($) and the bore machining cost as a function of is ($). Then the total cost of a shaft/bore unit is . From this cost function, along with the constraint you found in (b), one can use the method of Lagrange multipliers [ https://en.wikipedia.org/wiki/Lagrange_multiplier ] to show that the total cost will be minimized for and . Rather than using this elegant mathematical method, proceed to arrive at these numbers as follows: (i) define the Matlab array (ii) create your array per your constraint in (b) (iii) compute your array per the above equation (iv) use the command to find the minimum cost and the associated array index, and (v) recover your values of and . Include your code and answers HERE. Solution: = ______ ; = ______ ; = _______ Code: (d)(10pts) Suppose that one of your colleagues claims that the company has been using for ages, and it is still in business. Hence, to change to the tighter specifications you are suggesting in (c) is simply a waste of money. In this part compute the probability that the clearance will not be in the range for both his specs. and yours. Solution: (e)(5pts) Compute the total cost of a shaft/bore pair using his numbers. Then use your answers in (c) and (d) to compute the anticipated cost of lost units in a run of 10,000 bore/shaft pairs of using your specs. and his. Solution: Matlab Code