CTK Exchange
CTK Wiki Math
Front Page
Movie shortcuts
Personal info
Awards
Terms of use
Privacy Policy

Interactive Activities

Cut The Knot!
MSET99 Talk
Games & Puzzles
Arithmetic/Algebra
Geometry
Probability
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
My Logo
Math Poll
Other Math sit's
Guest book
News sit's

Recommend this site

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Products to download and subscription Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

CTK Exchange

Subject: "Calculating Averages"     Previous Topic | Next Topic
Printer-friendly copy     Email this topic to a friend    
Conferences The CTK Exchange This and that Topic #902
Reading Topic #902
Steve
guest
Jun-08-09, 02:46 PM (EST)
 
"Calculating Averages"
 
   Is it possible to calculate the average of a series of numbers without knowing all of the values in the series? An algorithm would be useful in computer programs where storage may be limited or where a running average over a long time period may be desired.

If I have an average A based on n samples, can I use only A and n to calculate the new average?


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
alexbadmin
Charter Member
2388 posts
Jun-08-09, 02:54 PM (EST)
Click to EMail alexb Click to send private message to alexb Click to view user profileClick to add this user to your buddy list  
1. "RE: Calculating Averages"
In response to message #0
 
   So assume an average of some n numbers is A and the average of a different group of m numbers is B. If I understand correctly, you ask whether it is possible to obtain the average of the combined group of n+m numbers. This average is

(An + Bm) / (n + m)

and could be calculated recursively via

An+1 = (nAn + an+1) / (n + 1)

for a sequence a1, a2, ... and A1 = a1.

You must be aware of the accumulation of the run-off errors, of course.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top

Conferences | Forums | Topics | Previous Topic | Next Topic

You may be curious to have a look at the old CTK Exchange archive.
Please do not post there.

Copyright © 1996-2018 Alexander Bogomolny

Search:
Keywords:

Google
Web CTK