how to calculate mean and variance in online learning by matlab? suppose we have a stream of data that each time we receive only 40 of data. i want to update mean and variance of this data set by get each 40 data. I would like every time I get 40 data, I update mean and variance of the all data that received so far. please pay attention that I could not save all data and each time I can save only 40 data.
thanks a lot