{"id":1079,"date":"2016-06-25T08:46:39","date_gmt":"2016-06-25T12:46:39","guid":{"rendered":"https:\/\/sites.berry.edu\/vbissonnette\/?page_id=1079"},"modified":"2017-11-25T09:30:38","modified_gmt":"2017-11-25T14:30:38","slug":"plots","status":"publish","type":"page","link":"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/plots\/","title":{"rendered":"Plots"},"content":{"rendered":"<h3>Univariate Plots<\/h3>\n<p>We will be working with the same problem and data used to illustrate the <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/explore-data\/\">explore data<\/a> procedure:<\/p>\n<p>You are an instructor, and you just gave your 15 students their first exam. You obtained the following scores &#8212; each score represents the percentage of exam items answered correctly:<\/p>\n<table>\n<tbody>\n<tr>\n<td class=\"lf\">Exam Score:<\/td>\n<td>74<\/td>\n<td>82<\/td>\n<td>89<\/td>\n<td>62<\/td>\n<td>92<\/td>\n<td>48<\/td>\n<td>72<\/td>\n<td>67<\/td>\n<td>68<\/td>\n<td>79<\/td>\n<td>68<\/td>\n<td>71<\/td>\n<td>79<\/td>\n<td>80<\/td>\n<td>69<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Histogram<\/h4>\n<p>Pull down the <b>Analyze<\/b> menu, choose <strong>Graphs and Plots<\/strong>,\u00a0and then choose <b>Create a Histogram<\/b>. You will be presented with a simple user dialog to select your variable:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1403\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot1.png\" alt=\"\" width=\"345\" height=\"372\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot1.png 345w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot1-278x300.png 278w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot1-260x280.png 260w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/p>\n<p>Move your variable to the &#8220;Test Variable&#8221; box and press &#8220;Plot.&#8221;\u00a0 Your histogram will display in an interactive window that allows you to modify the image to fit your needs.\u00a0 Make sure to change the title to be more descriptive.<a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1084\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot2.png\" alt=\"plot2\" width=\"680\" height=\"500\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot2.png 680w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot2-300x221.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot2-260x191.png 260w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>You will see that the default\/starting histogram has 10 bins to start with, and these align nicely with your needs as an instructor: 55 to 59, 60 to 64, and so on.\u00a0 Explore the image and plot options &#8212; you can increase or decrease the number of bins, rescale the X axis, and change the title and labels. If you didn&#8217;t specify a custom title and axis labels for your histogram, you should add those now.\u00a0 When you are finished, you can save your histogram to a file, or copy it to your clipboard and paste it into another document.<\/p>\n<h4>Box Plot<\/h4>\n<p>Pull down the <b>Analyze<\/b> menu, choose <strong>Graphs and Plots<\/strong>,\u00a0and then choose <strong>Draw Box Plots and CIs<\/strong>. \u00a0You will be presented with a simple dialog:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1085\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot3.png\" alt=\"plot3\" width=\"345\" height=\"365\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot3.png 345w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot3-284x300.png 284w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot3-260x275.png 260w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/p>\n<p>Choose your variable and click\u00a0<strong>Compute<\/strong>. \u00a0You will be presented with an interactive graphical box plot:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1086\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot4.png\" alt=\"plot4\" width=\"661\" height=\"256\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot4.png 661w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot4-300x116.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot4-260x101.png 260w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/a><\/p>\n<p>You should always think about how to change the title, labels, and scale to improve on your plot. \u00a0I changed these things and ended up with:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1087\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot5.png\" alt=\"plot5\" width=\"661\" height=\"256\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot5.png 661w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot5-300x116.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot5-260x101.png 260w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/a><\/p>\n<p>You can also display a 95% or 99% confidence interval. \u00a0This is especially useful when you have more than one variable. \u00a0For example, here are the CIs from the results of the <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/t-test-for-independent-groups\/\">two independent samples T test<\/a> problem:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1095\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot10.png\" alt=\"plot10\" width=\"686\" height=\"381\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot10.png 686w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot10-300x167.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot10-630x350.png 630w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot10-260x144.png 260w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/a><\/p>\n<h4>Stem-And-Leaf Plot<\/h4>\n<p>Pull down the <b>Analyze<\/b> menu, choose <strong>Graphs and Plots<\/strong>,\u00a0and then choose <strong>Create a Stem-and-Leaf Plot<\/strong>. \u00a0You will be presented with a simple dialog to choose your variable. \u00a0Select your variable and click <strong>Compute<\/strong>. \u00a0Now, you will be presented with an interactive plot:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1395\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot6.png\" alt=\"\" width=\"629\" height=\"668\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot6.png 629w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot6-282x300.png 282w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot6-260x276.png 260w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" \/><\/a><\/p>\n<p>Your options are found in the buttons on the right. \u00a0Click <strong>Change Title<\/strong> and make the title more descritpive, click <strong>More Stems<\/strong> once, and then click\u00a0<strong>Send to Output<\/strong>. \u00a0Here is the output:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1400\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7.png\" alt=\"\" width=\"430\" height=\"471\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7.png 430w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7-274x300.png 274w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7-260x285.png 260w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/a>You can experiment with the options until you get a plot that best illustrates your data.<\/p>\n<p>The stem-and-leaf plot can also display data from two variables.\u00a0 These &#8216;back-to-back&#8217; stem-and leaf plots can be very useful for comparing variables.\u00a0 Here is an example:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7b.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1398\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7b.png\" alt=\"\" width=\"565\" height=\"379\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7b.png 565w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7b-300x201.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot7b-260x174.png 260w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><\/p>\n<h4>Normal Probability Plot<\/h4>\n<p>Here is the normal probability plot of the data we used to illustrate the <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/explore-data\/\">explore data<\/a> procedure:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1406\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot12.png\" alt=\"\" width=\"703\" height=\"531\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot12.png 703w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot12-300x227.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/11\/plot12-260x196.png 260w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/a><\/p>\n<p>I&#8217;ve changed the title an added the Q1-Q3 line to the plot.\u00a0 As you can see, this is quite useful at illustrating the outlier score of 48.<\/p>\n<h4>Bar Chart<\/h4>\n<p>Here is the bar chart for the frequency data used to illustrate the <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/goodness-of-fit-test\/\">goodness-of-fit test<\/a>:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/gfit8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1375\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/gfit8.png\" alt=\"\" width=\"706\" height=\"531\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/gfit8.png 706w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/gfit8-300x226.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/gfit8-260x196.png 260w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/a><\/p>\n<h3>Bivariate \u00a0Plots<\/h3>\n<p>Whenever you are working with bivariate data, you should always get a scatterplot of your data. \u00a0Here is the scatterplot that is produced in from the data used to illustrate the <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/correlation\/\">correlation procedure<\/a>. \u00a0This graph can also be created if you pull down the\u00a0<strong>Analyze Menu<\/strong>, choose\u00a0<strong>Charts and Graphs<\/strong>, and then choose\u00a0<strong>Draw a Scatter Plot<\/strong>:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1090\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot8.png\" alt=\"plot8\" width=\"694\" height=\"531\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot8.png 694w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot8-300x230.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot8-260x199.png 260w\" sizes=\"auto, (max-width: 694px) 100vw, 694px\" \/><\/a><\/p>\n<p>Typically, never settle for the default output. \u00a0Take time to improve your plot. \u00a0Here, I have changed the title, changed the scale of both axes, added a regression line, and changed the markers:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1097\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot9.png\" alt=\"plot9\" width=\"694\" height=\"531\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot9.png 694w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot9-300x230.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot9-260x199.png 260w\" sizes=\"auto, (max-width: 694px) 100vw, 694px\" \/><\/a><\/p>\n<p>Another option for this chart is to draw a residual plot. \u00a0This is quite valuable when you are working with a <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/regression\/\">regression<\/a> problem.<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1100\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot11.png\" alt=\"plot11\" width=\"703\" height=\"531\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot11.png 703w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot11-300x227.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2016\/06\/plot11-260x196.png 260w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/a><\/p>\n<h4>Two-Variable Bar Chart<\/h4>\n<p>Here is the bar chart displaying the frequencies used to illustrate the <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/contingency-test\/\">contingency test<\/a>:<\/p>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/contin13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1382\" src=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/contin13.png\" alt=\"\" width=\"854\" height=\"531\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/contin13.png 854w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/contin13-300x187.png 300w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/contin13-768x478.png 768w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2017\/08\/contin13-260x162.png 260w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/a><\/p>\n<hr \/>\n<p><a href=\"https:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/\">Return to Main Menu<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Univariate Plots We will be working with the same problem and data used to illustrate the explore data procedure: You are an instructor, and you just gave your 15 students [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":0,"parent":282,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"class_list":["post-1079","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/1079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/comments?post=1079"}],"version-history":[{"count":17,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/1079\/revisions"}],"predecessor-version":[{"id":1408,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/1079\/revisions\/1408"}],"up":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/282"}],"wp:attachment":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/media?parent=1079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}