근데 집 바깥이라 이거 작동하는지는 몰루겠다


-- stack.yaml이나 cabal에서 다음 패키지가 필요합니다:
-- statistics, vector

import qualified Data.Vector as V
import qualified Statistics.Sample as S

main :: IO ()
main = do
  -- 샘플 데이터
  let sampleData = V.fromList [170.0, 165.0, 180.0, 175.0, 160.0]

  -- 평균, 분산, 표준편차 계산
  let mean = S.mean sampleData
      variance = S.variance sampleData
      stddev = sqrt variance

  putStrLn $ "평균: " ++ show mean
  putStrLn $ "분산: " ++ show variance
  putStrLn $ "표준편차: " ++ show stddev

0

If you have a fediverse account, you can quote this note from your own instance. Search https://kokonect.link/notes/a82eulko9y4z0q4a on your instance and quote it. (Note that quoting is not supported in Mastodon.)