The following SAS program is submitted:
data allobs;
set sasdata.origin (firstobs = 75 obs = 499);
run;
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?
A. 424
B. 425
C. 499
D. 1000
Click Comment link to get answer
A
ReplyDeleteCorrect answer is 'B'
ReplyDelete499-74=425
ReplyDeleteso 'B' is the answer
I guess it should be (499-75) + 1
Deletebecause number from
Delete1 - 10 including 10 equal 10
1- 10 not including 10 = 9
B. 425
ReplyDeleteanswer is b 499-75+1=425
ReplyDeleteCould you explain where the +1 comes from? Thanks.
ReplyDeletewhen it read from 75 to 499 ,it will include 75 ,from 75 to it will read upto 499 so ,
Delete499 - 75 +1 = 425
+1 because both 499 and 75 will be outputted. For example 95 to 100 including 95 are (100-95+1) 6 values not (100-95) 5 values. Hope this makes sense.
ReplyDeletein new dataset allobs, the first obsn is 75 , & last one is 499, u hv to count the 75th obsn as the 1st obsn in the new data set, dats y +1 comes after (499-75)
ReplyDelete>>joydeep786@gmail.com
Let answer simple way.
ReplyDeleteHow about 10 to 15? is it 5 or 6?
In the count we start from 10 11 12 13 14 15 = 6.
How ever you get the answer either adding 1 or subtracting 1 from 10, you find your way and figure out.And tell us if there is any unique way to find the right answer. Man do not get confused in simple math.
good explanation anonymous
Deleteits "b"
ReplyDeleteB
ReplyDelete425
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteIt's C. The option tells SAS how many records to read, not what record to stop on.
ReplyDeleteB
ReplyDelete