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 [2025/09/16 22:07] – [skewedness] hkimscilb:head_first_statistics:measuring_central_tendency [2026/09/08 23:24] (current) – [outlier] hkimscil
Line 35: Line 35:
 \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]] see [[:b/head_first_statistics/visualization#histogram_skewedness]]
b/head_first_statistics/measuring_central_tendency.1758060445.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki