Implement Method Java Include Test Api Implement Upvote Best Answer Computes Standard Gaus Q43810752
How do I implement this method in java. I will include, both thetest and the api to implement. Will upvote the best answer
Computes the standard Gaussian distribution probability densityfunction (see
* the lab document for the actualformula) with scale parameter.
*
* @param x
* a value
* @param sigma
* scaleparameter
* @return the standard Rayleighdistribution probability density function
* evaluated atx
*/
public static double gaussian(double x, int sigma){
}
Test Case:
public void test03_gaussian() {
final double[] x = { -3.0, -1.0, 0,1.0, 3.0};
final double[] exp ={0, 0.1468, 0.3989, 0.1468, 0 };
int sigma=1;
for (int i = 0; i < x.length;i++) {
String error =String.format(“normal(%s) failedn”, x[i]);
assertEquals(error, exp[i], lab0.gaussian(x[i], sigma),1e-1);
}
}
Expert Answer
Answer to How do I implement this method in java. I will include, both the test and the api to implement. Will upvote the best ans…
OR