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
Refers to the capability to keep moving forward on a specified grade.
Mademuasel [1]

Answer:

maneuverability

Explanation:

needless to say, I took the quiz

6 0
3 years ago
What is the physical significance of the Reynolds number?. How is defined for external flow over a plate of length L.
yanalaym [24]

Answer:

Re=\dfrac{\rho\ v\ l}{\mu }

Explanation:

Reynolds number:

  Reynolds number describe the type of flow.If Reynolds number is too high then flow is called turbulent flow and Reynolds is  low then flow is called laminar flow .

Reynolds number is a dimensionless number.Reynolds number given is the ratio of inertia force to the viscous force.

Re=\dfrac{F_i}{F_v}

For plate can be given as

Re=\dfrac{\rho\ v\ l}{\mu }

Where  ρ is the density of fluid , v is the average velocity of fluid and μ is the dynamic viscosity of fluid.

Flow on plate is a external flow .The values of Reynolds number for different flow given as

Reynolds\ number\is \ >\ 5 \times 10 ^5\ then\ flow\ will\ be\ turbulent.

Reynolds\ number\is \

7 0
3 years ago
With a very precise volumetric measuring device, the volume of a liquid sample is determined to be 6.321 L (liters). Three stude
zheka24 [161]

Answer:

See explanation

Explanation:

Solution:-

- Three students measure the volume of a liquid sample which is 6.321 L.

- Each student measured the liquid sample 4 times. The data is provided for each measurement taken by each student as follows:

                                                 Students

                      Trial          A            B               C

                         1            6.35        6.31          6.38

                        2            6.32        6.31          6.32

                        3            6.33        6.32         6.36

                        4            6.36        6.35         6.36

- We will define the two terms stated in the question " precision " and "accuracy"

- Precision refers to how close the values are to the sample mean. The dense cluster of data is termed to be more precise. We will use the knowledge of statistics and determine the sample standard deviation for each student.

- The mean measurement taken by each student would be as follows:

                       E ( A ) = \frac{6.35 +6.32+6.33+6.36}{4} \\\\E ( A ) = 6.34\\\\E ( B ) = \frac{6.31 +6.31+6.32+6.35}{4} \\\\E ( B ) = 6.3225\\\\E ( C ) = \frac{6.38 +6.32+6.36+6.36}{4} \\\\E ( C ) = 6.355\\

- The precision can be quantize in terms of variance or standard deviation of data. Therefore, we will calculate the variance of each data:

 

                        Var ( A ) = \frac{6.35^2+6.32^2+6.33^2+6.36^2}{4} - 6.34^2\\\\Var ( A ) = 0.00025\\\\Var ( B ) = \frac{6.31^2+6.31^2+6.32^2+6.35^2}{4} - 6.3225^2\\\\Var ( B ) = 0.00026875\\\\Var ( C ) = \frac{6.38^2+6.32^2+6.36^2+6.36^2}{4} - 6.355^2\\\\Var ( C ) = 0.000475\\

- We will rank each student sample data in term sof precision by using the values of variance. The smallest spread or variance corresponds to highest precision. So we have:

                   Var ( A )          <          Var ( B )        <    Var ( C )

                   most precise                                      Least precise

- Accuracy refers to how close the sample mean is to the actual data value. Where the actual volume of the liquid specimen was given to be 6.321 L. We will evaluate the percentage difference of sample values obtained by each student .

                       P ( A ) = \frac{6.34-6.321}{6.321}*100= 0.30058\\\\P ( B ) = \frac{6.3225-6.321}{6.321}*100= 0.02373\\\\P ( C ) = \frac{6.355-6.321}{6.321}*100= 0.53788\\

- Now we will rank the sample means values obtained by each student relative to the actual value of the volume of liquid specimen with the help of percentage difference calculated above. The least percentage difference corresponds to the highest accuracy as follows:

                   P ( B )         <       P ( A )         <      P ( C )

            most accurate                                least accurate

7 0
3 years ago
The author uses the example of the flameless candle to illustrate that​
krek1111 [17]

Answer:

I don't necessarily know the context of the text you are talking about, but a flameless candle could represent how there no more light in the author's life, which could represent a lack of happiness or a loss. Hope this helps!

Explanation:

4 0
3 years ago
Read 2 more answers
A diagonal aluminum alloy tension rod of diameter d and initial length l is used in a rectangular frame to prevent collapse. The
Ksenya-84 [330]

Answer:

\Delta L = 0.1883 inch

Explanation:

Given data:

d = 0.5 inch

L_i = 8 ft

\sigma_{allow} = 20  kpsi

we know that change in length is given as

\Delta L = \frac{PL}{AE}

              = \frac{P}{A}\times \frac{L}{E}

              = \sigma_{allow} \times \frac{L}{E}

modulus of elasticity E for aluminium alloy is 10.2 \times 10^6 psi = 10.2 \times 10^3 kpsi

\Delta L = \frac{20 \times 8}{10.2\times 10^3}

\Delta L = 0.01569 ft

\Delta L = 0.1883 inch

6 0
3 years ago
Other questions:
  • For a p-n-p BJT with NE 7 NB 7 NC, show the dominant current components, with proper arrows, for directions in the normal active
    14·1 answer
  • g Consider a thin opaque, horizontal plate with an electrical heater on its backside. The front end is exposed to ambient air th
    11·1 answer
  • Very thin films are usually deposited under vacuum conditions to prevent contamination and ensure that atoms can fly directly fr
    14·1 answer
  • Which factors influence changes in consumer demands? check all that apply
    8·2 answers
  • Suppose we want to determine how many of the bits in a twelve-bit unsigned number are equal to zero. Implement the simplest circ
    14·1 answer
  • A cylinder fitted with a movable piston contains water at 3 MPa with 50% quality, at which point the volume is 20 L. The water n
    8·2 answers
  • Various factors to be considered in deciding the factor of safety?
    14·1 answer
  • Air enters a turbine with a stagnation pressure of 900 kPa and a stagnation temperature of 658K, and it is expanded to a stagnat
    9·1 answer
  • P9.28 A large vacuum tank, held at 60 kPa absolute, sucks sea- level standard air through a converging nozzle whose throat diame
    12·1 answer
  • We have a tube with a diameter of 5 inches that is 1 foot long. The tube then reduces the diameter to 3 inches. According to the
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!