Merge pull request 'test_3_plus_cleanup' (#5) from test_3_plus_cleanup into main
Reviewed-on: #5
This commit is contained in:
commit
6caefc1e8e
File diff suppressed because one or more lines are too long
1000
experiment_data.csv
1000
experiment_data.csv
File diff suppressed because it is too large
Load Diff
32
generateData.py
Normal file
32
generateData.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user