Re: Means
- To: mathgroup at smc.vnet.net
- Subject: [mg73951] Re: Means
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Sat, 3 Mar 2007 01:18:52 -0500 (EST)
On 3/2/07 at 6:41 AM, JGBoone at gmail.com wrote:
>I was wondering if anyone knew how to take the mean of only half of
>a paired order. I have a table of 3000 pairs and want to take the
>average of the last half of the last number in the pair. I do this
>by N[Mean[Map[Last, list]]] is there any way to map to the last half
>of the list. Thanks
If I understand you correctly the following does what you want
In[7]:=
data=Table[{Random[Integer,{1,5}],Random[]},{20}];
In[8]:=
Mean@Take[data[[All,2]],-Floor[Length@data/2]]
Out[8]=
0.413096
--
To reply via email subtract one hundred and four