Skip to content

Commit

Permalink
Create data_analysis.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored May 11, 2024
1 parent cfc41dd commit 05a8dec
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions data_science/data_analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pandas as pd
import scipy.stats as stats

def analyze_data(data):
# Analyze data using Pandas or SciPy
# For example, calculate summary statistics, perform statistical tests, or fit distributions

# Calculate summary statistics
summary_stats = data.describe()

# Perform statistical tests
t_stat, p_val = stats.ttest_1samp(data['feature'], 0)
print(f'T-statistic: {t_stat:.3f}, p-value: {p_val:.3f}')

# Fit distributions
param_estimates = stats.norm.fit(data['feature'])
print(f'Estimated parameters: {param_estimates}')

0 comments on commit 05a8dec

Please sign in to comment.