Last active
October 25, 2015 00:55
-
-
Save Akramz/5b779f20cdc921016d6b to your computer and use it in GitHub Desktop.
math analysis of the null hypothesis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from ggplot import * | |
import scipy | |
import scipy.stats | |
import pandas | |
df = pandas.read_csv('new.csv') | |
with_rain_mean = np.mean(df['ENTRIESn_hourly'][df['rain'] == 1]) | |
without_rain_mean = np.mean(df['ENTRIESn_hourly'][df['rain'] == 0]) | |
U, p = scipy.stats.mannwhitneyu(df['ENTRIESn_hourly'][df['rain'] == 1], df['ENTRIESn_hourly'][df['rain'] == 0]) | |
print with_rain_mean, without_rain_mean, U, p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment