Dandelion wanted to make wine when he noticed a bunch of yellow flowers in his front yard. He'd studied the distribution of these flowers and knew that the probability you'd find x flowers per square foot was
where the average number of flowers per square foot is λ. e = 2.71828 and x! ("factorial") means x(x-1)(x-2) ... 1. He made a 1x1 square foot frame and placed it in different spots on the yard and picked the flowers inside the frame. He did this 20 times. λ was 5 flowers per square foot. Simulate this situation by generating 20 random integers x using the formula above. You can limit the x values to be between 0 and 17. The average number of flowers picked can be shown to be 5 times 20 which is 100. How many dandelions did Dandelion pick in your simulation? |