0
$\begingroup$

I'm trying to get around a specific problem.

I have a dataset with observations of a specific event, for Northern and Southern states, each with an associated timestamp.

How could I calculate a probability to whether the Northern states have a higher probability of that event occurring during night time than the Southern states?

I can plot the data so that it follows a normal distribution (if I set a starting hour to 4am), but I feel I shouldn't be doing this.

Can I use a Binomial distribution? (the event either occurs at night, or not).

$\endgroup$

1 Answer 1

1
$\begingroup$

Aside from the distribution, you could create a variable called $\texttt{nightevent}$, which is set to 1 if an event happened at night and zero otherwise. Next, create a variable $\texttt{southern}$, which is set to 1 if the record is for a southern state, or zero if from a northern state. Then regress $\texttt{nightevent}$ as the dependent variable on $\texttt{southern}$, which is the predictor variable. If the regression coefficient is negative for $\texttt{southern}$ it means southern states are more associated with daily events and northern are more associated with night events. Otherwise a positive coefficient would imply that southern states are more associated with night events and northern associated with day events. If the coefficient for $\texttt{southern}$ is significant, it means the test is significant.

Regarding the distribution, yes, binomial is appropriate, so you could use logistic regression to meet this assumption of a binomially-distributed outcome, i.e. $y=0$ or $y=1$.

The above is not appropriate for evaluating "what time" the events occurred, since that would entail use of longitudinal (time-dependent) regression.

$\endgroup$
2
  • $\begingroup$ Thank you for your answer. But instead of a regression, I am doing simple hypothesis testing. How could the p-value be calculated in this case? $\endgroup$
    – drec4s
    Nov 11, 2021 at 21:39
  • 1
    $\begingroup$ Yes, you can use a test of two proportions, p1, and p2, where p1 is proportion of night events in northern states, and p2 is the proportion of night events in southern states. The p-value (if less than 0.05) from the test will reveal if north vs south night events are significantly different. Which ever set of states has the largest proportion (i.e. p1 vs p2) will be the one with significantly more night events. $\endgroup$
    – user318288
    Nov 11, 2021 at 21:45

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.