Question: The built-in R function mean calculates the sample mean i. Write R functions named hmean, gmean, and qmean that calculate the sample harmonic mean, geometric

 The built-in R function mean calculates the sample mean i. Write

The built-in R function mean calculates the sample mean i. Write R functions named hmean, gmean, and qmean that calculate the sample harmonic mean, geometric mean, and quadratic mean defined by -1 /11 h = ) where xi. X2, ..., Xn are the data values. Test your functions with a vector of data values of your choice and verify the inequality min{x1, x2, ..., Xin}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!