Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use the following equations to compute the standard deviation of n numbers: mean

ID: 3631387 • 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 deviation.

Explanation / 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;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote