<jupyter_start><jupyter_text>Dublin Housing Market  the aim of this project is to look at the housing market trends in IrelandThe variables that i am using are - PropertyStatus- PropertType- Area per square feet- Transport Links- no of bedrooms- SalePrice1. First look at each variable and do a philosophical analysis about their meaning and importance.2. Univariate study: focus on the dependent variable ('SalePrice').3. Multivariate study: Understand how the dependent variable and independent variables relate.<jupyter_code>#import Libraries
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import pie, axis, show

# Display plots inline in the notebook
%matplotlib inline 
data=pd.DataFrame()<jupyter_output><empty_output><jupyter_text>Property StatusThis variable is categorical variable with two value {0= Old and 1= New}<jupyter_code>np.random.seed(256) # Set the random seed
status=['Old','New']
data['P_Status']= np.random.choice(status, 200,p=[0.60,0.40])

data['P_Status'].value_counts()<jupyter_output><empty_output><jupyter_text>Property TypeThis variable is categorical variable with two value {0= House and 1= Apartment}<jupyter_code>np.random.seed(256) # Set the random seed
ptype=['Apartment','House']
cnt = 0
for idx, val in enumerate(data.itertuples()):
    if data.P_Status[idx] == 'Old':
            data.loc[idx, 'P_Type'] = np.random.choice(ptype)
        
    if data.P_Status[idx] == 'New':
            data.loc[idx, 'P_Type'] = np.random.choice(ptype)
#data['P_Type']= np.random.choice(ptype, 200)
data['P_Type'].value_counts()<jupyter_output><empty_output><jupyter_text>Number of BedroomsThis variable is numerical variable with values 1-5, as it is obvious that bigger properties are less. and most properties sold have 1,2 or 3 bedrooms.<jupyter_code>#No of Bedrooms
np.random.seed(256) # Set the random seed

cnt = 0
for idx, val in enumerate(data.itertuples()):
    if data.P_Type[idx] == 'Apartment':
            data.loc[idx, 'Bedrooms'] = np.random.randint(1,4)
        
    if data.P_Type[idx] == 'House':
            data.loc[idx, 'Bedrooms'] = np.random.randint(1,5)
#data['P_Type']= np.random.choice(ptype, 200)
data['Bedrooms'].value_counts()<jupyter_output><empty_output><jupyter_text>SalePriceThis is a numerical data column we have the mean value of property and assume that it follows a gamma distributionaverage sale price of<jupyter_code>#data['SalePrice']= 297097.56 * np.random.gamma(1, 1, 200) + 458975.97/2
#data['SalePrice']= np.random.log(458975,1, 200)
#mu=458975
#sigma=297097
#x = np.linspace(min(100), max(100), 200)
#data['SalePrice'] = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2))
 #       / (x * sigma * np.sqrt(2 * np.pi)))
sns.distplot(data['SalePrice'])
#data
saledata= pd.read_csv('Sale_price.csv')
sns.distplot(saledata)
print(saledata['saleprice'].describe())
print(saledata['saleprice'].std())
print(saledata['saleprice'].median())
saledata.info()
import scipy as sc
import scipy.stats as stats
print('normal skewtest teststat = %6.3f pvalue = %6.4f' % sc.stats.skewtest(saledata['saleprice']))

print('normal normaltest teststat = %6.3f pvalue = %6.4f' % sc.stats.normaltest(saledata['saleprice']))
data<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup