Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Poisson Distribution (1 point) Name: Exercise_0_1.java The Poisson distribution can be used to model the probability for how many times a particular event will
1. Poisson Distribution (1 point) Name: Exercise_0_1.java The Poisson distribution can be used to model the probability for how many times a particular event will happen in a given time interval (for example, the probability for how many times there will be a snow day over the course of a semester.. the Poisson distribution may or may not be a very good model for that situation). k! This formula answers the question, What is the probability that some event will happen k times over a particular interval? is the average number of times the event happens over that interval (for example, A could be the average number of snow days in a semester). For this exercise, just use 1.0 for A. e is Euler's number, which exists in Java as Math.E Create a method that performs the calculation for this formula. Here's a method header to get you started public static double poisson (int k, double lambda) Note that as part of the formula, you will also need to calculate a factorial. Create a separate method for the factorial. Here's a method header to get you started: public static int factorial (int n) Remember, a factorial is just multiplication. Sok ! = 1 2 x (k-1) x k. Write a program that gets a nonnegative integer from the user and uses the poisson) Sample Runs: Enter k: 1 Probability: 0.36787944117144233 Enter k: 5 Probability: 0.0030656620097620196
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started