# MiniMax Problem

Suppose you must guess the value of an unknown number x in the interval [a, b] belongs (0,Inf) and suppose you will be forced to pay a fine based on the relative error of your guess. How should you guess if you want to minimize the worst fine that you would have to pay?

**I simulated stuff to get the answer. I knew all I had to check Arithmetic**

Geometric and Harmonic mean

> a <- 2 > b <- 12 > N <- 1e+05 > x <- runif(N, a, b) > AM <- (a + b)/2 > GM <- sqrt(a * b) > HM <- 2 * ((1/a + 1/b)^-1) > test1 <- function(x) { + abs(AM - x)/x + } > test2 <- function(x) { + abs(GM - x)/x + } > test3 <- function(x) { + abs(HM - x)/x + } > t1 <- sapply(x, test1) > t2 <- sapply(x, test2) > t3 <- sapply(x, test3) > boxplot(t1, t2, t3) |

The illustration shows that it is safe to go with HM as the variance is less and there are no outliers.