1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Veseljchak [2.6K]
2 years ago
12

Exercise 5.46 computes the standard deviation of numbers. This exercise uses a different but equivalent formula to compute the s

tandard deviation of n numbers. To compute the standard deviation with this formula, you have to store the individual numbers using a list, so that they can be used after the mean is obtained. Your program should contain the following functions:
Compute the standard deviation of values def deviation(x) Compute the mean of a list of values def mean (x) write a test program that prompts the user to enter a list of numbers and displays the mean and standard deviation, as shown in the following sample run Programming Exercises 351 Enter numbers: 1.9 2.5 3.7 2 1 6 3 4 5 2 FEner The mean is 3.11 The standard deviation is 1.55738
Engineering
1 answer:
ruslelena [56]2 years ago
4 0

Answer:

// This program is written in Java Programming Language

// Comments are used for explanatory purpose

// Program starts here

import java.util.Scanner;

public class STDeviation {

// Declare and Initialise size of Numbers to be 10

int Numsize = 10;

public static void main(String args [] ) {

Scanner scnr = new Scanner(System.in);

// Declare digits as double

double[] digits = new double[Numsize];

System.out.print("Enter " + Numsize + " digits: ");

// Input digits using iteration

for (int i = 0; i < digits.length; i++)

{

digits[i] = scnr.nextDouble();

}

// Calculate and Print Mean/Average

System.out.print("Average: " + mean(digits)+'\n');

// Calculate and Print Standard Deviation

System.out.println("Standard Deviation: " + deviation(digits));

}

// Standard Deviation Module

public static double deviation(double[] x) {

double mean = mean(x);

// Declare and Initialise deviation to 0

double deviation = 0;

// Calculate deviation

for (int i = 0; i < x.length; i++) {

deviation += Math.pow(x[i] - mean, 2);

}

// Calculate length

int len = x.length - 1;

return Math.sqrt(deviation / len);

}

// Mean Module

public static double mean(double[] x) {

// Declare and Initialise total to 0

double total = 0;

// Calculate total

for (int i = 0; i < x.length; i++) {

total += x[i];

}

// Calculate length

int len = x.length;

// Mean = total/length

return total / len;

}

}

You might be interested in
Hỗ trợ mình với được không các bạn
Leya [2.2K]

Answer:

Explanation:

Be bop

6 0
2 years ago
What type of intersection is this?
mote1985 [20]
Diverging Diamond Interchange
6 0
3 years ago
What level of wildfire risk do people living in Boulder have?
Luba_88 [7]

Answer:

The risk of catastrophic wildfire is a real and serious threat facing those who reside in the forested areas of Boulder County. Dating back to the Black Tiger Fire of 1989, wildfires have collectively destroyed some 250 homes or other structures, burned over 16,000 acres, and threatened the lives and properties of thousands of mountain residents. In an attempt to mitigate the loss of life and property in Boulder County, the Land Use Department has included wildfire mitigation measures in the planning review and building permit process.

Explanation:

8 0
2 years ago
What's a disadvantage of highest MERV-rated filters?
Arte-miy333 [17]

Answer:

3) the pressure drop across high MERV filters is significant.

Explanation:

MERV (Minimum-Efficiency Reporting Value) is used to measure the efficiency of filter to remove particles. A filter of high MERV can filter smaller particles but this causes an increase in reduced air flow that is an increase in pressure drop. High MERV filters capture more particles causing them to get congested faster and thereby increasing pressure drop.

Excessive pressure drop can cause overheating and lead to damage of the filter. The pressure drop can be reduced by increasing the surface area of the filter.

3 0
3 years ago
Read 2 more answers
Assuming the point estimate in Problem 6.36 is the true population parameter, what is the probability that a particular assay, w
sp2606 [1]

Complete Question

The complete question is shown on the first uploaded image

Answer:

The probability is 0.958

Explanation:

The explanation is shown on the second and third uploaded image

3 0
3 years ago
Other questions:
  • Make a proposal to add a small pizza shop to a historical part of town. How could it be designed to “fit” into the area?
    7·2 answers
  • The flowchart below shows the design steps required to build a working model.
    6·1 answer
  • I don't understand this I am really bad at measurements
    12·2 answers
  • Rain falls on a 1346 acre urban watershed at an intensity of 1.75 in/hr for a duration of 1 hour. The catchment land use is 20%
    10·1 answer
  • A coin placed 30.8 cm from the center of a rotating, horizontal turntable slips when its speed is 50.8 cm/s.
    12·1 answer
  • The hydraulic tool holder is a type of what? A.port B. clamp C. Press D. Actuator​
    11·1 answer
  • Is the MI-24 Hind the most widely exported combat helicopter in the world?
    14·1 answer
  • Contrast the electron and hole drift velocities through a 10 um (micro meter) layer of intrinsic silicon across which a voltage
    11·1 answer
  • Which of the following was a sustainable power source used during the Middle Ages?
    9·2 answers
  • saan nag tungo si Aguinaldo at ilang pinuno ng kilusan pagkatapos mapairal ang kasunduan na pansamantalang nag dulot ng kapayapa
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!