Sei sulla pagina 1di 2

Warasinee Apirakdacharhai ID: 5080048 Scientific Research & presentation HW 5 2.

We use poisson distribution when we know the average that events can be expected to occur. After that, using of poisson distribution tells us the probability that the same event would occur in specific number. In this case by using poisson distribution to understand how many accidence occur in front of MUIC per month, it also can tell how much probability of the risk of a(or more) car can occur in the accident. 3. For this one I can do the poisson distribution but I do not know how to calculate the sum of poisson. In statistic class, we can just write down in a form of a formula. So we do not need to calculate the exactly value. I do not how to calculate it with calculator, some time the number get too big or too small. Source code:
package possiondistribution; import javax.swing.JOptionPane; public class PossionDistribution { public static void main(String[] args) { String input = JOptionPane.showInputDialog("a: an average"); double a = Double.parseDouble(input); String input1 = JOptionPane.showInputDialog("i: Probability you want " + "to know from \nif You want to find only one number then enter the number twice."); double i = Double.parseDouble(input1); String input2 = JOptionPane.showInputDialog("j: Probability you want " + "to know to"); double j = Double.parseDouble(input2); SumPoisson(a,i,j); } public static double SumPoisson(double a, double i, double j) { double sum = 0; double x; for ( x = i; x<=j; x++) } System.out.println(sum); { sum = sum + Math.pow(a,x)/(Factorial(x)* Math.pow(2.72,a));

return sum; } private static double Factorial(double x) { if (x == 1) return 1; else return x * Factorial(x-1); } }

Output: 5.253390945553485E-5 (k= from 40 to 200 , a=20)

4. For this one, I think I have to do like the example in the exercise, only reverse the process back. However, I don't know how to calculate the value of Sum[binomial]. Please explain. If the question ask me to use poisson distribution, P(X=24) = 20^24/(24!*e^20) = 0.0557 Which is 5%, and then it suppose to be 20% according to the example. This confused me. 5. We cannot conclude that Jedi has special power because it has done by chance that cannot be expected; No he may be guess correctly for 700 times. In probability, the larger or higher number of round that we experiment will give a lesser probability of correct answer.

Potrebbero piacerti anche