User Tools

Site Tools


c:ps1-1:2019:schedule

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
c:ps1-1:2019:schedule [2019/10/02 08:40] – [Week06 (Oct 7, 9)] hkimscilc:ps1-1:2019:schedule [2019/10/10 01:27] – [Week02 (Sep 9, 11)] hkimscil
Line 16: Line 16:
 <WRAP half column> <WRAP half column>
 ===== ideas and concepts  ===== ===== ideas and concepts  =====
-정보의 시각화: 첫인상 +[[:b:head first statistics:Visualization|정시각화]]
-  * {{:info.vis.01.xlsx}} +
- +
-  * Scatter plot  +
-<code># Simple Scatterplot +
-attach(mtcars) +
-plot(wt, mpg, main="Scatterplot Example", +
-   xlab="Car Weight ", ylab="Miles Per Gallon ",  +
-   pch=19)</code> +
- +
-{{:c:ps1-1:2019:pasted:20190909-075028.png}} +
- +
-explanatory (설명) variable at x axis +
-response (반응) at y axis +
- +
-But, it does mean __no causal relationship__ between the two variables. Association between two does not guarantee a causal relationship.   +
- +
-Drawing a line among the data. +
-<code># Add fit lines +
-abline(lm(mpg~wt), col="red") # regression line (y~x) +
-lines(lowess(wt,mpg), col="blue") # lowess line (x,y)</code> +
-{{:c:ps1-1:2019:pasted:20190909-075639.png}} +
- +
- +
-A bit more fancy line  +
-<code># Enhanced Scatterplot of MPG vs. Weight +
-# by Number of Car Cylinders +
-library(car) +
-scatterplot(mpg ~ wt | cyl, data=mtcars, +
-   xlab="Weight of Car", ylab="Miles Per Gallon", +
-   main="Enhanced Scatter Plot", +
-   labels=row.names(mtcars))</code> +
-{{:c:ps1-1:2019:pasted:20190909-080032.png}} +
- +
-Line can be:  +
- +
-**__관계의 방향 (direction)__** +
-^  관계의 방향  ^^  +
-| {{:r.positive.png}}  | {{:r.negative.png}} +
- +
- +
-**__관계의 모양 (shape)__** +
-^  관계의 모양  ^^  +
-| {{:r.positive.png}}  | {{:r.curvepositive.png}} +
- +
-**__관계의 정도 (힘)__** +
-^  관계의 정도 (힘)  ^^  +
-[{{:r.StrengthA.png|Figure_4-1}}] [{{:r.StrengthB.png|Figure 4-2}}] +
-| [{{:r.StrengthC.png|Figure_4-3}}]  | [{{:r.StrengthD.png|Figure 4-4}}] +
-<WRAP clear /> +
-Pearson's r 의 의미 +
-__Relations, not cause-effect__ +
-[{{:r_eg.15.6.png?250 |Figure 6. Correlation And Causation}}] 상관관계 계수는 단순히 두 변인 (x, y) 간의 관계가 있다는 것을 알려줄 뿐, 왜 그 관계가 있는지는 설명하지 않는다. 바꿔 말하면, 충분한 r 값을 구했다고 해서 이 값이 두 변인 간의 '''원인'''과 '''결과'''의 관계를 말한다고 이야기 하면 __안된다__. 예를 들면 아이스크림의 판매량과 성범죄가 서로 상관관계에 있다고 해서, 전자가 후자의 원인이라고 단할 수 있는 근거는 없다. 이는 연구자의 논리적인 판단 혹은 이론적인 판단에 따른다.  +
-<WRAP clear /> +
- +
-__Interpretation with limited range__ +
-[{{:r_eg.15.71.png?250 |Figure_7._Correlation_And_Range}} +
-[{{:r_eg.15.7b1.png?250 |Figure_7._Correlation_And_Range}} +
-데이터의 [[Range]]에 대한 판단에 신중해야 한다. 왜냐 하면, 데이터의 어느 곳을 자르느냐에 따라서 r 값이 심하게 변하기 때문이다.  +
-<WRAP clear /> +
-__Outliers__ +
-[{{:r_eg.15.8a.png?250 |Figure_7._Correlation_And_Extreme_Data}}]  +
-[{{:r_eg.15.8b.png?250 |Figure_7._Correlation_And_Extreme_Data}}]  +
-위의 설명과 관련하여, 만약에 아주 심한 Outlier가 존재한다면 두 변인 간의 상관관계에 심한 영향을 준다. +
-[{{:pearson-6.png?300 |}}] +
- +
-make it sure that there is __no data entry error__. +
-{{:r.crime.scatterplot.for.single.by.state.jpg}} +
- +
- +
-<WRAP clear /> +
- +
-see  +
-https://www.gapminder.org/answers/how-does-income-relate-to-life-expectancy/ +
 </WRAP> </WRAP>
- 
 <WRAP half column> <WRAP half column>
-  * Histogram 
-{{:c:ps1-1:2019:pasted:20190909-103341.png}} 
-    * Life expectancy data: {{:life.exp.csv}} 
- 
-<code> 
-le <- as.data.frame(read.csv("http://commres.net/wiki/_media/life.exp.csv", header=T)) 
-colnames(le)[1] <- "c.code" # not really necessary. But, sometimes imported first characters are broken. 
-lea <- le$X2017 
-leb <- lea[complete.cases(lea)] 
-hist(leb, color="grey") 
-</code> 
- 
-[{{:c:ps1-1:2019:pasted:20190909-110252.png|Life expectancy in 2017}}] 
- 
-[{{:c:ps1-1:2019:pasted:20190909-104759.png|Distribution of temperature}}] 
- 
-[{{:c:ps1-1:2019:pasted:20190909-111117.png|skewness}}] 
- 
-[{{:c:ps1-1:2019:pasted:20190909-111001.png|modality}}] 
- 
-box plot 
-<code> 
-# Boxplot of MPG by Car Cylinders 
-boxplot(mpg~cyl,data=mtcars,  
-    main="Car Milage Data", 
-    xlab="Number of Cylinders", 
-    ylab="Miles Per Gallon") 
-</code> 
-{{:c:ps1-1:2019:pasted:20190909-111438.png}} 
- 
 ===== Assignment ===== ===== Assignment =====
 </WRAP> </WRAP>
c/ps1-1/2019/schedule.txt · Last modified: 2020/08/27 21:28 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki