Re: Basic Stat Question
- To: mathgroup at smc.vnet.net
- Subject: [mg42615] Re: [mg42591] Basic Stat Question
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Fri, 18 Jul 2003 05:25:09 -0400 (EDT)
- References: <200307170745.DAA23013@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hello, John!
I guess it's just a matter of using Select. For example, the list1 could be
In[1]:=
list1 = Transpose[{Table[Random[Real, {140, 170}],
{100}], Table[Random[Integer, {1, 18}], {100}]}]
i.e., 100 pairs {height, age}. Then
In[2]:=
<< "Statistics`"
In[3]:=
Mean /@ Table[Select[list1, #[[2]] == j & ],
{j, 1, 18}]
will give you the desired result. If you have triplets {gender, height, age}
you may first filter out "Girls" with Select, and then apply the procedure
above, and so on.
Greetings,
Tomas
----- Original Message -----
From: <Moranresearch at aol.com>
To: mathgroup at smc.vnet.net
Subject: [mg42615] [mg42591] Basic Stat Question
> I have a list l1= {{xi,yi}}
> I want to find the Mean xi where s <y < t
> for a series of s and t.
>
> So say I have the height of a million children and I want to know the
average
> height at age 1, 2, 3...18. How do I do this?
>
> Also the data a field "Gender" how do I select the subset "Girls" or
"Boys"
> to analyze.
> Thank you.
>
> John
>
>
>
- References:
- Basic Stat Question
- From: Moranresearch@aol.com
- Basic Stat Question