๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ซ ์ˆ˜ํ•™

ํ™•๋ฅ  vs ํ†ต๊ณ„ โ€‹ โ€‹ํ™•๋ฅ : what? 0- 1 ์‚ฌ์ด์˜ ์ˆซ์ž๋กœ ๊ฐ€๋Šฅ์„ฑ์˜ ํฌ๊ธฐ๋ฅผ ๋‚˜ํƒ€๋‚ธ ๊ฒƒ 0: ์ ˆ๋Œ€๋กœ ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š”๋‹ค. 1 : ํ•ญ์ƒ ๋ฐœ์ƒํ•œ๋‹ค. why? ํ˜„์ƒ์˜ ๋ฐœ์ƒ์˜ ๋ถˆํ™•์‹ค์„ฑ ๋•Œ๋ฌธ. ์ •ํ™•ํžˆ ์˜ˆ์ธกํ•  ์ˆ˜๋Š” ์—†์ง€๋งŒ ๊ฐ€๋Šฅ์„ฑ์„ ๋งํ•  ์ˆ˜ ์žˆ์„๋•Œ ํ™•๋ฅ ์„ ์‚ฌ์šฉํ•œ๋‹ค. โ€‹ํ†ต๊ณ„: what? ์‹ค์ œ ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜ํ•™์  ํ™•๋ฅ ๊ฐ’์œผ๋กœ ๋ชจ๋ธ๋งํ•˜๋Š” ๊ฒƒ. why? ์‹ค์ œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ถ„์„, ๋ชจ๋ธ๋ง-ํ”ผํŒ…-์˜ˆ์ธก, ํฐ ๋ฐ์ดํ„ฐ ์…‹์„ ์š”์•ฝํ•˜๊ธฐ ์œ„ํ•ด. ๋”๋ณด๊ธฐ
Linear Regression ์„ ํ˜•ํšŒ๊ท€๋ถ„์„ ์„œ์šธ๋Œ€ํ•™๊ต ๋„์‹œ ๋ฐ์ดํ„ฐ์‚ฌ์ด์–ธ์Šค ์—ฐ๊ตฌ์†Œ์˜ ๊น€ ์„  ๊ต์ˆ˜๋‹˜ ๋จธ์‹ ๋Ÿฌ๋‹๊ฐ•์˜ ๊ฐ•์˜๋…ธํŠธ. Linear Regression ์„ ํ˜•ํšŒ๊ท€๋ถ„์„ ํšŒ๊ท€๋ถ„์„ ๋ชจ๋ธ์˜ ๋ชฉ์ : ๋ฐ์ดํ„ฐ ์ƒ˜ํ”Œ์„ ๊ฐ–๊ณ  ์žˆ์ง€ ์•Š์€ ์ง€์ ์—์„œ์˜ ์˜ˆ์ธก์•„๋ž˜์˜ ๊ทธ๋ž˜ํ”„์—์„œ x๋Š” ์‹ค์ œ ๋ฐ์ดํ„ฐ, ๋นจ๊ฐ•๊ณผ ํŒŒ๋ž‘ ์„ ์€ ์˜ˆ์ธก๊ฐ’์„ ๋‚˜ํƒ€๋‚ธ๋‹ค. (x์ถ•์˜ ํŠน์ • ๊ฐ’์— ๋Œ€ํ•œ ์˜ˆ์ธก๊ฐ’ y๋ฅผ ๋‚˜ํƒ€๋‚ธ ๊ทธ๋ž˜ํ”„) ์˜ˆ์ธก ๊ฐ’๋“ค์„ ๋‚˜ํƒ€๋‚ด๋Š” f(x)์™€ g(x)๋Š” ์•„๋ž˜์˜ ์ˆ˜์‹์œผ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค.๋‹จ, ์„œ๋กœ ๋‹ค๋ฅธ β๊ฐ’์„ ๊ฐ–๊ณ  ์žˆ๋Š” ๊ฒƒ์ด๋‹ค. ํ•œ ๋ˆˆ์— ๋ณด๊ธฐ์— f(x)๊ฐ€ g(x)๋ณด๋‹ค ๋ฐ์ดํ„ฐ๋ฅผ ์ž˜ ์„ค๋ช…ํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋ณด์ธ๋‹ค. f(x)๊ฐ€ ๋” ์ ํ•ฉํ•œ ์ด์œ ๋ฅผ ์ •๋Ÿ‰์ ์œผ๋กœ ์„ค๋ช…ํ•˜์ž๋ฉด,f(x)์˜ ์˜ค์ฐจ์˜ ์ดํ•ฉ์ด g(x)์˜ ์˜ค์ฐจ์˜ ์ดํ•ฉ๋ณด๋‹ค ๋” ์ž‘๊ธฐ ๋•Œ๋ฌธ์ด๋ผ๊ณ  ๋งํ•  ์ˆ˜ ์žˆ๋‹ค. ํšŒ๊ท€๋ถ„์„์˜ ํ•™์Šต๊ณผ์ •์€ error๋“ค์˜ ํ•ฉ์ด ๊ฐ€์žฅ ์ž‘์€ ํ•จ์ˆ˜๋ฅผ ์ฐพ.. ๋”๋ณด๊ธฐ
Day 3: Permutations, Combinations HackerRank 10 Days of statistics Permutations(์ˆœ์—ด): If there are people and chairs. People = {A, B, C, ... }Chairs = {1,2,3, ... } n = number of Peopler = number of chairs And if we let putting these five people in the five different chairs,it is a scenario, a permutation. (Click to see Khan Academy permutation lecture, if you need. ) When the number of people and chairs are the same.The number o.. ๋”๋ณด๊ธฐ
Day 3: Bayes' Theorem HackerRank Day 3: Bayes' Theorem(๋ฒ ์ด์ง€์•ˆ ์ •๋ฆฌ): P( A | B ) denotes the probability of the occurrence of A given that B has occurred ( B๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด, A๊ฐ€ ๋ฐœ์ƒ ํ•  ํ™•๋ฅ  )P( B | A ) denotes the probability of the occurrence of B given that A has occurred ( A๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด, B๊ฐ€ ๋ฐœ์ƒ ํ•  ํ™•๋ฅ  ) Let A and B be two events such that P( A | B ) and P( B | A ),A์™€ B๊ฐ€ P( A | B ) ๊ทธ๋ฆฌ๊ณ  P( B | A ) ๋ผ๋ฉด, ๋”๋ณด๊ธฐ
Day 3: Conditional Probability, Bayes' Theorem HackerRank Day 3: Conditional Probability(์กฐ๊ฑด๋ถ€ ํ™•๋ฅ ):This is defined as the probability of an event occurring, assuming that one or more other events have already occurred.์กฐ๊ฑด๋ถ€ ํ™•๋ฅ ์€ ํ•˜๋‚˜ ์ด์ƒ์˜ ์‚ฌ๊ฑด์ด ์ด๋ฏธ ์ผ์–ด๋‚œ ํ›„์— ์–ด๋– ํ•œ ์‚ฌ๊ฑด์ด ๋ฐœ์ƒํ•  ํ™•๋ฅ ์ด๋‹ค. Two events, A and B are considered to be independent if event A has no effect on the probability of event B.์‚ฌ๊ฑด A๊ฐ€ ์‚ฌ๊ฑด B์— ์˜ํ–ฅ์„ ๋ฏธ์น˜์ง€ ์•Š๋Š”๋‹ค๋ฉด, ๋‘์‚ฌ๊ฑด A์™€ B๋Š” ๋…๋ฆฝ์ ์ด๋‹ค. If events A and B are not indep.. ๋”๋ณด๊ธฐ
Day 2: Basic Probability HacckerRank Day2 Basic probability Event(์‚ฌ๊ฑด)A set of outcomes of an experiment.์–ด๋– ํ•œ ํ•œ ์‹œํ–‰์—์„œ ์ผ์–ด๋‚  ์ˆ˜ ์žˆ๋Š” ๊ฒฐ๊ณผ. Sample Space(ํ‘œ๋ณธ ๊ณต๊ฐ„)An experiment is any procedure that can be infinitely repeated and has a well-defined set of possible outcomes, known as the sample space, S. ํ•œ ๋ฒˆ์˜ ์‹œํ–‰์—์„œ ์ผ์–ด๋‚  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๊ฒฐ๊ณผ์˜ ์ง‘ํ•ฉ. Probability(ํ™•๋ฅ ) The probability of the occurrence of an event, A is: = ์›ํ•˜๋Š” ๊ฒฝ์šฐ์˜ ์ˆ˜ / ๋ชจ๋“  ๊ฒฝ์šฐ์˜ ์ˆ˜ Two fundamen.. ๋”๋ณด๊ธฐ
Day 1: Standard Deviation (ํ‘œ์ค€ํŽธ์ฐจ) HackerRank 10 days of staticsDay 1 note taking: Standard Deviation Standard Deviation (ํ‘œ์ค€ํŽธ์ฐจ): The average distance to the mean. (Square root of variance) ๋ชจ๋“  ์›์†Œ x์˜ ํ‰๊ท  m์— ๋Œ€ํ•œ ํ‰๊ท ๊ฑฐ๋ฆฌ. (๋ถ„์‚ฐ์˜ ์ œ๊ณฑ๊ทผ) Variance (๋ถ„์‚ฐ) = The average magnitude of fluctuations of from its expected value. (Standard Deviation)^2 ํ™•๋ฅ ๋ณ€์ˆ˜x๋“ค๊ณผ ๊ธฐ๋Œ“๊ฐ’(ํ‰๊ท ๊ฐ’) m๊ฐ„์˜ ํ‰๊ท  ๋ณ€๋™ ํฌ๊ธฐ. (ํ‘œ์ค€ํŽธ์ฐจ)^2#python 3 import math def StandardDeviation(n, arr): mu = sum(arr).. ๋”๋ณด๊ธฐ
Day 1: Interquartile Range HackerRank 10 days of statistics: Day 1 note taking Interquartile Range Quartiles = 3 points which divide an array into 4 equal range. quartile Q1 Q1 >= 25% of the dataQ2 Q2 >= 50% of the dataQ3 Q3 >= 75% of the data Interquartile Range Q3-Q1 Interquartile Range(์‚ฌ๋ถ„์œ„ ๋ฒ”์œ„): the difference between first(Q1) and third(Q3) quartiles. def median(arr): N = len(arr) if N%2==0: return (arr[(N//2)-1]+arr[N.. ๋”๋ณด๊ธฐ