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 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
Get step-by-step solutions from verified subject matter experts
