Python Forum
Python data prep help for confidence interval
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python data prep help for confidence interval
#1
Hi
I am getting my feet wet with Python 2.7 and would request help with any code logic that can help prep data for confidence interval.

Problem : From the data set I am trying to figure out the regions with a population of at least A where the number of houses per latitude/longitude is at least c and at least % of the houses have price between a and b with (1-x) confidence.

Overview : I am passing parameters from command line where the first I read population, second households, third percentage of homes , fourth price range that fall in the percentage and finally the confidence factor. Example : python stat.py population households 70 100000 300000 0.9 Sample data set:
population households median_income median_house_value
9873 4012 5.4032 318500
10877 3958 4.6357 244900
12427 2826 2.7377 28300
12873 3931 8.0137 399200

İmage


Here is how far i got:
a) Have the code written to check the command line parameter for population and household. (housing is the data set ,transactions_pop and transactions_households are read from command line)
Code: results_population = housing[(housing.population >= transactions_pop) & (housing.households >= transactions_households)]
b) What I need help is logic/code to find out let's say 70% of the homes between 100000 300000.This data would be passed to step c below. I know I not supposed to ask logic questions but appreciate any help.
c) Have the last part of the code written to find the confidence interval. This is where we do the mean,standard dev and find confidence interval.

Appreciate help/inputs...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mapping a value to an interval JazonKuer 12 2,008 Mar-17-2023, 07:59 PM
Last Post: Gribouillis
  Confidence interval after doing penalised cox regression HatemAli 0 1,145 Feb-23-2022, 11:02 PM
Last Post: HatemAli
  Complex X Tick Interval JoeDainton123 0 1,476 Oct-05-2020, 07:27 PM
Last Post: JoeDainton123
  Updating a matrix in a time interval inside a for loop vp1989 4 2,910 May-17-2020, 07:15 PM
Last Post: vp1989
  Assigning Data from one column to another with different associated timing interval alexafshari 1 1,960 Apr-30-2020, 03:59 PM
Last Post: pyzyx3qwerty
  adddate interval in python Steve42 2 2,213 Apr-16-2020, 08:24 PM
Last Post: Larz60+
  save data in .txt after certain interval Shaswat 1 2,102 Oct-13-2019, 07:07 AM
Last Post: Gribouillis
  How define iteration interval increment SriMekala 5 4,358 Jun-01-2019, 01:06 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020