[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Finding the Mean and SD of values to xN

Posted on 2004-12-01
Medium Priority
Last Modified: 2010-03-31
Suppose we have a set of values x1, x2, . . . , xN.
Write an application that calculates the mean and standard deviation of its command line arguments.
For example,
java MyApp 1 9 3 7
should produce output similar to:
For data: 1.0,9.0,3.0,7.0,
standard deviation=3.1622776601683795
Question by:MAragorn
  • 3
  • 2
LVL 37

Expert Comment

ID: 12715147
We're not here/allowed to make your assignements.
We're here to help you with *what you already have*
LVL 13

Expert Comment

ID: 12715148
homework is prevented here, we can only provide tips and solve existing code problems

Author Comment

ID: 12715160
sorrry... i'll put in what i've worked out as soon as i write it up
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 37

Accepted Solution

zzynx earned 375 total points
ID: 12715176
To make you familiar with command line arguments:
- Start making a program that accepts some arguments
- Let it print out those parameters.

- Then parse those arguments as doubles
- increment the sum (initially 0) with that double
- divide the sum by the number of arguments to become the mean

Author Comment

ID: 12729343
thanks for your help... i managed to solve the mean but the SD was well hard
LVL 37

Expert Comment

ID: 12729417
>> i managed to solve the mean but the SD was well hard
Good to hear.
Thanks for accepting

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question