I'm confused with a question as follows:
Consider the case that the total number of accidents happening in a highway in one day follows the following set of rules:
if 0 - y - 548 then x = 0
if 548 - y - 877 then x = 1

y is up to 999.

Simulate 365 random numbers between 0 and 999 as y and follow the rules above to generate 365 x values. Assume that these x values are number of accidents observed during a year. Test the hypothesis that the average of accidents in one year is 0.6.


How to go about the first part?