Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: list manipulation, mean value

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22991] Re: list manipulation, mean value
  • From: "Deborah Leddon " <Dleddon at students.cas.unt.edu>
  • Date: Sun, 9 Apr 2000 01:45:54 -0400 (EDT)
  • Organization: University of North Texas
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

I have a rather involved question on how to partition a data list into 
sliding windowed components and then calculate a mean value 
followed by a running standard deviation.
For example, for the following data list:
 lis ={ 1,0,2,1,3,4} 

 with a length of  n=6, I want to take groups of data points of 
lengths running from 1 to n= 6 (length of the data list), perform a 
mean value and then take a running standard deviation (STD) as 
shown below:

For a group of length = 1, take from lis:
w(1) = {1,0,2,1,3,4}
perform mean value of each number (sublist;group length =1) to get
{1,0,2,1,3,4}, 
perform running standard deviations (STD) to get:
{STD[1], STD[{1,0}], STD[{1,0,2}], STD[{1,0,2,1}], STD[{1,0,2,1,3}],
STD[{1,0,2,1,3,4}]}
then put into a list called lets say "final".

For the next group of length = 2, take from lis:
w(2) = { {1,0}, {0,2}, {2,1},{1,3}, {3,4} }, *(note this is not just a 
partition of the list, but a sliding one)*
get the mean value of each sublist;
{1, 1, 1.5, 2, 3.5};
perform running standard dev.;
STD[{1}], STD[{1,1}], STD[{1,1,1.5}], STD[{1,1,1.5,2}], 
STD[{1,1,1.5,2,3.5}]
then append these STD values to the list 'final'.

then so on for w(3),.....,w(n=6). 

Eventually the goal is to get a 'final' list of running standard 
deviations in order to plot.

If anyone can help, I'd really appreciate it. Thanks for your time.

Debbie




  • Prev by Date: Re: making a column into a list
  • Next by Date: InequalitySolve with algebraic numbers and Simplify
  • Previous by thread: Re: Mod Bessel function bug ?
  • Next by thread: Re: list manipulation, mean value