Question: Programming Exercise 5.45 computes the standard deviation of numbers. This exercise uses a different but equivalent formula to compute the standard deviation of n numbers.

Programming Exercise 5.45 computes the standard deviation of numbers. This exercise uses a different but equivalent formula to compute the standard deviation of n numbers.-mean)? >(xi an)? x Xi + Xn X1 + x2 + i=1

To compute the standard deviation with this formula, you have to store the individual numbers using an array, so that they can be used after the mean is obtained.Your program should contain the following methods:/** Compute the deviation of double values */public static double?deviation(double[] x)/** Compute the mean of an array of double values */public static double?mean(double[] x)Write a test program that prompts the user to enter ten numbers and displays the mean and standard deviation, as shown in the following sample run:deviation 1 Enter ten numbers: 1.9 2.5 3.7 2 1 6 3

In business applications, you are often asked to compute the mean and standard deviation of data. The mean is simply the average of the numbers. The standard deviation is a statistic that tells you how tightly all the various data are clustered around the mean in a set of data.

For example, what is the average age of the students in a class? How close are the ages? If all the students are the same age, the deviation is 0.

Write a program that prompts the user to enter ten numbers, and displays the mean and standard deviations of these numbers using the following formula:

4 5 2 -Enter The mean is 3.11 The standard deviation is

Here is a sample run:

1.55738

-mean)? >(xi an)? x Xi + Xn X1 + x2 + i=1 deviation 1 Enter ten numbers: 1.9 2.5 3.7 2 1 6 3 4 5 2 -Enter The mean is 3.11 The standard deviation is 1.55738

Step by Step Solution

3.43 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Output Enter ten numbers 1 9 2 5 3 7 2 1 6 3 4 5 2 The mean is 311 The standard deviation is 1... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!