February 22, 2013

The code source of this blog


February 1, 2013

Pennsylvania expenses and Chester city criminality

As we can see in this picture the evolution of the total expense in Pennsylvania follow the curve of the violent crimes in Chester City . The Health and human services is the cause of this principal expense.
The curve of the protections of person is following the violent crimes. But in 2011 the decreased expense has created certainly the growth of the violent crime of the same year.

January 9, 2013

Predict violent crime for 2013 at chester city , PA

This is a study of crime prediction at chester city, PA.
Prediction is an hard task. With a low data content the must is to exponential method to predict the violent crimes rate.
For 2013 , the violent crimes should decrease lowly .
It is a tendency.

Predicted crimes value by 100k hab are

Real value for 2012 Predict for 2013
3174 3165.4009559846
Murder and
64 64.2627077813
50 51.7887222942
Robbery 637 635.089397512
2423 2414.2601283972

January 8, 2013

Chester city criminality evolution

I continue my study with chester city in pennsylvania. A very hard city where the criminality is crazy.
I give the violent crimes and property crimes values extracted from FBI and Pennsylvania Uniform Crime Reporting Program.
We can see an long evolution of the criminality during this last decade, apparently more effort  are made in year 1999 and 200 to resolve some issues in security. but the crime is increasing since this period. 

Brut data

2012 2011 2010 2009 2008 2007 2006 2005 2004 2003 2002 2001 2000 1999 1995 1990 1985 1980
3174.882629108 3148.4741784038 2441.8355312534 2647.2118043199 2879.5239914843 2568.0045653415 2652.9346741797 2524.9384985537 1968.2813215219 1491.2918248136 1847.8495785606 1540.4643089607 3022.7383730396 3178.8539264549 5484.1647273095 5191.6093272171 3107.1683309558 3216.278306531
Murder and
64.5539906103 61.6197183099 64.3293663557 38.3257138164 46.399912659 73.3715590098 48.5292928204 40.5504041524 51.1591588357 18.8430374976 51.32915496 35.2571056628 51.5547837412 22.3164472216 55.6511180816 35.8371559633 15.6027104137 35.0071108194
49.882629108 67.4882629108 83.0920982095 68.4387746722 114.635078334 67.9366287127 56.6175082904 91.914249412 83.4702065214 88.8314624889 83.747568619 43.3933608158 70.5486514354 128.9394728359 204.8972983912 222.1903669725 187.2325249643 126.9007767203
Robbery 636.7370892019 627.9342723005 552.1603945534 531.0848914561 646.8693705988 627.7344493057 649.7533094282 619.0695033927 457.7398422144 288.029287464 437.6485843959 368.8435669343 697.3462853422 662.0546009075 1558.2313062835 1017.7752293578 815.7988587732 1207.7453232688
2423.7089201878 2391.4319248826 1742.2536721347 2009.3624243752 2071.6196298925 1798.9619283133 1898.0345636408 1773.4043415966 1375.9121139503 1095.5880373631 1275.1242705857 1092.9702755478 2203.2886525208 2365.5434054899 3665.3850045533 3915.8065749236 2088.5342368046 1846.6250957226
3606.220657277 3879.1079812207 3355.8486115578 3556.0787319664 3788.416398275 3614.2286475176 3957.8334366828 4000.9732096997 3473.437626215 2543.810062182 3317.4843311001 3221.9570405728 4862.430129701 5482.4072007736 8714.4591723161 7530.5810397554 6851.8188302425 7679.6849360026
Burglary 1364.4366197183 1625.5868544601 1249.0618634073 1335.9248816009 1228.2329821497 1187.5322698986 1197.0558895689 1297.6129328756 1066.2645736288 619.1283749226 645.6667387076 659.0366673899 1240.0282194606 1522.4776215627 2592.8361833451 2119.1704892966 2342.6355206847 3369.4344163658
1866.1971830986 1836.8544600939 1710.0889889568 1730.1322237127 1948.7963316775 1725.5903693035 1995.0931492815 1919.3857965451 1658.6337812004 1152.117149856 1745.1912686406 1659.7960512042 2243.9897975796 2534.1565622753 4062.5316199535 3741.3990825688 3586.3944365193 3435.0727491522
299.2957746479 416.6666666667 396.6977591937 490.0216266528 611.3870844478 701.1060083154 765.6843978324 783.974480279 748.5392713859 699.8842499125 842.8787551329 816.3376003471 1191.1868453899 1157.9756502765 2059.0913690175 1670.0114678899 922.7888730385 875.1777704846
Arson 76.2910798122 76.2910798122 88.4528787391 109.5020394755 81.88219881 84.2414196038 67.4017955838 97.3209699657 72.6998572929 72.6802874909 83.747568619 86.7867216316 187.2252672709 267.7973666592

January 6, 2013

Improving house can decrease the violent criminality


