Hi,
I'm trying to manually perform a chi squared test on Stata, and I'm struggling to work out how to calculate a variable for expected values.
Say I was trying to find out if something was assigned to different people based on the last digit of an ID (i.e. anything with an ID ending 7 would go to a certain person) as opposed to random assignment, how would I calculate the expected value of the number of '7's' assigned. If I had 865 observations this would in theory be 865/10 = 86.5, rounded down to 86 since 5<7. How would I incorporate the final step in case the observations was not a multiple of 10?
Thanks in advance.
I'm trying to manually perform a chi squared test on Stata, and I'm struggling to work out how to calculate a variable for expected values.
Say I was trying to find out if something was assigned to different people based on the last digit of an ID (i.e. anything with an ID ending 7 would go to a certain person) as opposed to random assignment, how would I calculate the expected value of the number of '7's' assigned. If I had 865 observations this would in theory be 865/10 = 86.5, rounded down to 86 since 5<7. How would I incorporate the final step in case the observations was not a multiple of 10?
Thanks in advance.
Comment