{"id":497,"date":"2010-05-10T02:49:52","date_gmt":"2010-05-10T07:49:52","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=497"},"modified":"2010-05-10T02:49:52","modified_gmt":"2010-05-10T07:49:52","slug":"explaining-unexpected-sights","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/explaining-unexpected-sights\/","title":{"rendered":"Explaining Unexpected Sights"},"content":{"rendered":"<figure id=\"attachment_498\" aria-describedby=\"caption-attachment-498\" style=\"width: 480px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/rondacamel.JPG\" alt=\"Ronda and the camels\" title=\"rondacamel\" width=\"480\" height=\"640\" class=\"size-full wp-image-498\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/rondacamel.JPG 480w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/rondacamel-225x300.jpg 225w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><figcaption id=\"caption-attachment-498\" class=\"wp-caption-text\">Ronda and the camels<\/figcaption><\/figure>\n<p>Normally, walking along the beach in the morning with my daughter, I do not expect a random person to come up to us with the question,<br \/>\n<em>&#8220;Would you like to ride my camel?&#8221;<br \/>\n<\/em><\/p>\n<p>However, I was not taken nearly as much by surprise as my daughter because I had been to this same beach twice already and although it was deserted both times and, I have to admit, generally much cleaner than the beach at home, there were a couple of piles of, well feces. While distinguishing types of animal feces is not a skill frequently called on in statisticians in Los Angeles, I was pretty certain these weren&#8217;t from any small domestic animals or drunken tourists.<br \/>\n<em><br \/>\nI knew there had to be a producer of large feces around here somewhere<\/em><\/p>\n<p>So, when the gentleman walked up leading a family of camels, that explained a lot. <\/p>\n<p>After a few hours of camel-riding and sunbathing, I was bored, so I came back up to my hotel room to work on my second paper for WUSS. I already submitted a paper on statistics with Enterprise Guide but I wanted to write something on data visualization, just because, and I figured having a deadline would force me to make some progress. <\/p>\n<p><em>Now, I knew this was around here somewhere &#8230;<\/em><\/p>\n<p><strong>Creating a bar graph in Enterprise Guide with bar height = means of a second variable<br \/>\n<\/strong><br \/>\nI usually use TASKS > GRAPH > BAR CHART to create a bar chart and I had yet to spot how to create a bar chart which shows the average of one variable for each value of a second variable. In this case, I wanted to see what is the average income for respondents based on the percentage of African-Americans in their neighborhood.<\/p>\n<p>My original reason for using this was to create a bad example and show that you should NOT have 100 categories. As you will see, it did not work out as expected. In fact, it so did not work out as expected that I tried again with percent African-American residents rounded to to the nearest 10% because I wanted to look at these data again.<\/p>\n<p>I was sure there had to be a way to create a bar chart by means, and when I had plenty of time to look for it, I found two. In the BAR CHART task when you select your column to chart,  then under &#8220;sum of&#8221; select the variable for which you want the means. Next, click the ADVANCED option for the bar chart task. You&#8217;ll see an option for &#8220;Statistic used to calculate bar&#8221;. From the drop-down menu, select average.<br \/>\n[You can also use the bar chart wizard. In step 2, select a variable from the drop-down menu next to bar height. Then click on the sum symbol (the thing that looks like a deformed E) and a window will pop up that lets you select average as the statistic.]<\/p>\n<p>So, I get the chart below and I know it is not supposed to be like that. <\/p>\n<figure id=\"attachment_499\" aria-describedby=\"caption-attachment-499\" style=\"width: 668px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/incomepctblack.jpg\" alt=\"Average Income by Neighborhood Percentage African-American\" title=\"incomepctblack\" width=\"668\" height=\"652\" class=\"size-full wp-image-499\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/incomepctblack.jpg 668w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/incomepctblack-300x292.jpg 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><figcaption id=\"caption-attachment-499\" class=\"wp-caption-text\">Average Income by Neighborhood Percentage African-American<\/figcaption><\/figure>\n<p>As can be seen from this graph, there is a curvilinear relationship between the percentage of African-American residents in a neighborhood and income (measured on a 1= < 30K year to 8 = > 250K scale).<\/p>\n<p>While this may be true, I don&#8217;t think it is. My first thought is that there are probably a small number of respondents who came from neighborhoods that are 70-100% African-American because this was a random sample of around 1,100 people and there aren&#8217;t that many completely segregated neighborhoods in the country.<\/p>\n<p>I take a look at a pie chart <figure id=\"attachment_501\" aria-describedby=\"caption-attachment-501\" style=\"width: 485px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/pieincomeblack.jpg\" alt=\"Pie Chart of % African-American in Neighborhood\" title=\"pieincomeblack\" width=\"485\" height=\"468\" class=\"size-full wp-image-501\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/pieincomeblack.jpg 485w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2010\/05\/pieincomeblack-300x289.jpg 300w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><figcaption id=\"caption-attachment-501\" class=\"wp-caption-text\">Pie Chart of % African-American in Neighborhood<\/figcaption><\/figure><\/p>\n<p>and it confirms my suspicions &#8211; those bars to the right which are forming that curvilinear pattern are based on a very small sample. All of those bars from 40% on up, COMBINED comprise less than 7.5% of the total sample.<\/p>\n<p>I have major commitments today &#8211; going to the beach, eating breakfast and watching my daughter at training camp, which is the reason we are here in Tunisia.<\/p>\n<p>I am going to look at this more later. I actually did a lot more last night and that is the part that troubles me a bit.<\/p>\n<p> I really looked into this because the results were unexpected. I KNOW I should always examine every aspect of the data carefully, but the truth is, I know that I do more testing, more exploration when the results are not what I expected to find. I wonder to what extent we all do this and how much that contributes to us confirming what we already expected to find, because when we do, we don&#8217;t keep looking for other explanations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normally, walking along the beach in the morning with my daughter, I do not expect a random person to come up to us with the question, &#8220;Would you like to ride my camel?&#8221; However, I was not taken nearly as much by surprise as my daughter because I had been to this same beach twice&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-497","post","type-post","status-publish","format-standard","hentry","category-statistics"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/comments?post=497"}],"version-history":[{"count":2,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/497\/revisions"}],"predecessor-version":[{"id":502,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/497\/revisions\/502"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}