r:lecture
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| r:lecture [2015/11/05 07:52] – hkimscil | r:lecture [2015/11/05 14:19] (current) – hkimscil | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Data ====== | ====== Data ====== | ||
| - | R과 함께 인스톨된 public data들은 http:// | + | R과 함께 인스톨된 public data들은 http:// | 
| + | ====== Descriptive Statistics ====== | ||
| + | ^           ^ R 명령어 | ||
| + | | 표본수 | ||
| + | | 평균 | ||
| + | | 분산 | ||
| + | | 표준편차 | ||
| + | | 표준오차 | ||
| + | | 변동계수 | ||
| - | trees | + | 표준오차 값은 데이터의 상황에 따라 다르게 구하므로 함수를 만들어서 사용하거나, | 
| - | '' | + | |
| - | <code - trees.dat> | + | |
| - | 1    8.3 | + | |
| - | 2    8.6 | + | |
| - | 3    8.8 | + | |
| - | 4 | + | |
| - | 5 | + | |
| - | 6 | + | |
| - | 7 | + | |
| - | 8 | + | |
| - | 9 | + | |
| - | 10  11.2 | + | |
| - | 11  11.3 | + | |
| - | 12  11.4 | + | |
| - | 13  11.4 | + | |
| - | 14  11.7 | + | |
| - | 15  12.0 | + | |
| - | 16  12.9 | + | |
| - | 17  12.9 | + | |
| - | 18  13.3 | + | |
| - | 19  13.7 | + | |
| - | 20  13.8 | + | |
| - | 21  14.0 | + | |
| - | 22  14.2 | + | |
| - | 23  14.5 | + | |
| - | 24  16.0 | + | |
| - | 25  16.3 | + | |
| - | 26  17.3 | + | |
| - | 27  17.5 | + | |
| - | 28  17.9 | + | |
| - | 29  18.0 | + | |
| - | 30  18.0 | + | |
| - | 31  20.6 | + | |
| - | </ | + | |
| - | ''? | + | boxplot(Volume) | 
| + | boxplot(Volume, | ||
| + | hist(Volume, | ||
| + | lines(density(Volume), | ||
| - | '' | + | rnorm(n=31, mean=0, sd=1) | 
| + | rnorm(31) | ||
| - | chickwts | + | qqnorm(x) | 
| - | '' | + | qqline(x) | 
| - | ''? | + | |
| - | '' | + | |
| + | ====== 함수만들기 ====== | ||
| + | se = function(x) sd(x)/ | ||
| + | |||
| + | ====== 시뮬레이션 ====== | ||
| + | set.seed(1234) | ||
| + | height = rnorm(n=100000, | ||
| + | mean(height) | ||
| + | |||
| + | |||
| + | M=NULL | ||
| + | V=NULL | ||
| + | for (i in 1:10000) { | ||
| + | x=sample(height, | ||
| + | M[i]=mean(x) | ||
| + | V[i]=var(x) | ||
| + | } | ||
| + | |||
| + | ====== t-test ====== | ||
| + | x = c{15.5, 11.21, 12.67, 8.877, 12.15, 9.88, 2.06, 14.5, 0, 4.97} | ||
r/lecture.1446679370.txt.gz · Last modified:  by hkimscil
                
                