Personality Traits Survey Analysis

๐Ÿ” Dataset Name

   Dataset.csv

๐Ÿ“Œ 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?
       

 


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