0
$\begingroup$

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?

$\endgroup$
12
  • $\begingroup$ clarification question: please explain what you mean in that the values represent a total. $\endgroup$
    – Gregg H
    Commented Mar 25, 2018 at 22:40
  • $\begingroup$ 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 $\endgroup$
    – ChiBay
    Commented Mar 25, 2018 at 22:49
  • $\begingroup$ ¿Is is possible to examine the data based on the number of tweets per day? $\endgroup$
    – Gregg H
    Commented Mar 25, 2018 at 22:54
  • $\begingroup$ What it make more sense to take the average of each of the days and running an anova instead? $\endgroup$
    – ChiBay
    Commented Mar 25, 2018 at 22:56
  • 1
    $\begingroup$ These are each sums across multiple mondays, tuesday etc? Is it always the same number of days in each? $\endgroup$
    – Glen_b
    Commented Mar 26, 2018 at 4:02

2 Answers 2

3
$\begingroup$

Per What statistical analysis to run for count data in R?

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
$\endgroup$
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.