# Statistical test for differences in counts between groups

Goal: Test if there is a statistical difference between Tue and the rest of days of the week.

Background: I wanted to use ANOVA but it analyzes the differences among group means. My values represent the sum of many counts for time-series data and not the mean value, so I am not sure what test to run.

I have the following data:

Mon: 221
Tue: 318
Wed: 258
Thu: 225
Fri: 223
Sat: 185
Sun: 129


Question:

1) How would I test if there is a statistical difference between Tue and the rest of days of the week?

• clarification question: please explain what you mean in that the values represent a total. Mar 25, 2018 at 22:40
• Each value represents a count of the total tweets sent for a given time period. For example, from January through March, 100 tweets were sent on Monin January; 100 tweets were sent on Mon in February, and 21 tweets were sent on Mon in March. So the total for all Mon from January through March is Mon: 221 Mar 25, 2018 at 22:49
• ¿Is is possible to examine the data based on the number of tweets per day? Mar 25, 2018 at 22:54
• What it make more sense to take the average of each of the days and running an anova instead? Mar 25, 2018 at 22:56
• These are each sums across multiple mondays, tuesday etc? Is it always the same number of days in each? Mar 26, 2018 at 4:02

day = c("Mon", "Tues", "Wed", "Thur", "Fri", "Sat", "Sun")
count = c(221, 318, 258, 225, 223, 185, 129)

#make into df
df = data.frame(day, count)

#poisson
summary(glm(count ~ day, family=poisson))


Output:

Call:
glm(formula = count ~ day, family = poisson)

Deviance Residuals:
[1]  0  0  0  0  0  0  0

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)  5.407172   0.066965  80.746  < 2e-16 ***
dayMon      -0.009009   0.094917  -0.095   0.9244
daySat      -0.186816   0.099447  -1.879   0.0603 .
daySun      -0.547359   0.110618  -4.948 7.49e-07 ***
dayThur      0.008929   0.094492   0.094   0.9247
dayTues      0.354880   0.087344   4.063 4.84e-05 ***
dayWed       0.145788   0.091435   1.594   0.1108
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

Null deviance:  9.4623e+01  on 6  degrees of freedom
Residual deviance: -6.6613e-16  on 0  degrees of freedom
AIC: 64.487

Number of Fisher Scoring iterations: 2


Based on the information about this data set, I would calculate a confidence interval for the non-Tuesday data. Then check to see if this interval contains the value for Tuesday or not. This makes an assumption that the observed value for Tue is the population parameter...but if you have only one value, this may be your best option.