Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

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


  • Prev by Date: Re: Number of digits
  • Next by Date: Re: Parse results from Solve
  • Previous by thread: Re: Means
  • Next by thread: Re: Means