Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Created October 13, 2019 12:20
Show Gist options
  • Save MariaLavrovskaya/4cd92f521b4256b9bdf44c3d0173e82b to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/4cd92f521b4256b9bdf44c3d0173e82b to your computer and use it in GitHub Desktop.
airbnb_11
#Confidence interval for entire apartament / private room
import numpy as np, scipy.stats as st
conf_int_entire = st.t.interval(0.95, len(entire_subset)-1, loc=np.mean(entire_subset), scale=st.sem(entire_subset))
conf_int_private = st.t.interval(0.95, len(private_room)-1, loc=np.mean(private_room), scale=st.sem(private_room))
print(conf_int_entire, conf_int_private)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment