Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Taking average of specific data from a data set
Replies: 2   Last Post: Feb 7, 2013 8:50 PM

 Messages: [ Previous | Next ]
 jomarbueyes@hotmail.com Posts: 196 Registered: 3/7/05
Re: Taking average of specific data from a data set
Posted: Feb 7, 2013 3:33 PM

On Thursday, February 7, 2013 3:00:12 PM UTC-5, Mohammad wrote:
> Data= 0.11,( -1.11, -0.75), -0.02, -0.36, (-0.97), -0.35, (-1.02, -1.33, -1.00), -0.15, (-0.66, -0.59, -1.21, -0.70), 0.06, (-1.65), 0.03, 0.25, (-1.35), -0.08,(-0.91, -0.82, -1.29), -0.26
>
>
>
> In this data set 7 events have values less than -0.5. ( ) indicate one event, this is for better understanding, don't have in real data. My purpose is to take average of each event > sum all of this average > again divide this sum by total number of events (i.e.7).
>
>
>
> This process will repeat for 40 data set. Thanks in advance for your help.
>
>
>

I'm not sure I fully understand your question. If you want to process only those elements greater than or equal to -0.5, you can extract them from the 'Data' array by

newData = Data(Data >= -0.5);

If you only want the sum, not to extract them, you can do that by

total = sum( Data(Data >= -0.5) );

HTH

Jomar

Date Subject Author
2/7/13 jomarbueyes@hotmail.com