Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have a record of 100,000 Muslim names, i want to calculate the %age of male and female;
is there any way to mention gender in short time via business intelligent logic?
Posted
Updated 26-Jan-11 20:52pm
v2

I am confused.

How can you tell a persons Gender from their name?
Short of going back and asking them there is no way of obtaining this.
I think you would have serious problems of accuracy regardless of the approach taken.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Jan-11 3:49am    
Dalek, those are Muslim names, they are well identified by first name. It was already a similar discussion about Indian names. Still, I argued: what if a foreign person gets Indian citizenship? One very interesting CodeProject author from Southern India explained that they don't have family names, so when this guy immigrated to USA, he created one composed from ancestor's names. His official USA "last name" is approximately the length of the present comment...
Dalek Dave 27-Jan-11 4:05am    
I understand.
I still cannot see how you could possibly infer their gender.
Genders change, quite regularly sometimes, dependant on mood or situation.
But even if you took the dominant gender, it is still not indicated by name is it?

I have known some very masculine women and some very feminine men, so the gender is not even indicated by the sex of the individual.
As I say, you would have to ask them one at a time.
Ryan Zahra 27-Jan-11 4:22am    
I agree 100% with Dalek. Unless you know the gender, you'll never be 100% accurate.
Consider the following table, with the following columns:
Name Surname Gender Age
If the records are stored in a data table, this could be easily done by:
C#
DataView dv = new DataView(dtSource);
dv.RowFilter = "Gender = 'M'";
int maleAge = 0;
for (int i = 0; i < dv.Count; ++i)
{
       maleAge += Convert.ToInt32(dv[3]); //where 3 is the person's age
}
double maleAvgAge = maleAge / dv.Count;

dv.RowFilter = "Gender = 'F'";
int femaleAge = 0;
for (int i = 0; i < dv.Count; ++i)
{
       femaleAge += Convert.ToInt32(dv[3]); //where 3 is the person's age
}
double femaleAvgAge = femaleAge / dv.Count;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900