# What test (or algorithm) should I use for the following use case?

I have a distribution of visitors to a website on Monday to Sunday like this:

M     T   W  Th   F   S  Su
345 467 560 350 430 689 490


I know that if I have a hypothesis of distribution that I suspect such as (M 20%, T 30%, W 10%, Th 5%, F 5% S 20% Su 10%) etc, I can use a Chi Square distribution to figure out if my suspicion is correct - as explained in this video, Pearson's Chi Square Test (Goodness of Fit), on Khan Academy.

My question is how do I figure out an acceptable distribution given an observed data. I think since I am not after a True or False, rather a set of numbers, I suspect I am after some kind of algorithm that gives out a range of percentages that specify a region which are all acceptable under a chi-square test.

Any pointers greatly appreciated!

-

This probably should be a comment but it's a bit long...

First, it's not quite correct to say that you can use a Chi Square distribution to figure out if your M 20% T30% etc suspicion is correct. All a Chi Square test will do in fact is tell you if your suspicion is unlikely to have generated the data - which is not quite the same thing.

Second, I think you have the wrong idea about an "acceptable distribution". Using a Chi Square test does not mean that you are thinking your population has a Chi Square distribution. Instead, the underlying distribution is multinomial - the thing that has a Chi Square distribution is an artificial statistic created by the analyst, that gets large if the observed data is much different from a specified multinomial distribution (in your case, M 20%, T 30%, etc).

So your question reduces to the best estimate of the parameters in your multinomial distribution. The best answer is also the most obvious - the proportion observed in each day is your best estimate of the "real" value of the population proportion each day.

> x <- c(345,467,560,350,430,689,490)
> x /sum(x)
[1] 0.1036 0.1402 0.1681 0.1051 0.1291 0.2068 0.1471


Alternative answers would depend on some theory about how the "seasonality" works in your daily data. You could decompose your data into a trend and a seasonal component (plus randomness on top), if you have the original data, not just the summary (I'm assuming your data is more than one week's, so "Monday" is total hits over a number of Mondays).

-
That helped. I think since the answer was very obvious - I had a problem accepting it in my head somehow. I do have the whole data, and will be looking into it. Thanks again! –  Jason Jul 15 '12 at 21:05