Merge pull request 'test_3_plus_cleanup' (#5) from test_3_plus_cleanup into main

Reviewed-on: #5
This commit is contained in:
Marcin Kostrzewski 2022-05-18 12:04:05 +02:00
commit 6caefc1e8e
3 changed files with 908 additions and 768 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

32
generateData.py Normal file
View File

@ -0,0 +1,32 @@
from random import randint
import random
import numpy as np
import pandas as pd
from math import sqrt
from scipy import stats
from scipy.stats import sem
from scipy.stats import t
import matplotlib.pyplot as plt
from statistics import mean, stdev
from scipy.stats import ttest_ind, ttest_1samp, ttest_rel
man_heights = np.random.normal(175, 10, 500)
woman_heights = np.array([x-randint(1, 10) for x in man_heights])
weights_before = np.random.normal(80, 10, 500)
weights_after = np.array([x-randint(1, 5) for x in weights_before])
man_heights = np.round(man_heights, 2)
woman_heights = np.round(woman_heights, 2)
weights_before = np.round(weights_before, 2)
weights_after = np.round(weights_after, 2)
dataset = pd.read_csv('experiment_data.csv')
dataset['Weight before'] = weights_before
dataset['Weight after'] = weights_after
dataset['Male height'] = man_heights
dataset['Female height'] = woman_heights
dataset.to_csv("experiment_data2.csv", encoding="utf-8", index=False)