{"id":537,"date":"2020-07-18T19:00:17","date_gmt":"2020-07-18T23:00:17","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=537"},"modified":"2024-06-06T18:08:03","modified_gmt":"2024-06-06T22:08:03","slug":"4-1-random-variable","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/4-1-random-variable\/","title":{"raw":"4.1 Random Variable","rendered":"4.1 Random Variable"},"content":{"raw":"In this section we introduce discrete random variables and their probability distributions.\r\n\r\nGiven a chance experiment, the collection of possible outcomes is called the sample space, denoted as <strong><em>S<\/em><\/strong>. A<strong> random variable <\/strong>is a function (or a mapping) from the sample space <strong><em>S<\/em><\/strong> into real numbers. Random variables are usually denoted as uppercase letters, such as X, Y, Z. We use the corresponding lowercase letters x, y, z to represent possible values that random variables may attain.\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Random Variable<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<ol>\r\n \t<li>Consider the chance experiment of flipping a balanced coin twice, the sample space is <strong><em>S <\/em><\/strong>= {HH, HT, TT, TH}. Let the random variable X = # of tails. It is a mapping from the sample space <strong><em>S<\/em><\/strong> to integers 0, 1, and 2.<a id=\"retfig4.1\"><\/a>[caption id=\"attachment_3552\" align=\"aligncenter\" width=\"326\"]<img class=\"wp-image-3552\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/07\/random_variable_mapping_coin.png\" alt=\"Two ovals show how events in S map onto x. S contains all possible results of flipping two coins and x shows the number of possible heads. Image description available.\" width=\"326\" height=\"342\" \/> <strong>Figure 4.1<\/strong>: Random Variable X=# of Tails. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig4.1\">Image Description (See Appendix D Figure 4.1)<\/a>][\/caption]<\/li>\r\n \t<li>Five students are asked to report the number of siblings they have; their responses are summarized in the following table:\r\n<div align=\"center\">\r\n<table class=\"first-col-border\" style=\"height: 30px; width: 100%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\">\r\n<tbody>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<th style=\"height: 15px;\" scope=\"row\">Name<\/th>\r\n<td style=\"height: 15px; text-align: center;\">Mark<\/td>\r\n<td style=\"height: 15px; text-align: center;\">John<\/td>\r\n<td style=\"height: 15px; text-align: center;\">Rebecca<\/td>\r\n<td style=\"height: 15px; text-align: center;\">Sarah<\/td>\r\n<td style=\"height: 15px; text-align: center;\">Mary<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px;\" scope=\"row\"># of Siblings<\/th>\r\n<td style=\"height: 15px; text-align: center;\">0<\/td>\r\n<td style=\"height: 15px; text-align: center;\">1<\/td>\r\n<td style=\"height: 15px; text-align: center;\">2<\/td>\r\n<td style=\"height: 15px; text-align: center;\">2<\/td>\r\n<td style=\"height: 15px; text-align: center;\">3<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nRandomly pick one student and let random variable X = # of siblings the student has. Then X is a mapping from the sample space <strong><em>S<\/em><\/strong> = {Mark, John, Rebecca, Sarah, Mary} to the numbers 0, 1, 2 and 3.<a id=\"retfig4.2\"><\/a><\/li>\r\n<\/ol>\r\n[caption id=\"attachment_1629\" align=\"aligncenter\" width=\"326\"]<img class=\"wp-image-1629\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling.png\" alt=\"Two ovals show how events in S map onto X. S contains a list of names and X shows possible numbers of siblings. Image description available.\" width=\"326\" height=\"342\" \/> <strong>Figure 4.2<\/strong>: Random Variable X=# of Siblings. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig4.2\">Image Description (See Appendix D Figure 4.2)<\/a>][\/caption]In general, a discrete random variable maps the sample space <strong><em>S<\/em><\/strong> to numbers that can be listed or counted; a continuous random variable maps the sample space <strong><em>S<\/em><\/strong> to an interval that is a subset of the entire real line. If you need to review discrete and continuous data, refer to <a href=\"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/1-3-variables-and-data\/\" target=\"_blank\" rel=\"noopener noreferrer\">variables and data<\/a> in Chapter 1.3.<\/div>\r\n<\/div>","rendered":"<p>In this section we introduce discrete random variables and their probability distributions.<\/p>\n<p>Given a chance experiment, the collection of possible outcomes is called the sample space, denoted as <strong><em>S<\/em><\/strong>. A<strong> random variable <\/strong>is a function (or a mapping) from the sample space <strong><em>S<\/em><\/strong> into real numbers. Random variables are usually denoted as uppercase letters, such as X, Y, Z. We use the corresponding lowercase letters x, y, z to represent possible values that random variables may attain.<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Random Variable<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<ol>\n<li>Consider the chance experiment of flipping a balanced coin twice, the sample space is <strong><em>S <\/em><\/strong>= {HH, HT, TT, TH}. Let the random variable X = # of tails. It is a mapping from the sample space <strong><em>S<\/em><\/strong> to integers 0, 1, and 2.<a id=\"retfig4.1\"><\/a><br \/>\n<figure id=\"attachment_3552\" aria-describedby=\"caption-attachment-3552\" style=\"width: 326px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3552\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/07\/random_variable_mapping_coin.png\" alt=\"Two ovals show how events in S map onto x. S contains all possible results of flipping two coins and x shows the number of possible heads. Image description available.\" width=\"326\" height=\"342\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/07\/random_variable_mapping_coin.png 483w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/07\/random_variable_mapping_coin-286x300.png 286w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/07\/random_variable_mapping_coin-65x68.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/07\/random_variable_mapping_coin-225x236.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/07\/random_variable_mapping_coin-350x367.png 350w\" sizes=\"auto, (max-width: 326px) 100vw, 326px\" \/><figcaption id=\"caption-attachment-3552\" class=\"wp-caption-text\"><strong>Figure 4.1<\/strong>: Random Variable X=# of Tails. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig4.1\">Image Description (See Appendix D Figure 4.1)<\/a>]<\/figcaption><\/figure>\n<\/li>\n<li>Five students are asked to report the number of siblings they have; their responses are summarized in the following table:\n<div style=\"margin: auto;\">\n<table class=\"first-col-border\" style=\"height: 30px; width: 100%; border-spacing: 0px;\" cellpadding=\"10\">\n<tbody>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<th style=\"height: 15px;\" scope=\"row\">Name<\/th>\n<td style=\"height: 15px; text-align: center;\">Mark<\/td>\n<td style=\"height: 15px; text-align: center;\">John<\/td>\n<td style=\"height: 15px; text-align: center;\">Rebecca<\/td>\n<td style=\"height: 15px; text-align: center;\">Sarah<\/td>\n<td style=\"height: 15px; text-align: center;\">Mary<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px;\" scope=\"row\"># of Siblings<\/th>\n<td style=\"height: 15px; text-align: center;\">0<\/td>\n<td style=\"height: 15px; text-align: center;\">1<\/td>\n<td style=\"height: 15px; text-align: center;\">2<\/td>\n<td style=\"height: 15px; text-align: center;\">2<\/td>\n<td style=\"height: 15px; text-align: center;\">3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Randomly pick one student and let random variable X = # of siblings the student has. Then X is a mapping from the sample space <strong><em>S<\/em><\/strong> = {Mark, John, Rebecca, Sarah, Mary} to the numbers 0, 1, 2 and 3.<a id=\"retfig4.2\"><\/a><\/li>\n<\/ol>\n<figure id=\"attachment_1629\" aria-describedby=\"caption-attachment-1629\" style=\"width: 326px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1629\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling.png\" alt=\"Two ovals show how events in S map onto X. S contains a list of names and X shows possible numbers of siblings. Image description available.\" width=\"326\" height=\"342\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling.png 810w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling-286x300.png 286w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling-768x806.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling-65x68.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling-225x236.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/M04_variable_sibling-350x367.png 350w\" sizes=\"auto, (max-width: 326px) 100vw, 326px\" \/><figcaption id=\"caption-attachment-1629\" class=\"wp-caption-text\"><strong>Figure 4.2<\/strong>: Random Variable X=# of Siblings. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig4.2\">Image Description (See Appendix D Figure 4.2)<\/a>]<\/figcaption><\/figure>\n<p>In general, a discrete random variable maps the sample space <strong><em>S<\/em><\/strong> to numbers that can be listed or counted; a continuous random variable maps the sample space <strong><em>S<\/em><\/strong> to an interval that is a subset of the entire real line. If you need to review discrete and continuous data, refer to <a href=\"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/1-3-variables-and-data\/\" target=\"_blank\" rel=\"noopener noreferrer\">variables and data<\/a> in Chapter 1.3.<\/div>\n<\/div>\n","protected":false},"author":19,"menu_order":1,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-537","chapter","type-chapter","status-publish","hentry"],"part":535,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/users\/19"}],"version-history":[{"count":78,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/537\/revisions"}],"predecessor-version":[{"id":5381,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/537\/revisions\/5381"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/535"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/537\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=537"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=537"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=537"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}