BookmarkSubscribeRSS Feed
pacruz
Calcite | Level 5

I need help with the following question, please. I have no idea where to start

 

The number of hours of the college students aged 18 to 24 years spending online in a typical week was interested in to a researcher. Suppose that the number of hours spending online is normal distributed with mean of 28 and standard deviation of 5.6.  
Use appropriate Functions in SAS to answer the following questions. 
Find the probability that a college student aged 18 to 24 years, selected at random, spends between 20 and 35 hours online each week.  Determine the proportion of college students aged 18 to 24 years who spend more than 40 hours online per week.

2 REPLIES 2
PaigeMiller
Diamond | Level 26

This is a relatively basic statistics question, the kind you would be asked in statistics 101.

 

If you know how to do this using pencil and paper and a table of the normal distribution, then the method in SAS simply replaces the table of the normal distribution with a function in SAS. The SAS function you would want to use is the PROBNORM function.

 

And if you don't know how to do this using pencil and paper, then you need to first learn the basics of the normal distribution, any introductory textbook will do.

--
Paige Miller
PeterClemmensen
Tourmaline | Level 20

Just to get you started, you are looking for the shaded area under the curve plotted like this

 

data PDF;
do hours = 8 to 48 by 0.05;
   Y = pdf("Normal", hours, 28, 5.6);

   if hours <= 35 then upper = Y;else upper = 0;
   if hours <= 20 then lower = Y; else lower = 0;

   output;
end;
run;

/* First Question */
title 'Density of Hours Spent online';
title2 '18 to 24 year olds';
proc sgplot data = PDF noautolegend;
   series x = hours y = Y;
   band x = hours lower = lower upper = upper;

   xaxis label = 'Hours Spent';
   yaxis label = 'Density';
run;
title;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 749 views
  • 0 likes
  • 3 in conversation