Generating Synthetic Population Attributes
Challenge 23
Level: Easy to Medium
Description: You are a social scientist who needs to create some synthetic data for an imaginary population consisting of 1000 people, including attributes age, height, and weight. Start by generating a Gaussian age distribution using a mean of 40 and a standard deviation of 10, then bin people into four age groups: 'Children', 'Young Adults', 'Adults', and 'Seniors’. For each group, generate heights using a beta distribution with realistic parameters. Categorize heights into three groups: ‘< 160cm', ‘> 180', and 'rest’. Based on the binned height information, generate weights using a gamma distribution that accurately models weight distributions per age group. Visualize the relationships and identify patterns and correlations within this synthetic population.
Author: Keerthan Shetty
Challenge 23
Level: Easy to Medium
Description: You are a social scientist who needs to create some synthetic data for an imaginary population consisting of 1000 people, including attributes age, height, and weight. Start by generating a Gaussian age distribution using a mean of 40 and a standard deviation of 10, then bin people into four age groups: 'Children', 'Young Adults', 'Adults', and 'Seniors’. For each group, generate heights using a beta distribution with realistic parameters. Categorize heights into three groups: ‘< 160cm', ‘> 180', and 'rest’. Based on the binned height information, generate weights using a gamma distribution that accurately models weight distributions per age group. Visualize the relationships and identify patterns and correlations within this synthetic population.
Author: Keerthan Shetty