Question: write me a macro in excel for varianceProblem 3a (15 points): (a) Develop a user defined function MyVar that calculates a variance by using the
write me a macro in excel for varianceProblem 3a (15 points):\ (a) Develop a user defined function "MyVar" that calculates a variance by using the following\ equation:
MyVar=(\\\\sum_(i=1)^n \\\ oot(5)((3x_(i)^(2)-Avg)))/(2n-1)\ where
Avgrepresents the average of variable
x_(i). Use the values given on the sheet "P3a" to test\ the function. Remember that this function must have three arguments (X, Avg, and
n.\ (b) Develop a user defined function "MySummer" that calculate the weighted average with the\ equation, MySummer
=(\\\\sum_(i=1)^n (log(5x_(i)^(2))+x_(i)))/(\\\\sum_(i=1)^n (log(5x_(i))+2\\\\sqrt(x_(i)))). Use the values given on the sheet\ "P3a" to test the function. Reminder: this function must have two arguments,
x, and
n.\ (c ) Write a macro function to estimate the Macaulay duration. Use the values given on sheet\ "P3a" to test your function.

(a) Develop a user defined function "MyVar" that calculates a variance by using the following equation: MyVar=2n1i=1n5(3xi2Avg) where Avg represents the average of variable Xi. Use the values given on the sheet "P3a" to test the function. Remember that this function must have three arguments (X,Avg, and n). (b) Develop a user defined function "MySummer" that calculate the weighted average with the equation, MySummer =i=1n(log(5xi)+2xi)i=1n(log(5xi2)+xi). Use the values given on the sheet "P3a" to test the function. Reminder: this function must have two arguments, X, and n. (c) Write a macro function to estimate the Macaulay duration. Use the values given on sheet "P3a" to test your function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
