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
2.
den301095 [7]
Jae pain seems the most off
4 0
3 years ago
A thick steel slab (rho= 7800 kg/m3 , cp= 480 J/kg K, k= 50 W/m K) is initially at 300 °C and is cooled by water jets impinging
dimaraw [331]

Answer:

t = 2244.3 sec

Explanation:

calculate the thermal diffusivity

\alpha = \frac{k}{\rho c}

           = \frac{50}{7800\times 480} = 1.34 \times 10^{-5} m^2/s

                   

Temperature at 28 mm distance after t time  = =  50 degree C

we know that

\frac[ T_{28} - T_s}{T_i -T_s} = erf(\frac{x}{2\sqrt{at}})

\frac{ 50 -25}{300-25} = erf [\frac{28\times 10^{-3}}{2\sqrt{1.34\times 10^{-5}\times t}}]

0.909 = erf{\frac{3.8245}{\sqrt{t}}}

from gaussian error function table , similarity variable w calculated as

erf w = 0.909

it is lie between erf w = 0.9008  and erf w = 0.11246 so by interpolation we have

w = 0.08073

erf 0.08073 = erf[\frac{3.8245}{\sqrt{t}}]

0.08073 = \frac{3.8245}{\sqrt{t}}

solving fot t we get

t = 2244.3 sec

3 0
3 years ago
Why is the face of the claw on a claw hammer usually a smooth curve? Why isn't it straight or some other shape?
GarryVolchara [31]

Answer:

The face of the claw on the claw hammer is usually a smooth curve so as to improve the ease with which nails are removed when removing nails because as the nail held between the V shaped split claw is being pulled out from the wood, it slides more and more towards cheek, reducing the distance of the nail from the cheek which is the fulcrum, thereby increasing the mechanical advantage because the location of the hand on the grip remains unchanged

Explanation:

7 0
3 years ago
A 50 Hz, four pole turbo-generator rated 100 MVA, 11 kV has an inertia constant of 8.0 MJ/MVA. (a) Find the stored energy in the
raketka [301]

Given Information:

Frequency = f = 60 Hz

Complex rated power = G = 100 MVA

Intertia constant = H = 8 MJ/MVA

Mechanical power = Pmech = 80 MW

Electrical power = Pelec = 50 MW

Number of poles = P = 4

No. of cycles = 10

Required Information:

(a) stored energy = ?

(b) rotor acceleration = ?

(c) change in torque angle = ?

(c) rotor speed = ?

Answer:

(a) stored energy = 800 Mj

(b) rotor acceleration = 337.46 elec deg/s²

(c) change in torque angle (in elec deg) = 6.75 elec deg

(c) change in torque angle (in rmp/s) = 28.12 rpm/s

(c) rotor speed = 1505.62 rpm

Explanation:

(a) Find the stored energy in the rotor at synchronous speed.

The stored energy is given by

E = G \times H

Where G represents complex rated power and H is the inertia constant of turbo-generator.

E = 100 \times 8 \\\\E = 800 \: MJ

(b) If the mechanical input is suddenly raised to 80 MW for an electrical load of 50 MW, find rotor acceleration, neglecting mechanical and electrical losses.

The rotor acceleration is given by

$ P_a = P_{mech} - P_{elec} = M \frac{d^2 \delta}{dt^2}  $

Where M is given by

$ M = \frac{E}{180 \times f} $

$ M = \frac{800}{180 \times 50} $

M = 0.0889 \: MJ \cdot s/ elec \: \: deg

So, the rotor acceleration is

$ P_a = 80 - 50 = 0.0889 \frac{d^2 \delta}{dt^2}  $

$  30 = 0.0889 \frac{d^2 \delta}{dt^2}  $

$   \frac{d^2 \delta}{dt^2} = \frac{30}{0.0889}  $

$   \frac{d^2 \delta}{dt^2} = 337.46 \:\: elec \: deg/s^2 $

(c) If the acceleration calculated in part(b) is maintained for 10 cycles, find the change in torque angle and rotor speed in revolutions per minute at the end of this period.

The change in torque angle is given by

$ \Delta  \delta = \frac{1}{2} \cdot \frac{d^2 \delta}{dt^2}\cdot (t)^2 $

Where t is given by

1 \: cycle = 1/f = 1/50 \\\\10 \: cycles = 10/50 = 0.2  \\\\t = 0.2 \: sec

So,

$ \Delta  \delta = \frac{1}{2} \cdot 337.46 \cdot (0.2)^2 $

$ \Delta  \delta = 6.75 \: elec \: deg

The change in torque in rpm/s is given by

$ \Delta  \delta = \frac{337.46 \cdot 60}{2 \cdot 360\circ  }   $

$ \Delta  \delta =28.12 \: \: rpm/s $

The rotor speed in revolutions per minute at the end of this period (10 cycles) is given by

$ Rotor \: speed = \frac{120 \cdot f}{P}  + (\Delta  \delta)\cdot t  $

Where P is the number of poles of the turbo-generator.

$ Rotor \: speed = \frac{120 \cdot 50}{4}  + (28.12)\cdot 0.2  $

$ Rotor \: speed = 1500  + 5.62  $

$ Rotor \: speed = 1505.62 \:\: rpm

4 0
3 years ago
Hęłłõ hõw årę ÿõū dõìńg tõdāÿ
kirill [66]

Answer:

All good :)

What about you??

8 0
2 years ago
Read 2 more answers
Other questions:
  • A dielectric material, such as Teflon®, is placed between the plates of a parallel-plate capacitor without altering the structur
    10·1 answer
  • Suppose a possibly biased die is rolled 30 times and that the face containing
    13·1 answer
  • 10. An engineer is designing a total hip implant. She intends to make the femoral stem out of titanium because it forms a good i
    9·1 answer
  • Una frase de: ama la vida quien___________________________________
    6·1 answer
  • When you come to an intersection, follow the _________ before you proceed.
    6·2 answers
  • Select the correct text in the passage.
    6·2 answers
  • An FPC 4 m2 in area is tested during the night to measure the overall heat loss coefficient. Water at 60 C circulates through th
    5·1 answer
  • How can statistical analysis of a dataset inform a design process
    8·1 answer
  • Omg help mr idk what to say ahhh​
    15·2 answers
  • Which work practice should be followed to best prevent the ingestion of chemicals?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!