확률론 에서 확률 변수 (確率變數, 영어 : random variable )는 확률 공간 에서 다른 가측 공간 으로 가는 가측 함수 이다.[ 1] 시행의 결과에 따라 값이 결정되는 변수를 나타낸다.[ 2] 가측 함수 조건은 확률 변수가 공역 이 되는 가측 공간 위에 새로운 확률 측도 를 유도할 수 있도록 하기 위해 필요하다. 이 확률 측도는 흔히 확률 분포 라고 부른다.
확률 변수는 아직 실제로 나타나지는 않았지만 나타날 가능성이 있는 모든 경우의 수에 해당하는 값을 가질 수 있다. 주사위를 굴리는 등 실제로 무작위적인 시행에 대해서도 쓸 수 있고, 양자역학 처럼 예측 불가능한 물리적 변수의 시행 결과에 대해서도 확률 변수라는 단어를 사용한다. 이처럼 정확히 알지 못하는 어떤 양적 변수의 잠재적인 결과에 대해 확률이라는 단어를 쓸 수 있는가에 대한 논의 도 오랜 시간 동안 이루어져왔다.
확률 공간 ( Ω , F , Pr ) {\displaystyle (\Omega ,{\mathcal {F}},\Pr )} 위의, 가측 공간 ( E , E ) {\displaystyle (E,{\mathcal {E}})} 의 값을 가지는 확률 변수 는 가측 함수 X : ( Ω , F ) → ( E , E ) {\displaystyle X\colon (\Omega ,{\mathcal {F}})\to (E,{\mathcal {E}})} 를 뜻한다. (즉, 임의의 가측 집합 S ∈ E {\displaystyle S\in {\mathcal {E}}} 에 대하여, 사건 X − 1 ( S ) ∈ F {\displaystyle X^{-1}(S)\in {\mathcal {F}}} 및 그 확률을 생각할 수 있다.) 확률론에서는 측도론의 용어를 다음과 같이 대체한다.
확률 변수의 정의역 ( Ω , F , Pr ) {\displaystyle (\Omega ,{\mathcal {F}},\Pr )} 은 확률 변수의 확률 공간 이다. 확률 변수의 공역 ( E , E ) {\displaystyle (E,{\mathcal {E}})} 은 확률 변수의 상태 공간 (狀態空間, 영어 : state space )이다. 확률 변수 X : Ω → E {\displaystyle X\colon \Omega \to E} 는 그 상태 공간 E {\displaystyle E} 위에 다음과 같은 확률 측도 Pr ( X ∈ ⋅ ) {\displaystyle \Pr(X\in \cdot )} 를 유도한다.
Pr ( X ∈ S ) = Pr ( X − 1 ( S ) ) ∀ S ∈ E {\displaystyle \Pr(X\in S)=\Pr(X^{-1}(S))\qquad \forall S\in {\mathcal {E}}} 이는 확률 변수 X {\displaystyle X} 가 S {\displaystyle S} 속의 값을 가질 확률 이라고 한다. 여기서
X − 1 ( S ) = { ω ∈ Ω : X ( ω ) ∈ S } {\displaystyle X^{-1}(S)=\{\omega \in \Omega \colon X(\omega )\in S\}} 이다.
만약 상태 공간이 위상 공간 인 경우, 상태 공간은 통상적으로 보렐 시그마 대수 를 사용한다. 예를 들어, 실수 값을 갖는 확률 변수는 실수의 보렐 시그마 대수 에 대한 가측 함수이다. (반면, 보렐 시그마 대수 대신 르베그 가측 집합 의 시그마 대수를 사용하면, 연속 함수이지만 가측 함수가 아닌 함수들이 존재하게 된다.) 만약 정의역이 이산 확률 공간(즉, 모든 부분 집합이 사건인 확률 공간)일 경우, 모든 함수 Ω → E {\displaystyle \Omega \to E} 는 가측 함수 이며, 따라서 정의에서 가측성 조건을 생략할 수 있다.
주사위를 던져 나오는 눈의 수를 추상화한 확률 공간
( Ω , F , Pr ) {\displaystyle (\Omega ,{\mathcal {F}},\operatorname {Pr} )} Ω = { 1 , 2 , … , 6 } {\displaystyle \Omega =\{1,2,\dots ,6\}} F = P ( { 1 , 2 , … , 6 } ) {\displaystyle {\mathcal {F}}={\mathcal {P}}(\{1,2,\dots ,6\})} Pr ( { 1 } ) = Pr ( { 2 } ) = Pr ( { 3 } ) = Pr ( { 4 } ) = Pr ( { 5 } ) = Pr ( { 6 } ) = 1 / 6 {\displaystyle \operatorname {Pr} (\{1\})=\operatorname {Pr} (\{2\})=\operatorname {Pr} (\{3\})=\operatorname {Pr} (\{4\})=\operatorname {Pr} (\{5\})=\operatorname {Pr} (\{6\})=1/6} 을 생각하자. 즉, 1부터 6까지의 수가 나올 수 있으며, 각각의 수가 나올 확률은 같다. 이 확률 공간 위에 다음과 같은 확률 변수를 정의하자.
X : 2 , 4 , 6 ↦ 0 {\displaystyle X\colon 2,4,6\mapsto 0} X : 1 , 3 , 5 ↦ 1 {\displaystyle X\colon 1,3,5\mapsto 1} 즉, X {\displaystyle X} 는 짝수가 나왔을 경우 0, 홀수가 나왔을 경우 1을 취한다. 그렇다면 주사위를 던져 짝수가 나올 확률은 다음과 같다.
Pr ( X = 0 ) = Pr ( { 2 , 4 , 6 } ) = 1 / 2 {\displaystyle \operatorname {Pr} (X=0)=\operatorname {Pr} (\{2,4,6\})=1/2} 마찬가지로, 홀수가 나올 확률은 다음과 같다.
Pr ( X = 1 ) = Pr ( { 1 , 3 , 5 } ) = 1 / 2 {\displaystyle \operatorname {Pr} (X=1)=\operatorname {Pr} (\{1,3,5\})=1/2} 두 개의 주사위를 던진 결과의 확률 공간
( Ω × Ω , F × F , Pr × Pr ) {\displaystyle (\Omega \times \Omega ,{\mathcal {F}}\times {\mathcal {F}},\operatorname {Pr} \times \operatorname {Pr} )} 을 생각하자. 즉, 두 주사위의 눈의 수는 서로 독립 이다. 두 눈의 수의 합을 나타내는 확률 변수
Y : ( i , j ) ↦ i + j {\displaystyle Y\colon (i,j)\mapsto i+j} 의 확률 분포 는 다음과 같다.
Pr ( Y = 2 ) = Pr ( { ( 1 , 1 ) } ) = 1 / 36 {\displaystyle \operatorname {Pr} (Y=2)=\operatorname {Pr} (\{(1,1)\})=1/36} Pr ( Y = 3 ) = Pr ( { ( 1 , 2 ) , ( 2 , 1 ) } ) = 1 / 18 {\displaystyle \operatorname {Pr} (Y=3)=\operatorname {Pr} (\{(1,2),(2,1)\})=1/18} Pr ( Y = 4 ) = Pr ( { ( 1 , 3 ) , ( 2 , 2 ) , ( 3 , 1 ) } ) = 1 / 12 {\displaystyle \operatorname {Pr} (Y=4)=\operatorname {Pr} (\{(1,3),(2,2),(3,1)\})=1/12} Pr ( Y = 5 ) = Pr ( { ( 1 , 4 ) , ( 2 , 3 ) , ( 3 , 2 ) , ( 4 , 1 ) } ) = 1 / 9 {\displaystyle \operatorname {Pr} (Y=5)=\operatorname {Pr} (\{(1,4),(2,3),(3,2),(4,1)\})=1/9} Pr ( Y = 6 ) = Pr ( { ( 1 , 5 ) , ( 2 , 4 ) , ( 3 , 3 ) , ( 4 , 2 ) , ( 5 , 1 ) } ) = 5 / 36 {\displaystyle \operatorname {Pr} (Y=6)=\operatorname {Pr} (\{(1,5),(2,4),(3,3),(4,2),(5,1)\})=5/36} Pr ( Y = 7 ) = Pr ( { ( 1 , 6 ) , ( 2 , 5 ) , ( 3 , 4 ) , ( 4 , 3 ) , ( 5 , 2 ) , ( 6 , 1 ) } ) = 1 / 6 {\displaystyle \operatorname {Pr} (Y=7)=\operatorname {Pr} (\{(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)\})=1/6} Pr ( Y = 8 ) = Pr ( { ( 2 , 6 ) , ( 3 , 5 ) , ( 4 , 4 ) , ( 5 , 3 ) , ( 6 , 2 ) } ) = 5 / 36 {\displaystyle \operatorname {Pr} (Y=8)=\operatorname {Pr} (\{(2,6),(3,5),(4,4),(5,3),(6,2)\})=5/36} Pr ( Y = 9 ) = Pr ( { ( 3 , 6 ) , ( 4 , 5 ) , ( 5 , 4 ) , ( 6 , 3 ) } ) = 1 / 9 {\displaystyle \operatorname {Pr} (Y=9)=\operatorname {Pr} (\{(3,6),(4,5),(5,4),(6,3)\})=1/9} Pr ( Y = 10 ) = Pr ( { ( 4 , 6 ) , ( 5 , 5 ) , ( 6 , 4 ) } ) = 1 / 12 {\displaystyle \operatorname {Pr} (Y=10)=\operatorname {Pr} (\{(4,6),(5,5),(6,4)\})=1/12} Pr ( Y = 11 ) = Pr ( { ( 5 , 6 ) , ( 6 , 5 ) } ) = 1 / 18 {\displaystyle \operatorname {Pr} (Y=11)=\operatorname {Pr} (\{(5,6),(6,5)\})=1/18} Pr ( Y = 12 ) = Pr ( { ( 6 , 6 ) } ) = 1 / 36 {\displaystyle \operatorname {Pr} (Y=12)=\operatorname {Pr} (\{(6,6)\})=1/36} Doob, Joseph L. (1996년 8월). “The development of rigor in mathematical probability (1900–1950)”. 《The American Mathematical Monthly》 (영어) 103 (7). doi :10.2307/2974673 . ISSN 0002-9890 . JSTOR 2974673 . MR 1404084 . Zbl 0865.01011 . Kersting, Götz; Wakolbinger, Anton (2014). 《Zufallsvariable und Stochastische Prozesse》 (독일어). Birkhäuser. ISBN 978-3-7643-8432-6 . Fahrmeir, Ludwig; Künstler, Rita; Pigeot, Iris; Tutz, Gerhard (2012). 《Statistik: Der Weg zur Datenanalyse》 (독일어) Auflage 7판. Springer. ISBN 978-3-6420-1938-8 . Papula, Lothar (2011). 《Mathematik für Ingenieure und Naturwissenschaftler Band 3》 (독일어) Auflage 6판. Vieweg+Teubner Verlag. ISBN 978-3-8348-1227-8 .