# problem-8.18

problem-8.18 The log() function can be used directly, as in

    > wilcox.test(log(exec.pay), mu = log(22), alt="greater")

            Wilcoxon signed rank test with continuity correction

    data:  log(exec.pay)
    V = 10966, p-value = 0.004144
    alternative hypothesis: true mu is greater than 3.091

We see a similarly small p-value as in the previous question, indicating that the null hypothesis is not supported.
If you tried to do a histogram to check for symmetry, you may have gotten an error message. This is because of the data values for which the compensation is 0. (The logarithm of 0 is treated as -¥.) To avoid this error, you can exclude this case first as follows:

    > ep = exec.pay[exec.pay > 0]
    > hist(log(ep))                 # fairly symmetric