# Chi-Square? for a 2 x 16 observed and random table

#### Kari Gunson

##### New Member
Hello I have the observed number of turtles passing through a wildlife crossing structure by daylight hours (n=16) and have calculated the expected by dividing 16/99. 99 is the total sample size. I would like to calculate whether the observed differs statistically from the expected by each hour. I was thinking of calculating some confidence intervals for each. Any ideas?

#### GretaGarbo

##### Human
Is this like you have had one path way and you have observed it (maybe with a camera trap?) for n=99 days (and you saw 16 turtles)?

Or that you have had 99 different paths and you observed 16 turtles?

I was thinking of a Poisson model where most observed values were 0 and sometimes 1 and maybe a few 2, so that sum is 16. Then the Poisson parameter would be estimated as 16/99.

A likelihood interval could be formed, or a confidence interval by rejecting values that are not consistent with the observed sum of 16.

#### Kari Gunson

##### New Member
Is this like you have had one path way and you have observed it (maybe with a camera trap?) for n=99 days (and you saw 16 turtles)?

Or that you have had 99 different paths and you observed 16 turtles?

I was thinking of a Poisson model where most observed values were 0 and sometimes 1 and maybe a few 2, so that sum is 16. Then the Poisson parameter would be estimated as 16/99.

A likelihood interval could be formed, or a confidence interval by rejecting values that are not consistent with the observed sum of 16.
No there were 16 structures monitored with camera traps. We had 99 turtle passages. I then pulled the time of passage from each turtles and tallied this by hour from 6 AM to 10 PM. I then produced a line chart. I was just wondering if we could say that the crossing rates are significant at specific time periods.....

#### Kari Gunson

##### New Member
Thanks for your reply. Here is some clarification. There were 16 structures monitored with camera traps. We had 99 turtle passages. I then pulled the time of passage from each turtles and tallied this by hour from 6 AM to 10 PM. I then produced a line chart. I was just wondering if we could say that the crossing rates are significant at specific time periods.....

#### GretaGarbo

##### Human
So there are 16 structures, 16 strata you could call it. Some structures might be more popular than others. The average, or expected value would be 99/16 = 6.1.

You can imagine these 16 structures as 16 columns and one row. Then you can do a chi-squared test with 6.1 as expected value and the observations as the number of crossings per structure. (Just do the calculations by hand with a pocket calculator or just excel.)

Next you could have the 16 structures as columns and the hours as rows; from 6 am to 10 pm is 16 hours. So you would have a table with 16x16 (rows x columns) and in each cell the number of crossings; 0, 1, 2…. Most cells would have 0 crossings, many have 1 and possibly a few with 2.

Then you can do a chi-squarred test on that or preferably a Fishers exact test. If you sum these values to the margin you would have the popularity of each structure and the popularity of the hour.

(You could do a logit model with structure and hour as explanatory factors and number of crossings as the dependent, But that maybe seems too complicated.)