Re: Averaging
- To: mathgroup at smc.vnet.net
- Subject: [mg41976] Re: Averaging
- From: "Will Self" <wself at msubillings.edu>
- Date: Mon, 16 Jun 2003 03:56:22 -0400 (EDT)
- References: <bc6nok$2i3$1@smc.vnet.net> <bc7oh5$6b7$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I feel that any attempt of this sort is misleading and probably useless. If you look at the original data, use ListPlot, there is little in common for three data sets except for the significant spike at the end. I don't know what the science behind this is, but I would want to explain the spike, not do some meaningless averaging. "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> wrote in message news:bc7oh5$6b7$1 at smc.vnet.net... > Hi, > > I suppose, that the data are in lst1,lst2,lst3 > I will construct a Interpolation[] function for every > data set and than average the interpolations. > > Your data sets iclude multiple x values and the repeated > values must be removed with > > ave[{{a_, b_}}] := {a, b} > ave[a : {{_, _} ..}] := Module[{x, y}, > {x, y} = Transpose[a]; > x = First[x]; > y = Plus @@ y/Length[y]; > {x, y} > ] > > list1 = ave /@ Split[lst1, First[#1] == First[#2] &]; > list2 = ave /@ Split[lst2, First[#1] == First[#2] &]; > list3 = ave /@ Split[lst3, First[#1] == First[#2] &]; > > > Now a Interpolation[] can constructed with > > ip1 = Interpolation[list1]; > ip2 = Interpolation[list2]; > ip3 = Interpolation[list3]; > > > and the average can be plotted with > > Plot[Evaluate[(ip1[x] + ip2[x] + ip3[x])/3], {x, 0, 320}] > > Regards > Jens > > > C B wrote: > > > > Hello, > > > > Three repetitions of an experiment were carried out. The data is copy pated > > below. I hope the main contributors on this email list are able to import > > this data into a spread sheet program and have a look at it. If you are not > > let me know and I should be able to send that data to you in some other > > format of your preference. > > > > In the data, > > > > X coordinate is 'Time' expressed in minutes. > > Y coordinate is 'Gas concentration' expressed in PPM. > > > > If you look and plot the data for all the repetitions, you will see that all > > the plots are not exactly the same. The difference is mainly due to the > > inherrent errors and variance factors in any experiment. > > > > What I am looking for is a mathematical tool or a treatment or some way of > > coming up with one data set representing the average effect of all the three > > repetions. >