Hello Everyone, Below dataset shows the automobile sales for each individual and the duration of time they spent using those vehicles. I want to create a table which shows number of individuals who bought 1 vehicle, 2 vehicles, 3 vehicles etc.. Also, I need to know average age of these individuals, %males, %females and average duration these individuals spent using those vehicles. Below is the sample dataset. Customer_ID sales age gender sdate edate 1 car 12 M 1/1/2001 1/12/2001 1 bike 12 M 1/2/2001 1/18/2001 1 truck 14 M 1/6/2003 1/8/2003 2 car 22 F 3/4/2001 3/8/2001 3 bike 34 M 2/4/2002 2/12/2002 3 bike 34 M 2/10/2002 2/24/2002 3 truck 35 M 2/14/2003 2/18/2003 6 bike 74 F 3/15/2003 3/18/2003 4 car 40 M 3/15/2003 3/18/2003 4 truck 41 M 3/20/2004 3/26/2004 5 bike 32 F 3/23/2001 3/29/2004 My output should look something like below. First column represent; number of vehicels sold . Second Column represents, how many such individuals bought these vehicles. Example: There was 1 sale for 3 subject IDs (ID-2,6,5), 2 sales for only one ID (ID-4) etc. Now I need find average age of individuals, %males, %females and average duration these individuals used these vehicles. No of vehicles No of Individuals Avg Age (Mean, SD) %males %females Avg duration (Mean, SD) 1 3 2 1 3 2 The average age of first row in the above table should be: (22+74+32)/3. But, there is an outlier 74 in this age. What is the best way to calculate average age if there is an outlier. Moreover, the third row has two individuals who had three sales. So, will the average age be (12+12+14+34+34+35)/6. How should I calculate. Guide me. Thank you in advance!
... View more