Extracting stats dependant on criteria

Lewis.P

New Member
Joined
Nov 25, 2012
Messages
3
I'm looking for a method of extracting data depending on a criteria and performing stats all within a single formula.

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Participant ID[/TD]
[TD]Genders[/TD]
[TD]Scores[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]M[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]M[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]F[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]F[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]F[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]M[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]F[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]M[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]F[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]F[/TD]
[TD]9[/TD]
[/TR]
</tbody>[/TABLE]

The data that I am looking to extract:
The mean male score.
The median male score.
The mode male score.
The range of male scores.
The frequency of male score of 8.
The standard deviation of male scores.

I've worked out the mean formula i think:
=SUM(SUMPRODUCT(--(Genders="male"),(Scores))/TotalMaleParticipants)
But I'm struggling with the others :(

In the past I have simply extracted the data depending on the gender in to two new tables and performed the statistical anaylsis on the new tables. But this is becoming a little overwhelming as the number of variables is around 20 (gender, age, ability level, etc.), the number of participants is over 300 and the number of factors with scores is around 20 so the work involved is giving me a massive head ache. I am hoping there is a method of doing this 'dissection' of the data and analysis within a single formula.

I have probably overlooked a very simple method :/
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Consider the following array formulas:

[TABLE="width: 286"]
<colgroup><col></colgroup><tbody>[TR]
[TD]=AVERAGE(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MODE(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MEDIAN(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MAX(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MIN(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=STDEV(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Consider the following array formulas:

[TABLE="width: 286"]
<tbody>[TR]
[TD]=AVERAGE(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MODE(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MEDIAN(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MAX(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=MIN(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
[TR]
[TD]=STDEV(IF(B$2:B$11="M",C$2:C$11))[/TD]
[/TR]
</tbody>[/TABLE]



Ahhhhh of course! I had overlooked the use of array formulas. Thank you!
Do you know how to best construct the 'frequency of a particular score given by males' formula?
I think I may have managed it with this but again I've probably overlooked something easier:
=SUMPRODUCT(--((Genders)="Male"),--((Scores)="8")))



Thanks again :)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top