The subject of the study has permitted to obtain a linear model. A model is entirely good to test or stress a system. In this idea , I propose some test suggestions.
I choose to follow the city of Chester in Pennsylvania that is our maximum value for the violent crimes in USA and the mean of all the violent crimes in USA.

In our study,the actual violent crimes of chester city is 4877 for 100k habitant .It should be different today.
Our model estimate the value to 3916 violent crimes. An error of 20%
Poverty and crime rose as the chester city declined since 1950.
The racial makeup of the city was 17.2% White, 74.7% Black, 0.4% Native American, 0.6% Asian, 0.1% Native Hawaiian, 3.9% of some other race, and 3.0% from two or more races. 9.0% were Hispanic or Latino of any race.

The model estimate the mean of the violent crimes in USA to 1174 violent crimes to 100k habitant

Some question could be given to stress our model .

Immigration reducing

The first I propose : is reducing recent immigrant a solution ?
If we raise 10% of the recent immigration the model give this result :
on chester city the violent crime appear stable to 3917 violent crimes
on the usa the mean increase to 1186(+1%) violent crimes  per 100k.
Recent immigration appears not a problem for the security.

In second : Is reducing all immigrant generation a solution ?
Chester city decrease the violent crime to 3915 violent crimes per 100k .
On the mean in USA the violent crime decrease to 1171 violent crimes.
The result is not signifiant.

The idea of reducing immigration is not a good idea and not offers a good result.


Is giving a better education a solution ?
If we decrease by 10% the not graduate or less graduate the model is offer this result:
Chester city increase their violent crimes value to 3922.
And the mean violent crime in USA to 1181.

The result is not corresponding on the simple idea that a better education can really change the given actual criminality.


Is increasing ethnic mix a solution ?
If we increase the white population by 10% , the model is offering this data:
for chester city : 3916 violent crimes . No impact on the criminality.
for mean in USA : 1166 violent crimes

As other result,we can improve the criminality in adding more white population.


Is decreasing house boarded a solution?
House boarded is a ravage in a city. Offering inglorious area and give bad image on the land this house need to be cleaned.
If we decrease by 10% the house boarded , the criminality decrease :  
for chester city we obtain 3888 violent crimes per 100k that is  -0.7%
for the mean in USA the value decrease by 0.5% at 1168 violent crimes


Is increasing employment a solution ?
The employment permits a more great stability on a family.
if we increase the employment by 10%, the criminality increase:

for chester city we obtain 3946 violent crimes per 100k that is  +0.8%
for the mean in USA the value decrease by 5,3% at 1235 violent crimes

It s an interesting point to save . How to explain if we increase the employment the criminality increase. The model don t explain some relation between the employment and the violent crimes.

Mathematical approach

I have an other approach , more mathematic. For example we can search some extrema in our model. 
I start in reviewing the linear model and finish in testing each value independently.

Best regression values

There is two extrema value in our model. A positive value that if we decrease it should decrease the violent crimes and a negative value that inversely do the same thing.

For the positive value, the name is OwnOccMedVal that corresponds to the owner occupied housing on median value. If we decrease this value on all county or in cherster city the result decrease.
For chester city the criminality decrease to 3902 (-0.35 %)
For the mean in USA the value is important and decrease to 1084 violent crimes by 100k hab (-7,60%).

For the negative value, the name is numbUrban that corresponds to the number of people living in areas classified as urban.
If we increase this value by 10 pourcents, the violent crimes decrease on chester city and in the USA.
for chester city the value decrease to 3895 violent crimes (-0,52%) that is better that the previous value.
fro the mean in the USA the result is 1155 violent crimes and decreasing by 1,60%.

Testing each variables independently

Testing value by value is more mechanic but permit to search between the model on the data which value to change to obtain a best result.

I have tested in increasing each value by 10 %
I obtain two values , one for chester city and one for the mean in the USA.
Fo chester city the value is PctLargHouseOccup corresponding to the percent of all occupied households that are large (6 or more people). We decrease the criminality to 3786 crimes (-3,31%).
For the mean of the USA is PctPersOwnOccup corresponding to the percent of people in owner occupied households. We decrease to the principal value to 1016 (-13,43%) .

In testing in decreasing each value by 10% we obtain different value for chester and the mean value in the USA.
For chester city the more impacting variable is racepctblack correspond to the pourcent of black people in the city. In chester city the number is more than 74%. In decreasing this value by 10 pourcent we can decrease the violent crimes to 3757 (-4,05%).
For the mean in the USA the value is PersPerOccupHous corresponding to the mean persons per household. In decreasing this value by 10% the result is decreasing to 1048 (-10,72%).


It s difficult to give a valid conclusion on the fact that the most important variables that is apt to decrease  the violent crimes are based on house. It ' s easy to imagine that in giving more possibility to be owner of their house we can improve the socio economic environment . But to enhance this need , the population have to get a better economic situation that is not the case at Chester city.   
In chester city, reducing black concentration and increasing the house size could affect durably the criminality. It s not impossible to politics to take action on this parameters.