Personality Traits Survey Analysis
๐ Dataset Name
๐ Objective
To analyze relationships between personality types and behavioral traits such as stage fear and social exhaustion, using statistical and visual exploration methods.
๐งพ Dataset Description
Column Name |
Description |
Personality |
Categorical value representing personality type (e.g., Introvert, Extrovert) |
Stage_fear |
Yes/No response indicating whether the respondent has stage fear |
Drained_after_socializing |
Yes/No response indicating if the respondent feels drained after socializing |
(Optional additional fields) |
Can include other numeric or categorical traits (e.g., age, gender, etc.) |
๐ Preprocessing Steps
Binary Encoding
The Yes/No responses were mapped to numeric values to enable correlation and aggregation:
df['Stage_fear'] = df['Stage_fear'].map({'Yes': 1, 'No': 0})
df['Drained_after_socializing'] = df['Drained_after_socializing'].map({'Yes': 1, 'No': 0})
๐ Analysis & Visualizations
1. Grouped Mean by Personality
grouped = df.groupby('Personality').mean()
- This computes the average value of each numeric column per personality type.
- It gives insights such as:
โค What percentage of introverts have stage fear?
โค Do extroverts report lower exhaustion after socializing?
2. Bar Plot of Averages by Personality
grouped.plot(kind='bar', figsize=(12, 6))
- Visualizes how traits like Stage_fear or Drained_after_socializing vary across personality types.
- Example Insight: "Introverts average 0.85 for stage fear, while extroverts average 0.2."
3. Count Plot of Personality Types
sns.countplot(x='Personality', data=df)
- Displays the distribution of respondents by personality type.
- Useful for understanding sample balance.
4. Heatmap of Correlations
sns.heatmap(df.corr(numeric_only=True), annot=True, cmap='coolwarm', fmt=".2f")
- Shows pairwise correlations between numeric features.
- Key insights:
- Strong correlation between Stage_fear and Drained_after_socializing?
- Are certain traits inversely correlated?
- Strong correlation between Stage_fear and Drained_after_socializing?
5. Pair Plot by Personality (Optional Deep Dive)
sns.pairplot(df, hue='Personality')
- Visualizes pairwise relationships between multiple features.
- Colored by personality type, useful for clustering behavior.
Google Collab: Personality Trait