Use the following equations to compute the standard deviation of n numbers: mean
ID: 3653849 • Letter: U
Question
Use the following equations to compute the standard deviation of n numbers: mean = (x1 + x2 + ... + xn) / n, deviation = sqrt(((x1 - mean)^2 + (x2 - mean)^2 + ... + (xn - mean)^2)/(n-1)) You have to store the individual number using an array, so that they can be used after the mean is obtained. Your program should contain the following methods: public static double deviation(double[] x) public static double mean(double[] x) write a test program that prompts the user to enter ten numbers and displays the mean and deviationExplanation / Answer
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Statistics { public static void main(String[] args) throws IOException { double[] x =new double[10]; BufferedReader is = new BufferedReader(new InputStreamReader(System.in)); String line=""; System.out.println("Enter 10 values :"); for(int i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.