You can use ImageData to get a 2 dimensions list of pixels. Each pixel will be a list of RGB values.
You can then calculate intensity in anyway that you want. There appear to be many ways of doing that: http://stackoverflow.com/questions/687261/converting-rgb-to-grayscale-intensity
Maybe you want to use the built-in tools to convert the image to grayscale?
grayImage = ColorConvert[yourImage, "Grayscale"];
You can then use ImageData to get a 2d list of intensity values and use Flatten to turn it into a simple 1d list of intensity values:
intensVals = Flatten@ImageData[grayImage]
From there you can run whatever statistic you would like on the intensity values.