Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
Profit Analysis
The XXX determines the profit in each financial year.
Since the year 2002, the figures are available on an annual basis in $.
For this period:
1.determine the mean gain (arithmetic mean)
2. the maximum gain
3. the minimum gain
4. the largest deviation from the mean value

What I have tried:

Profit Analysis
The XXX determines the profit in each financial year.
Since the year 2002, the figures are available on an annual basis in $.
For this period:
1.determine the mean gain (arithmetic mean)
2. the maximum gain
3. the minimum gain
4. the largest deviation from the mean value
Posted
Updated 8-Feb-18 23:28pm
Comments
OriginalGriff 9-Feb-18 5:09am    
And?
What have you tried?
Where are you stuck?
What help do you need?
Member 13669721 9-Feb-18 5:15am    
i have no idea how to do my homework , i'm beginner in programing :(

1 solution

Quote:
i have no idea how to do my homework , i'm beginner in programing :(

Well, we aren't going to do it for you - that would defeat the whole purpose of homework, and you wouldn't get any better!

So, sit down and get started with the bits you do know how to do!
You have a set of figures, then you get from somewhere - I have no idea where - so start by reading those and storing them somewhere. You know how to do that bit, I assume?

After that, it's not really complex, these are basic statistic functions.
For example, the first: Arithmetic mean of the gain. Gain is presumably in the data, or you need to process the data to calculate the gain - again, I have no idea what your data is, so you need to look at that.
Once you have the "gain values" arithmetic mean is simple: sum(values) / count(values)
So if you have three values 1, 3, 5 then sum(values) / count(values) == (1 + 3 + 5) / 3 == 9 / 3 == 3
That's simple to code, yes?

Give that a try, see how far you get, and then show me what you have and we'll move on. OK?
 
Share this answer
 
Comments
Member 13669721 9-Feb-18 5:29am    
ok :)
i will try
thanks ..
OriginalGriff 9-Feb-18 5:44am    
That's all we ask! :thumbsup:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900