Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: time serie -> sum inside a loop

  • To: mathgroup at
  • Subject: [mg46131] Re: time serie -> sum inside a loop
  • From: drbob at (Bobby R. Treat)
  • Date: Sat, 7 Feb 2004 04:02:16 -0500 (EST)
  • References: <bvvneh$j53$>
  • Sender: owner-wri-mathgroup at

I'm not clear what "solve" means here; there are no conditions
mentioned. I'm also not sure if you mean mu to be an unknown, or
calculated from some part of the data. But here goes (outputs

y[i_] := Sum[a[k] - mu, {k, i}]
n = 8;
b = Array[a, n]
mu =.;
y /@ Range@8
mu = Tr@b/n;
y /@ Range@8

This version might be instructive too:

y[i_] := Expand[Sum[a[k] - mu, {k, i}]]
mu = Tr@b/n;
y /@ Range@8

In either case, Sum[a[k]-mu,{k,i}] could be replaced by


"paolo" <tarpanelli at> wrote in message news:<bvvneh$j53$1 at>...
> Given a time serie
> a:= {a[[1]],a[[2]],a[[3]],...,a[[n]]}
> how can i solve this loop with mathematica?
> -------------
> Y[[i]]:=Sum_(for k=1 to i) [a[[k]]-mu]
> -------------
> where mu is the mean of time serie a.
> thanks
> Paolo Tarpanelli

  • Prev by Date: RE: random numbers?
  • Next by Date: RE: derivation of a picewise defined function
  • Previous by thread: Re: time serie -> sum inside a loop
  • Next by thread: Re: time serie -> sum inside a loop