This project analyzes the effectiveness of two Fitness membership packages, Standard and Premium, on members' satisfaction and attendance frequency using a dataset in Excel format.
The dataset is loaded into a Python environment using pandas. Ensure the file path matches your dataset location.
import pandas as pd
df = pd.read_excel('Data/spor_salonu_uyelik_veriseti.xlsx')Calculate and examine the averages for Satisfaction Score and Attendance Frequency for both membership types.
satisfaction_avg = df.groupby('Uyelik_Paketi')['Memnuniyet_Puani'].mean()
attendance_avg = df.groupby('Uyelik_Paketi')['Katilim_Sikligi'].mean()Determine if the data meets the assumptions for parametric testing.
Use the Shapiro-Wilk test to check for normal distribution of Satisfaction Scores for each package.
from scipy.stats import shapiro
stat, p = shapiro(df[df['Uyelik_Paketi'] == 'Standart']['Memnuniyet_Puani'])If assumptions are not met, use the Mann-Whitney U Test, a non-parametric test, to compare the satisfaction scores between the two packages.
from scipy.stats import mannwhitneyu
u_stat, p_value = mannwhitneyu(df[df['Uyelik_Paketi'] == 'Standart']['Memnuniyet_Puani'],
df[df['Uyelik_Paketi'] == 'Premium']['Memnuniyet_Puani'])- If p < 0.05, H0 is rejected, indicating a statistically significant difference.
- If p > 0.05, H0 cannot be rejected, indicating no statistically significant difference.
- Python 3.11
- Pandas
- SciPy
The dataset should contain the following columns: Uyelik_Paketi, Memnuniyet_Puani, and Katilim_Sikligi.
- Ensure the dataset file is in the specified path.
- Run the Python script to perform the analysis.