<?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 Re: Stats in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706184#M34219</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215702"&gt;@sascode&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hello again,&lt;BR /&gt;It is fine,&lt;BR /&gt;i do not like you to spend to much on time on it (I really appreciate ),&lt;BR /&gt;Below is how data looks for first two work days for example.&lt;BR /&gt;Hour Orders&lt;BR /&gt;6 11&lt;BR /&gt;7 15&lt;BR /&gt;8 8&lt;BR /&gt;9 7&lt;BR /&gt;…. …&lt;BR /&gt;16:00 5&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So describe exactly how you get 5? Please show the actual arithmetic. And if you used values you did not show, then show them.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 01:09:23 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-12-16T01:09:23Z</dc:date>
    <item>
      <title>The best way of calculating an average</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706156#M34214</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Let say i am recording every work day the incoming orders at each hour from 6 a.m to 4 p.m. My goal is to calculate the hourly average.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can create a summary table for the entire data with to columns , first called hour , where will be time in hour from 6 a.m to &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; p.m(there are 11 different time points) and second column with count order for each hour.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My goal is to calculate the hourly average.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would appreciate any idea suggested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 13:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706156#M34214</guid>
      <dc:creator>sascode</dc:creator>
      <dc:date>2020-12-16T13:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stats</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706161#M34215</link>
      <description>&lt;P&gt;By hourly average do you mean the "6AM" across multiple days?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you haven't entered data I would suggest entering the data as something that looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time&amp;nbsp;&amp;nbsp; Count&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 06:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 07:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 08:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 09:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 10:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 11:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 12:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 13:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 14:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 15:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;2020-11-25&amp;nbsp;&amp;nbsp; 16:00&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will eventually allow you have datetime values and there a lots of functions and tools that allow you to manipulate them.&lt;/P&gt;
&lt;P&gt;If I wanted to summarize across days for the same time of day you would use something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc means data=have  mean min max;
    class time;
    var count;
run;&lt;/PRE&gt;
&lt;P&gt;which would give you the mean, minimum and maximum value of Count for each time period.&lt;/P&gt;
&lt;P&gt;Or one of the report procedures.&lt;/P&gt;
&lt;P&gt;The Time this way would also allow you to create intervals for reporting. With the DATE you can tell weekdays from weekends or holidays and such as well.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 23:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706161#M34215</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-15T23:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Stats</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706163#M34216</link>
      <description>First thanks for replying,&lt;BR /&gt;My question is more related to the best way of calculating this average in terms of mathematical representation than coding part.&lt;BR /&gt;Again ,in my opinion , if i divide each hourly count with the number of days than my measure can not be more hourly avg because it will also depend on day numbers either.(Just my opinion)&lt;BR /&gt;I am more in direction of dividing each hourly count by the number of total hours.(Not sure if i am right in this way of doing it)&lt;BR /&gt;Thank you.&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Dec 2020 23:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706163#M34216</guid>
      <dc:creator>sascode</dc:creator>
      <dc:date>2020-12-15T23:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Stats</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706175#M34217</link>
      <description>&lt;P&gt;I think it would be helpful to present some data here to explain your methodological issues. Not sure why you wouldn't just conceptually do an average and if you're looking for methodological advice you'll also need to provide more context, what you're trying to represent and show is important. In certain cases it doesn't make sense to look at averages at all, sometimes you need standard deviation instead or median or max or 95th percentile.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215702"&gt;@sascode&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;First thanks for replying,&lt;BR /&gt;My question is more related to the best way of calculating this average in terms of mathematical representation than coding part.&lt;BR /&gt;Again ,in my opinion , if i divide each hourly count with the number of days than my measure can not be more hourly avg because it will also depend on day numbers either.(Just my opinion)&lt;BR /&gt;I am more in direction of dividing each hourly count by the number of total hours.(Not sure if i am right in this way of doing it)&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 00:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706175#M34217</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-16T00:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Stats</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706178#M34218</link>
      <description>Hello again,&lt;BR /&gt;It is fine,&lt;BR /&gt;i do not like you to spend to much on time on it (I really appreciate ),&lt;BR /&gt;Below is how data looks for first two work days for example.&lt;BR /&gt;Hour Orders&lt;BR /&gt;6 11&lt;BR /&gt;7 15&lt;BR /&gt;8 8&lt;BR /&gt;9 7&lt;BR /&gt;…. …&lt;BR /&gt;16:00 5&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Dec 2020 00:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706178#M34218</guid>
      <dc:creator>sascode</dc:creator>
      <dc:date>2020-12-16T00:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Stats</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706184#M34219</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215702"&gt;@sascode&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hello again,&lt;BR /&gt;It is fine,&lt;BR /&gt;i do not like you to spend to much on time on it (I really appreciate ),&lt;BR /&gt;Below is how data looks for first two work days for example.&lt;BR /&gt;Hour Orders&lt;BR /&gt;6 11&lt;BR /&gt;7 15&lt;BR /&gt;8 8&lt;BR /&gt;9 7&lt;BR /&gt;…. …&lt;BR /&gt;16:00 5&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So describe exactly how you get 5? Please show the actual arithmetic. And if you used values you did not show, then show them.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 01:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706184#M34219</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-16T01:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Stats</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706185#M34220</link>
      <description>I count for all days how many times the 16:00( 4 p.m) is appeared .I saw it 5 times,&lt;BR /&gt;6 a.m is appeared 11 times and so on,&lt;BR /&gt;Thank you.</description>
      <pubDate>Wed, 16 Dec 2020 01:14:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706185#M34220</guid>
      <dc:creator>sascode</dc:creator>
      <dc:date>2020-12-16T01:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Stats</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706254#M34221</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215702"&gt;@sascode&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I count for all days how many times the 16:00( 4 p.m) is appeared .I saw it 5 times,&lt;BR /&gt;6 a.m is appeared 11 times and so on,&lt;BR /&gt;Thank you.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is a simple count based on the hour LOTS of ways to get counts: Proc Freq, Proc Report, Proc Tabulate, Proc Summary are just a few.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc freq data=have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; tables time ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc report data =have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; columns time n;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; define time /group;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc tabulate data=have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class time;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; table time , n;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 09:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/The-best-way-of-calculating-an-average/m-p/706254#M34221</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-16T09:09:40Z</dc:date>
    </item>
  </channel>
</rss>

