<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TTEST and difference of two sample means in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/TTEST-and-difference-of-two-sample-means/m-p/276256#M55334</link>
    <description>&lt;P&gt;I have attached a data set that I am working on. Basically, i ned to run a 95% confidence interval for the difference in population mean hours of sleep for students who are sleep deprived and who are not. My issue is, I have no idea how to do this, and every example i see for TTEST and confidence interval involves data that people are entering themselves and each variable only has one item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my issue, the below is exactly what is the format of the excell sheet. I need to do the individual means of the yes and no seperately, and then find the difference between the two sample means. after that, i need to construct a 95% confidence interval for the difference in population mean hours of sleep for studetns who would say they are (yes), and the studetns who said they were not (no). Every example i see only has numbers for var1, but i need to actually do it for subgroups within the var 1. I do not know how to do this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Var1 &amp;nbsp; &amp;nbsp; var 2&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;yes&lt;/P&gt;&lt;P&gt;no&lt;/P&gt;&lt;P&gt;yes&lt;/P&gt;&lt;P&gt;no&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2016 13:57:40 GMT</pubDate>
    <dc:creator>holy9ner</dc:creator>
    <dc:date>2016-06-09T13:57:40Z</dc:date>
    <item>
      <title>TTEST and difference of two sample means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TTEST-and-difference-of-two-sample-means/m-p/276256#M55334</link>
      <description>&lt;P&gt;I have attached a data set that I am working on. Basically, i ned to run a 95% confidence interval for the difference in population mean hours of sleep for students who are sleep deprived and who are not. My issue is, I have no idea how to do this, and every example i see for TTEST and confidence interval involves data that people are entering themselves and each variable only has one item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my issue, the below is exactly what is the format of the excell sheet. I need to do the individual means of the yes and no seperately, and then find the difference between the two sample means. after that, i need to construct a 95% confidence interval for the difference in population mean hours of sleep for studetns who would say they are (yes), and the studetns who said they were not (no). Every example i see only has numbers for var1, but i need to actually do it for subgroups within the var 1. I do not know how to do this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Var1 &amp;nbsp; &amp;nbsp; var 2&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/P&gt;&lt;P&gt;yes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;no &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;yes&lt;/P&gt;&lt;P&gt;no&lt;/P&gt;&lt;P&gt;yes&lt;/P&gt;&lt;P&gt;no&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 13:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TTEST-and-difference-of-two-sample-means/m-p/276256#M55334</guid>
      <dc:creator>holy9ner</dc:creator>
      <dc:date>2016-06-09T13:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST and difference of two sample means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TTEST-and-difference-of-two-sample-means/m-p/276267#M55336</link>
      <description>&lt;P&gt;For a ttest on your data you would use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc ttest data=have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; class var1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var var2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CLASS variable is one that designates membership in a group, sleep deprived in your case. The VAR variable(s) are ones you want to conduct the test for similar means.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 14:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TTEST-and-difference-of-two-sample-means/m-p/276267#M55336</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-09T14:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST and difference of two sample means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TTEST-and-difference-of-two-sample-means/m-p/276317#M55344</link>
      <description>&lt;P&gt;Two sample T-Tests - You would have to download the sample dataset to see the data structure but it matches your data.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/whatstat/whatstat.htm" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/whatstat/whatstat.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/output/ttest.htm" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/output/ttest.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And another way, if you precalculate statistics:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_ttest_examples01.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_ttest_examples01.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 17:07:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TTEST-and-difference-of-two-sample-means/m-p/276317#M55344</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-09T17:07:53Z</dc:date>
    </item>
  </channel>
</rss>

