# Finding the Mean and SD of values to xN

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,
mean=5.0
standard deviation=3.1622776601683795
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Software engineerCommented:
We're not here/allowed to make your assignements.
We're here to help you with *what you already have*
0
Commented:
homework is prevented here, we can only provide tips and solve existing code problems
0
Author Commented:
sorrry... i'll put in what i've worked out as soon as i write it up
0
Software engineerCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
thanks for your help... i managed to solve the mean but the SD was well hard
0
Software engineerCommented:
>> i managed to solve the mean but the SD was well hard
Good to hear.
Thanks for accepting
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.