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]
3 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]3 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
Turbine blades mounted to a rotating disc in a gas turbine engine are exposed to a gas stream that is at [infinity] = 1100°C and
Nataly_w [17]

Answer:

<u><em>note:</em></u>

<u><em>solution is attached in word form due to error in mathematical equation. furthermore i also attach Screenshot of solution in word due to different version of MS Office please find the attachmen</em></u>t

∴ Calculation maybe wrong but method is correct

Download docx
3 0
3 years ago
A driver complains that his front tires are wearing
Margarita [4]

Answer:

The correct option is;

Neither A nor B

Explanation:

The location of the where the thread wears in tire that has too high inflation is at the thread pattern center due to the reduced size of the contact patch with the load of the car resting on the central portion of the tire's contact surface

When the wear occurs at the outer edges of the tire, the load of the car rests on the outer edges as the contact patch increases due to the tire being under-inflated

Camber is the slope provided in road pavement to drain off water from the road

Roads with camber has a raised middle portion and wear due to camber includes outer-edge tread wear, inner-edge tread wear and tire feathering

8 0
2 years ago
What is the gear ratio of the given train
Olin [163]

Answer:

1/4

Explanation:

.......................

7 0
2 years ago
________ are written to “maximize” or “minimize” a specific value associated with the product needs in order to define the goal
Anna35 [415]

Answer:

Objective statements.

Explanation:

An objective statement can be defined as a short statement that explicitly states or describes what a person wants exactly or is looking out for in a particular item.

Objective statements are written to “maximize” or “minimize” a specific value associated with the product needs in order to define the goal or aim of the design process.

This ultimately implies that, objective statements are used by various manufacturing industries or companies to explicitly define the minimum or maximum requirements for the production of its goods.

4 0
3 years ago
Read 2 more answers
On what frequency can you expect to monitor air traffic in and around<br> Lincoln Airport?
Phantasy [73]

Answer:

118.5

Explanation:

Hope this helps!

5 0
2 years ago
Other questions:
  • A ring-shaped seal, made from a viscoelastic material, is used to seal a joint between two rigid pipes. When incorporated in the
    5·1 answer
  • Vapor lock occurs when the gasoline is cooled and forms a gel, preventing fuel flow and
    7·2 answers
  • A stream of air enters a 7.00-cm ID pipe at a velocity of 30.0 m/s at 27.0°C and 1.80 bar (gauge). At a point downstrream, the a
    15·1 answer
  • A hollow steel tube with an inside diameter of 100 mm must carry a tensile load of 400 kN. Determine the outside diameter of the
    12·2 answers
  • Air enters a well-insulated turbine operating at steady, state with negligible velocity at 4 MPa, 300°C. The air expands to an e
    10·1 answer
  • A device that helps increase field worker productivity by providing reliable location and time
    13·1 answer
  • Item110pointseBook HintPrintReferences Check my work Check My Work button is now disabled5Item 1Item 1 10 pointsAn ideal Diesel
    10·1 answer
  • In a certain balanced three phase system each line current is a 5a and each line voltage is 220v . What is the approximate real
    15·1 answer
  • This is various straps secured on a worker to distribute the fall arrest forces. What is depicted in the image?
    6·2 answers
  • Which lists the order of Energy Career Pathways from the source to the customer?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!