# Re: [ferret_users] ave vs. sum and ngd

• To: martin.schmidt@xxxxxxxxxxxxxxxxx
• Subject: Re: [ferret_users] ave vs. sum and ngd
• From: Peter Szabo <szabpet83@xxxxxxxxx>
• Date: Mon, 22 Jun 2009 16:16:05 +0200
• Cc: ferret <ferret_users@xxxxxxxx>
• References: <8cc42c030906220231n7ea224bfg2de83a60cb0e44e8@xxxxxxxxxxxxxx> <4A3F5CC5.8060401@xxxxxxxxxxxxxxxxx>
• Sender: owner-ferret_users@xxxxxxxx

Martin,
as i am dealing with climatology, all the months are equally important, so i should use the @sum/3 for a spring average.
Thanks, Peter

---------- Forwarded message ----------
From: Martin Schmidt
Date: Mon, Jun 22, 2009 at 12:28 PM
Subject: Re: [ferret_users] ave vs. sum and ngd
To: Peter Szabo <szabpet83@xxxxxxxxx>

Peter, the answer is most probably the following example:

yes? list (1.74*31/2+8.74*30+15.34*31/2)/61
VARIABLE : (1.74*31/2+8.74*30+15.34*31/2)/61
8.638

The values at the edges are counted with half weights. However, I am not sure about the remaining difference.

Greetings,
Martin

Peter Szabo wrote:
Dear Users,
i know there is a difference between @ave and @sum, @ngd. It is not really a
question, but still want to post it.

I list 3 timesteps:
16-MAR-1962 / 16:   1.74
16-APR-1962 / 17:   8.74
16-MAY-1962 / 18:  15.34

Here is the real average for it. The mean i guess.
8.605

The (weighted) "average" is slightly different. Though if there is no
missing value, they should be the same.
8.643

Why is that weightening in @ave? The 3 timesteps are equivalent for me. I
should just use the sum and dividing then?
If i use @var later on (which is also a weighted variance), should i use
@ave then?

Thanks, Peter