I want to find the mean of the minimum of N uniformly distributed random variables. I used to the following code to find it for two random variables X1 and X2
a = 0; b = 1; Num = 1000000;
X1 = RandomReal[UniformDistribution[{a, b}], Num];
X2 = RandomReal[UniformDistribution[{a, b}], Num];
W = Table[Min [X1[[i]], X2[[i]]], {i, 1, Num}];
Print["The mean for the minimum set is ", Mean[W]]
The documentation will tell you to change the 1 to n in the code I gave to get the maximum. (For a Uniform distribution there’s no need to perform simulations with a specific sample size. There is an exact answer for a general sample size.)