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
According to the
zysi [14]

Answer:

The part of the system that is considered the resistance force is;

B

Explanation:

The simple machine is a system of pulley  that has two pulleys

The effort, which is the input force at A gives the value of the tension at C and  D which are used to lift the load B

Therefore, we have;

A = C = D

B = C + D = C + C = 2·C

∴ C = B/2

We have;

C = B/2 = A

Therefore, with the pulley only a force, A equivalent to half the weight, B, of the load is required to lift the load, B

The resistance force is the constant force in the system that that requires an input force to overcome in order for work to be done

It is the force acting to oppose the sum of the other forces system, such as a force acting in opposition to an input force

Therefore, the resistance force is the load force, B, for which the input force, A, is required in order for the load to be lifted.

3 0
3 years ago
What are creativity, leadership, &amp; time management examples of ?
xxTIMURxx [149]

Managing your time well can help you improve in your career. Organizing each day helps you to complete work on time, stay engaged during important meetings and give you space to be creative and proactive in your tasks. Having strong time-management skills can ultimately lead to accomplishing key goals and advancing in your position. In this guide, we discuss the meaning of time management, why it is important and how you can both improve upon and showcase your skills during the job search.

hope this helps :):):):):)

7 0
3 years ago
The Acme tool is aligned to the work with: A. A square B. The eye C. An Acme tool gage D. A center gage
kotegsom [21]

Answer:

(c) an acme tool gage

Explanation:

with the help of an acme tool we measure the pitch of a screw thread it is used as reference for finding the pitch of the thread it is also called an inspection tool is aligned to work with an acme tool gage it is also used for gage the internal and external threaded product. it is also used for grinding and setting tools it is mainly work 29° thread angle

8 0
4 years ago
The natural material in a borrow pit has a mass unit weight of 110.0 pcf and a water content of 6%, and the specific gravity of
enot [183]

Answer:

A. 288,030.91 cy

B. The amount of water that must be removed from the natural material is 483541.04254 gallons of water

Explanation:

The natural material in the barrow properties are;

The mass unit weight, γ = 110.0 pcf

The water content, w = 6%

The specific gravity of the soil solids, G_s = 2.63

The desired dry unit weight, \gamma _d = 122 pcf

The water content, w₁ = 5.5 %

The net section volume, V_T = 245,000 cy = 6,615,000 ft³

A.  \gamma _d = W_s/V_T

∴ W_s = V_T × \gamma _d = 6,615,000 ft³ × 122 lb/ft³ = 807030000 lbs

w = (W_w/W_s) ×  100

∴ W_w = (w/100) × W_s = (6/100) × 807030000 lbs = 48421800 lbs

The weight of solids

W = W_s + W_w = 807030000 lbs + 48421800 lbs = 855451800 lbs

V = W/γ = 855451800 lbs/(110.0 lb/ft.³) = 7776834.54545 ft.³ = 288,030.91 cy

V = 288,030.91 cy

The amount of cubic yards of borrow required = 288,030.91 cy

B. The volume of water in the required soil is found as follows;

W_{w1} = (w₁/100) × W_s = (5.5/100) × 807030000 lbs = 44386650 lbs

The amount of water that must be added =  W_{w1} - W_w = 44386650 lbs - 48421800 lbs = -4,035,150 lbs

Therefore, 4,035,150 lbs of water must be removed

The density of water, ρ = 8.345 lbs/gal

Therefore, V = 4,035,150 lbs/(8.345 lbs/gal) = 483541.04254 gal  of water must be removed from the natural material

7 0
3 years ago
Consider two different types of motors. Motor A has a characteristic life of 4100 hours (based on a MTTF of 4650 hours) and a sh
Daniel [21]

Answer:B

Explanation:

Given

For motor A

Characteristic life(r)=4100 hr

MTTF=4650 hrs

shape factor(B )=0.8

For motor B

Characteristic life(r)=336 hr

MTTF=300 hr

Shape Factor (B)=3

Reliability for 100 hours

R_a=e^{-\left ( \frac{T-r}{n}\right )B}

R_a=e^{-\left ( \frac{4650-4100}{100}\right )0.8}

R_a=e^{-4.4}=0.01227

For B

R_b=e^{-\left ( \frac{300-336}{100}\right )3}

R_b=e^{1.08}=2.944

B is better for 100 hours

(b)For 750 hours

R_a=e^{-0.5866}=0.55621

R_b=e^{0.144}=1.154

So here B is more Reliable.

3 0
3 years ago
Other questions:
  • Which of the following is a safety device meant to protect an operator from the point of operation?
    14·1 answer
  • If the compound swivel base is set on 60 degrees at the lathe centerline index, how many degrees will the reading be at the cros
    14·1 answer
  • Explain the process of fractional distillation (include cracking)
    11·1 answer
  • A reversible compression of 1 mol of an ideal gas in a piston/cylinder device results in a pressure increase from 1 bar to P2 an
    10·1 answer
  • List 3 appliances each of the following<br>soil<br>waste​
    7·1 answer
  • By using order of magnitude analysis, the continuity and Navier-Stokes equations can be simplified to the Prandtl boundary-layer
    9·1 answer
  • 2) The switch in the circuit below has been closed a long time. At t=0, it is opened.
    5·1 answer
  • Why are concrete masonry units (CMU) called breeze blocks?
    7·1 answer
  • Thrust is managed to maintain IAS, and glide slope is being flown. What characteristics should be observed when a headwind shear
    14·1 answer
  • Using data in Appendix A ,calculate the number of atoms in 1 tonne of iron
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!