User Tools

Site Tools


b:head_first_statistics:measuring_central_tendency

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
b:head_first_statistics:measuring_central_tendency [2024/09/08 23:30] – [e.g. 2] hkimscilb:head_first_statistics:measuring_central_tendency [2026/09/08 23:24] (current) – [outlier] hkimscil
Line 31: Line 31:
 \begin{equation*} \begin{equation*}
 \begin{split} \begin{split}
-\mu = \frac{\sum\limits_{}^{} \text{fx}}{\sum{\text{f}}} +\mu = \frac{\sum\limits_{}^{} \text{fx}}{\sum{\text{f.nothing}}} 
     = \frac{1 \text{x} 19 + 3 \text{x} 20 + 1 \text{x} 21}{5}     = \frac{1 \text{x} 19 + 3 \text{x} 20 + 1 \text{x} 21}{5}
 \end{split} \end{split}
 \end{equation*} \end{equation*}
 +
 +<code>
 +> # mean 
 +> x <- c(19, 19, 20, 20, 20, 21)
 +> sum(x)
 +[1] 119
 +> length(x)
 +[1] 6
 +> sx <- sum(x)
 +> nx <- length(x)
 +> sx/nx
 +[1] 19.83333
 +> mean(x)
 +[1] 19.83333
 +
 +</code>
  
 ===== outlier ===== ===== outlier =====
Line 40: Line 56:
 [{{eg.distribution.jpg}}] [{{eg.distribution.jpg}}]
 </WRAP> </WRAP>
 +<code>
 +> # mean 
 +> x <- c(19, 19, 20, 20, 20, 21)
 +> sx <- sum(x)
 +> nx <- length(x)
 +> sx/nx
 +[1] 19.83333
 +> mean(x)
 +[1] 19.83333
 +
 +> y <- c(3,19,20,21,34,37)
 +> mean(y)
 +[1] 22.33333
 +
 +> xy <- cbind(x, y)
 +> boxplot(xy, col=c("orange", "purple"),
 ++         names = c("x", "y"))
 +</code>
  
 +{{.:pasted:20260908-232337.png}}
 ===== skewedness ===== ===== skewedness =====
 +see [[:b/head_first_statistics/visualization#histogram_skewedness]]
 <WRAP info> <WRAP info>
 skewedness: 왜도 skewedness: 왜도
Line 104: Line 140:
  
 ==== e.g. 1 ==== ==== e.g. 1 ====
- 
 quartile 명령어는 r에서는 없다. 대신 quantile을 사용한다. 둘은 비슷하나 quantile은 4분위 이상의 것을 한다. quartile 명령어는 r에서는 없다. 대신 quantile을 사용한다. 둘은 비슷하나 quantile은 4분위 이상의 것을 한다.
 +교재에서 구하는 quartile방식은 알아두되, 실제에서는 R에서 quantile을 사용하여 quartile을 구하도록 한다. see [[:quartile]]
  
 R에서  R에서 
Line 267: Line 303:
 <code> <code>
 ## answer  ## answer 
 +n <- 3+2+2 +3+4+4
 +
 +mean.duckc <- 17
 +median.duckc <- 17
 +tot <- mean.duckc * n  
 +# 2 :: 4 인것은 이미 알고 있음
 +known.sum <- (1*3)+(2*4)+(3*2)+(31*2)
 +tot - known.sum 
 +# 227 = (32*4) + (33*3) 이므로 
 duckc <- c(1,1,1,2,2,2,2,3,3,31,31,32,32,32,32,33,33,33) duckc <- c(1,1,1,2,2,2,2,3,3,31,31,32,32,32,32,33,33,33)
 mean(duckc) mean(duckc)
b/head_first_statistics/measuring_central_tendency.1725838235.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki