Конвертер валютUSD 2,9921EUR 3,3424Моя статистикаПройдите любой тест
Все записи блога →
Последние Новости
  • Тур Хейердал — путешественник, переплывший океан на плоту
    Шесть мужчин, бальсовый плот и бескрайний Тихий океан. Тур Хейердал хотел проверить смелую идею: могли ли жители Южной Америки в древности добраться до островов Полинезии. Чтобы узнать это, он сам отправился в путь.Путь к успехуТур Хейердал родился 6 октября 1914 года в городе Ларвик в Норвегии. С детства он увлекался зоологией и дикой природой. В 1937–1938 годах Тур с женой прожил около года на острове Фату-Хива в Полинезии. Именно там, наблюдая за ветрами и течениями, он задумался о происхожде...
  • Христофор Колумб — мореплаватель, открывший Европе Америку
    Утром 12 октября 1492 года матрос с корабля «Пинта» крикнул, что видит берег. Через несколько часов три небольших судна подошли к острову, который местные жители называли Гуанахани. Экспедиция Христофора Колумба завершила первый переход через Атлантический океан, после которого мир перестал быть прежним.Путь к экспедицииКолумб родился около 1451 года в Генуе в семье ткача. Он рано ушёл в море, плавал по Средиземному и Атлантическому океанам, жил в Португалии. Он был уверен, что до Индии и Китая ...
  • Фрэнк Синатра — «Голос» века, певший по-своему
    Шляпа с лентой, небрежно накинутый плащ, бархатный баритон — Фрэнк Синатра умел превратить трёхминутную песню в маленький спектакль. Прозвище «Голос» закрепилось за ним ещё в 1940-х, и за десятилетия его мало кто смог оспорить.Путь к успехуСинатра родился в декабре 1915 года в Хобокене, штат Нью-Джерси, в семье итальянских эмигрантов. Музыкального образования он почти не получил, зато с юности пел на радио и в клубах. Первые успехи пришли в оркестрах Гарри Джеймса и Томми Дорси. В начале 194...
  • Михаил Булгаков — мастер, которого прочли после смерти
    Автор, которого при жизни почти не печатали, оказался одним из самых читаемых писателей столетия. История Михаила Афанасьевича Булгакова — это история терпения, упорства и веры в свою книгу.Путь к успехуБулгаков родился в 1891 году в Киеве, в семье преподавателя духовной академии. В 1916 году он окончил медицинский факультет Киевского университета и сразу начал работать врачом, в том числе в земской больнице в селе Никольском Смоленской губернии. Эти годы позже отразились в «Записках юного врача...
  • Дмитрий Менделеев — химик, составивший карту всех элементов
    Дмитрий Иванович Менделеев родился 8 февраля 1834 года (27 января по старому стилю) в Тобольске, в большой семье директора гимназии. Рос он в трудное время, но мать, по семейным преданиям, сделала всё, чтобы младший сын получил образование. Так будущий учёный оказался в Петербурге.Путь к успехуОкончив Главный педагогический институт, Менделеев стажировался в Европе, а в 1860-х годах стал профессором Петербургского университета. Читая курс неорганической химии, он не нашёл подходящего учебника и ...
  • Роальд Амундсен — покоритель полюсов и северо-западного прохода
    Полярные льды веками хранили свои тайны. Роальд Амундсен разгадал сразу несколько из них. Он не искал лёгкой славы: каждый его поход был итогом долгой учёбы у местных народов и внимательного расчёта.Путь к успехуАмундсен родился 16 июля 1872 года недалеко от города Борге в Норвегии. Он собирался стать врачом, но, прочитав о полярных экспедициях, выбрал другую жизнь. В 1897–1899 годах он участвовал в бельгийской экспедиции на судне «Бельжика», которая стала первой, перезимовавшей в Антарктике. Та...
  • Франциск Скорина — первопечатник Беларуси и Восточной Европы
    В 1517 году в Праге вышла небольшая книга, которую можно держать в одной руке. Это была Псалтирь, а на её страницах стояло имя издателя: «Франциск Скорина из Полоцка, в лекарских науках доктор». Так началась история восточнославянского книгопечатания.Путь к книгеТочная дата рождения Скорины неизвестна, обычно называют около 1490 года. Он родился в Полоцке в семье купца. В 1504 году его имя записано среди студентов Краковского университета. В 1512 году в итальянской Падуе он получил степень докто...
  • Марк Шагал — художник, чьи герои парят над городом
    На картинах Марка Шагала люди летают над крышами, скрипач сидит на домике, а синяя корова смотрит на зрителя человеческими глазами. Это не просто фантазия: художник всю жизнь рисовал родной Витебск, каким его хранила память, — с поэтической логикой сна.Путь к успехуМарк Шагал (при рождении Мовша Шагал) родился в 1887 году в семье бедного еврейского рабочего недалеко от Витебска и вырос в самом Витебске. Он учился у местного художника Юделя Пэна, затем уехал в Санкт-Петербург. В 191...
  • Янка Купала — народный поэт Беларуси
    Когда в начале XX века молодой поэт из деревни под Минском подписал свои стихи псевдонимом «Янка Купала», он, возможно, и не думал, что станет голосом целого народа. Но именно так и произошло.Путь к успехуИван Доминикович Луцевич родился в 1882 году в фольварке Вязынка близ Молодечно. Семья была небогатой: родители арендовали землю. Учился он в народном училище, потом работал домашним учителем, писарем, помощником провизора, много читал и рано начал писать стихи. Первое стихотворение «Мужик» нап...
  • Луи Пастер — учёный, победивший невидимых врагов
    Луи Пастер родился 27 декабря 1822 года в городке Доль на востоке Франции, в семье кожевника. Он был прилежным, но не блестящим учеником и интересовался живописью. Однако судьбу решила химия: она повела его от кристаллов к микробам и спасению жизней.Путь к успехуПервое крупное открытие Пастер сделал в 1848 году, изучая кристаллы солей винной кислоты. Он заметил, что они бывают двух зеркально отражённых форм, и тем самым заложил основы стереохимии. Позже он занялся брожением и показал, что за нег...
МатематикаМоя статистика

Тест по SAS

100 вопросов в 11 темах (лёгкий — 35, средний — 40, сложный — 25). Выберите темы, уровень и количество вопросов — к каждому ответу есть объяснение.

DATA step, чтение данных, форматы и даты, MERGE, функции, PROC SQL, описательная статистика, статистические процедуры, макросы и ODS. Вопросы на английском.

Все вопросы теста 100

Нажмите на вариант ответа, чтобы проверить себя, или «Показать ответ».

DATA step basics10
1Лёгкий
Which of these is a valid SAS variable name (default VALIDVARNAME=V7)?
  1. _score2
  2. 2score
  3. score-2
  4. total score
2Лёгкий
Where is the data set created by this step stored?
data scores;
  set raw;
run;
  1. In SASUSER; it is kept permanently
  2. In the current folder as a permanent file scores.sas7bdat
  3. Only in memory until the next RUN statement
  4. In the temporary WORK library; it is deleted when the SAS session ends
3Средний
Data set a has one variable x with values 1, 2, 3. What is the value of total in the last observation of b?
data b;
  set a;
  total = total + x;
run;
  1. 6
  2. 3
  3. .
  4. 0
4Средний
Which statement about the automatic variable _N_ is true?
  1. It holds the number of observations in the input data set, known at compile time
  2. It counts the iterations of the DATA step and is not written to the output data set
  3. It is written to the output data set unless you drop it
  4. It increases only when an observation is written to the output
5Сложный
Data set a has x = 1, 2, 3. What does b contain?
data b;
  set a;
  if x > 1 then output;
  y = 10;
run;
  1. 2 observations, with y = 10 in both
  2. 2 observations, with y missing in both
  3. 3 observations, with y = 10 in all of them
  4. 3 observations, with y missing only in the first
6Лёгкий
In a DATA step that contains no OUTPUT statement, when is an observation written to the output data set?
  1. At the end of each iteration of the DATA step
  2. Once, after the last input observation has been read
  3. Each time an assignment statement executes
  4. Only when a PUT statement executes
7Лёгкий
What is the program data vector (PDV)?
  1. The descriptor portion of a data set stored on disk
  2. The list of macro variables available to the DATA step
  3. A buffer that holds all observations of the input data set at once
  4. The area of memory where SAS builds the current observation, one at a time
8Средний
Data set a has x = 1, ., 3 (three observations). What are the values of total in b?
data b;
  set a;
  total + x;
run;
  1. 1, ., .
  2. 1, 1, 4
  3. 1, ., 4
  4. 4, 4, 4
9Сложный
Data set a contains x and y (y = 5 in every row). What is z in data set b?
data b;
  set a(drop=y);
  z = y * 2;
run;
  1. 10 in every observation
  2. 0 in every observation
  3. The step fails with an error because y does not exist
  4. Missing in every observation, with a note that y is uninitialized
10Сложный
Data set a has 3 observations (x is not one of its variables). How many observations does b have?
data b;
  x = 1;
  output;
  set a;
run;
  1. 3
  2. 6
  3. 4
  4. 7
Reading data9
11Лёгкий
What does FIRSTOBS=2 do here?
data sales;
  infile '/data/sales.csv' dlm=',' firstobs=2;
  input region $ amount;
run;
  1. Reads only the first 2 lines of the file
  2. Skips the first 2 data lines after the header
  3. Starts reading at the second line of the file, skipping the header row
  4. Reads every second line of the file
12Средний
What value does name get?
data p;
  input name $ age;
  datalines;
Christopher 25
;
run;
  1. Christopher
  2. Chris
  3. Missing, with an 'Invalid data' note
  4. Christop
13Средний
What values do a, b and c get?
data t;
  infile datalines dsd;
  input a b c;
  datalines;
1,,3
;
run;
  1. a = 1, b = ., c = 3
  2. a = 1, b = 3, c = .
  3. a = 1, b = 0, c = 3
  4. All three missing, with an 'Invalid data' note
14Средний
What does the DATA step produce for this data line?
data t;
  input name $ age;
  datalines;
Mary Ann 42
;
run;
  1. name = 'Mary Ann', age = 42
  2. name = 'Mary', age = 42
  3. name = 'Mary', age = . with an 'Invalid data' note
  4. An error, and the DATA step stops
15Лёгкий
What does the $ after name mean in this INPUT statement?
data people;
  input name $ age;
  datalines;
Anna 34
Boris 41
;
run;
  1. name is read as a character variable
  2. name holds a currency amount
  3. name is a macro variable
  4. name is the key used for BY-group processing
16Лёгкий
How many observations does nums have?
data nums;
  input x @@;
  datalines;
1 2 3
4 5
;
run;
  1. 2
  2. 3
  3. 5
  4. 1
17Средний
What numeric value is stored in amount?
data t;
  input @1 sdate mmddyy10. @12 amount comma8.;
  datalines;
03/15/2024 1,250.50
;
run;
  1. 1
  2. 1250.5
  3. 125050
  4. Missing, because a comma is not a valid digit
18Сложный
How many observations does t have?
data t;
  input a b c;
  datalines;
1 2
3 4 5
6 7 8
;
run;
  1. 2, the first being a = 1, b = 2, c = 3
  2. 3, with c missing in the first
  3. 2, the second being a = 4, b = 5, c = 6
  4. 1
19Сложный
What values are read? (There are two blanks before 42.)
data t;
  input name & $20. age;
  datalines;
Mary Ann Smith  42
;
run;
  1. name = 'Mary', age = .
  2. name = 'Mary Ann Smith 42', age = .
  3. name = 'Mary Ann Smith', age = .
  4. name = 'Mary Ann Smith', age = 42
Variables and formats9
20Лёгкий
How does SAS store a date value such as 15 March 2024?
  1. As a number: the count of seconds since 1 January 1960
  2. As a number: the count of days since 1 January 1960
  3. As a number: the count of days since 1 January 1900
  4. As a character string such as '15MAR2024'
21Лёгкий
What is the default length, in bytes, of a numeric variable in a SAS data set?
  1. 8
  2. 4
  3. 2
  4. 16
22Средний
What value is stored in d?
data t;
  d = '31DEC1959'd;
run;
  1. 0
  2. 364
  3. Missing, because dates before 1960 are not allowed
  4. -1
23Средний
What does the PUT statement write to the log?
data _null_;
  d = '15MAR2024'd;
  put d yymmdd10.;
run;
  1. 15MAR2024
  2. 03/15/2024
  3. 2024-03-15
  4. 23450
24Сложный
In data set raw, name is character with length 20. What is the length of name in data set t?
data t;
  set raw;
  length name $ 10;
run;
  1. 10, with values truncated to 10 characters
  2. 20, and the log warns that the length was already set
  3. 30, the two lengths added together
  4. The step fails with an error and t is not created
25Лёгкий
Which statement is true after this step?
data t;
  x = 1234.567;
  format x 8.1;
run;
  1. The stored value is rounded to 1234.6
  2. The stored value is 1234.567; PROC PRINT displays 1234.6
  3. The stored value is truncated to 1234.5
  4. x becomes a character variable '1234.6'
26Лёгкий
What does this LABEL statement change?
data t;
  set raw;
  label sbp = 'Systolic blood pressure';
run;
  1. It renames sbp to 'Systolic blood pressure'
  2. It assigns a display format to sbp
  3. It only adds a comment line to the log
  4. The descriptive text shown for sbp in procedure output; the variable is still named sbp
27Средний
What is the value of status?
data t;
  x = 2;
  if x = 1 then status = 'No';
  else status = 'Yes';
run;
  1. 'Ye'
  2. 'Yes'
  3. 'No'
  4. Missing (blank)
28Сложный
age is missing (.) in one observation. What does PROC PRINT show for it?
proc format;
  value agegrp low-<18 = 'Minor'
               18-high = 'Adult';
run;

proc print data=t;
  var age;
  format age agegrp.;
run;
  1. Minor
  2. Adult
  3. .
  4. An error, because missing is not covered by any range
Conditional logic and loops9
29Лёгкий
What does the statement if sex = 'F'; do in this DATA step?
data women;
  set patients;
  if sex = 'F';
run;
  1. Sets sex to 'F' in every observation
  2. Writes all observations and adds a flag variable
  3. Stops the whole DATA step at the first observation that is not 'F'
  4. Writes only the observations where sex is 'F'; for the others the iteration ends without output
30Средний
What is the value of i after the loop finishes?
data t;
  do i = 1 to 5;
    total + i;
  end;
run;
  1. 6
  2. 5
  3. 15
  4. .
31Средний
What does this code do?
data clean;
  set survey;
  array q{3} q1-q3;
  do i = 1 to 3;
    if q{i} = 99 then q{i} = .;
  end;
  drop i;
run;
  1. Replaces the code 99 with a missing value in q1, q2 and q3
  2. Creates three new variables q{1}, q{2}, q{3} holding 99
  3. Deletes observations in which any of q1–q3 equals 99
  4. Replaces missing values in q1–q3 with 99
32Сложный
grade is 'C' in one observation. What happens?
data t;
  set grades;
  select (grade);
    when ('A', 'B') points = 2;
    when ('D') points = 0;
  end;
run;
  1. points is set to missing and processing continues
  2. SAS writes an error to the log and the DATA step stops
  3. points is set to 0, the value of the last WHEN
  4. The observation is silently deleted
33Лёгкий
What is the value of y?
data t;
  x = 5;
  if x > 3 then y = 1;
  else if x > 4 then y = 2;
  else y = 3;
run;
  1. 2
  2. 1
  3. 3
  4. .
34Лёгкий
How many observations does t have?
data t;
  do i = 1 to 3;
    x = i * 10;
    output;
  end;
run;
  1. 3
  2. 1
  3. 4
  4. 6
35Средний
age is missing for one patient. What is group for that patient?
data t;
  set patients;
  length group $ 5;
  if age < 18 then group = 'child';
  else group = 'adult';
run;
  1. 'adult'
  2. Blank, because a comparison with missing is skipped
  3. The step stops with an error
  4. 'child'
36Средний
What is the value of n?
data t;
  n = 0;
  x = 10;
  do until (x > 5);
    n + 1;
  end;
run;
  1. 0
  2. 6
  3. 1
  4. The loop never ends
37Сложный
What happens when this step runs?
data t;
  array a{3} x1-x3;
  do i = 1 to 4;
    a{i} = 0;
  end;
run;
  1. SAS creates x4 = 0 automatically
  2. The fourth assignment is ignored and t has x1–x3 = 0
  3. The subscript wraps around and sets x1 again
  4. An 'Array subscript out of range' error occurs at i = 4 and the step stops
Combining data sets9
38Лёгкий
a has 3 observations and b has 4, both with the same variables. How many observations does c have?
data c;
  set a b;
run;
  1. 4
  2. 3
  3. 12
  4. 7
39Средний
a has id = 1, 2, 3 and b has id = 2, 3, 4 (one row per id, both sorted). Which ids are in c?
data c;
  merge a(in=ina) b(in=inb);
  by id;
  if ina and not inb;
run;
  1. 2 and 3
  2. 4
  3. 1
  4. 1 and 4
40Средний
Both a and b have a variable score besides id. For id = 5, score is 70 in a and 85 in b. What is score in c for id = 5?
data c;
  merge a b;
  by id;
run;
  1. 70
  2. The step fails because score appears in both data sets
  3. Two variables are created: score and score2
  4. 85
41Средний
An id has 3 rows in visits (sorted by id). What is n for that id in counts?
data counts;
  set visits;
  by id;
  if first.id then n = 0;
  n + 1;
  if last.id;
  keep id n;
run;
  1. 1
  2. 3
  3. The running count of rows across all ids so far
  4. .
42Сложный
a has 5 observations and b has 3. How many observations does c have?
data c;
  set a;
  set b;
run;
  1. 3
  2. 5
  3. 8
  4. 15
43Лёгкий
What must be true before running this step?
data both;
  merge a b;
  by id;
run;
  1. a and b have the same number of observations
  2. id is a character variable
  3. Both a and b are sorted (or indexed) by id
  4. a and b have no variables in common except id
44Средний
a has one row: id = 1, x = 10. b has three rows with id = 1 and y = 1, 2, 3. What does c contain?
data c;
  merge a b;
  by id;
run;
  1. 3 rows, each with x = 10
  2. 3 rows, with x = 10 only in the first
  3. 1 row with x = 10 and y = 3
  4. 1 row with x = 10 and y = 1
45Средний
visits is sorted by id and visit_date. What does last_visit contain?
data last_visit;
  set visits;
  by id;
  if last.id;
run;
  1. Only the very last row of the data set
  2. One row per id: its latest visit
  3. One row per id: its earliest visit
  4. All rows except the last one of each id
46Сложный
a has 2 rows with id = 1 (x = 1, 2); b has 3 rows with id = 1 (y = 'p', 'q', 'r'). How many rows does c have?
data c;
  merge a b;
  by id;
run;
  1. 6
  2. 3
  3. 2
  4. 5
Functions9
47Лёгкий
What does mean(1, ., 3) return?
  1. 1.3333333
  2. .
  3. 2
  4. 4
48Средний
What does scan('John A. Smith', -1, ' ') return?
  1. 'John'
  2. 'Smith'
  3. 'A.'
  4. A blank value
49Сложный
first = 'Ann' and last = 'Lee' are both stored with length 10. Which expression returns 'Ann Lee' with exactly one blank and no trailing blanks?
  1. catx(' ', first, last)
  2. first || ' ' || last
  3. cat(first, ' ', last)
  4. trim(first || last)
50Сложный
What value does n get?
n = intck('month', '31JAN2024'd, '01FEB2024'd);
  1. 0
  2. 0.03
  3. -1
  4. 1
51Лёгкий
x is missing and y = 5. What are a and b?
data t;
  x = .;
  y = 5;
  a = x + y;
  b = sum(x, y);
run;
  1. a = 5, b = 5
  2. a = ., b = .
  3. a = ., b = 5
  4. a = 5, b = .
52Лёгкий
What does substr('Statistics', 3, 4) return?
  1. 'atis'
  2. 'tati'
  3. 'tist'
  4. 'at'
53Средний
c is the character value '123'. Which statement creates a numeric variable n = 123 without automatic type conversion?
  1. n = put(c, 8.);
  2. n = c;
  3. n = numeric(c);
  4. n = input(c, 8.);
54Средний
What does mdy(2, 30, 2024) return?
  1. A missing value, with a note about an invalid argument
  2. The date value of 1 March 2024
  3. The date value of 29 February 2024
  4. An error that stops the DATA step
55Сложный
What date does intnx('month', '15MAR2024'd, 1) return?
  1. 15 April 2024
  2. 1 April 2024
  3. 30 April 2024
  4. 16 March 2024
PROC SQL9
56Лёгкий
Which statement ends a PROC SQL step?
  1. run;
  2. end;
  3. quit;
  4. %mend;
57Лёгкий
sales has 5 rows; score is missing in 2 of them. What does the query return?
proc sql;
  select count(*) as n_all, count(score) as n_score
  from sales;
quit;
  1. n_all = 5, n_score = 5
  2. n_all = 3, n_score = 3
  3. n_all = 5, n_score = 2
  4. n_all = 5, n_score = 3
58Средний
Why does this query fail?
proc sql;
  select price * qty as revenue,
         revenue * 0.2 as tax
  from orders;
quit;
  1. revenue is not a column of orders; it must be referenced as calculated revenue
  2. An AS alias must be enclosed in quotes
  3. Arithmetic is not allowed in a SELECT list
  4. The query needs a GROUP BY clause
59Средний
What does this code do?
proc sql noprint;
  select count(*) into :nobs
  from patients;
quit;
%put &nobs;
  1. Creates a data set nobs with one row
  2. Creates a numeric DATA step variable nobs in patients
  3. Stores the number of rows of patients in macro variable nobs and writes it to the log
  4. Prints the count as a report and in the log
60Сложный
In table t, x is missing in some rows. Which rows does this query return?
proc sql;
  select * from t
  where x < 10;
quit;
  1. Only rows with a non-missing x below 10
  2. Rows with x below 10, including those where x is missing
  3. Only rows where x is missing
  4. No rows; the query fails because x has missing values
61Лёгкий
What does this code produce?
proc sql;
  create table work.big as
  select id, amount
  from sales
  where amount > 1000;
quit;
  1. A printed report only, no data set
  2. A view named big that is recomputed every time it is used
  3. A data set work.big with columns id and amount for rows where amount > 1000
  4. A data set with all columns of sales plus a flag column
62Средний
Which query lists the regions whose total sales exceed 10000?
  1. select region, sum(amount) as total from sales where sum(amount) > 10000 group by region;
  2. select region, sum(amount) as total from sales group by region where total > 10000;
  3. select region, amount from sales where amount > 10000;
  4. select region, sum(amount) as total from sales group by region having sum(amount) > 10000;
63Средний
a has id = 1, 2, 3 and b has id = 2, 3, 4 (one row per id). How many rows does the query return?
proc sql;
  select *
  from a left join b
  on a.id = b.id;
quit;
  1. 3
  2. 2
  3. 4
  4. 9
64Сложный
a has 2 rows with id = 1 and b has 3 rows with id = 1 (no other ids). How many rows does the join return?
proc sql;
  select *
  from a inner join b
  on a.id = b.id;
quit;
  1. 3
  2. 6
  3. 2
  4. 5
Descriptive statistics9
65Лёгкий
What does this one-way table show for each value of sex?
proc freq data=patients;
  tables sex;
run;
  1. Mean, Std Dev, Minimum and Maximum
  2. Only the number of distinct values
  3. Frequency, Percent, Cumulative Frequency and Cumulative Percent
  4. Frequency and a chi-square test
66Средний
In a group*outcome table, group A has 30 'yes' and 10 'no', group B has 20 'yes' and 40 'no' (100 patients). What Row Pct is shown in the cell A / yes?
proc freq data=trial;
  tables group*outcome;
run;
  1. 30.00
  2. 75.00
  3. 60.00
  4. 40.00
67Сложный
smoker is missing for 5 of 100 patients. How does a default one-way PROC FREQ table handle them?
proc freq data=patients;
  tables smoker;
run;
  1. They are left out of the table and percents, and reported as 'Frequency Missing = 5'
  2. They appear as a separate row with a percent of 5%
  3. They are counted in the most frequent category
  4. The procedure stops with an error
68Сложный
In data set stats, which value of _TYPE_ marks the row with the overall mean over all observations?
proc means data=t noprint;
  class region sex;
  var income;
  output out=stats mean=avg_income;
run;
  1. 1
  2. 3
  3. None; only region*sex combinations are written
  4. 0
69Лёгкий
Which statistic is NOT printed by default by PROC MEANS?
  1. N
  2. Std Dev
  3. Maximum
  4. Median
70Лёгкий
Variable bmi has 10 observations, 2 of them missing. What does PROC MEANS report?
  1. N = 10, and the sum divided by 10
  2. N = 10, with missing values counted as 0
  3. N = 8, and the mean of the 8 non-missing values
  4. N = 8, and the sum divided by 10
71Лёгкий
What is a practical difference between CLASS and BY in PROC MEANS?
  1. CLASS requires sorted data; BY does not
  2. Only BY can group by more than one variable
  3. CLASS works only with character variables
  4. BY requires the data to be sorted by the grouping variable; CLASS does not
72Средний
Which option makes PROC UNIVARIATE print tests for normality such as Shapiro-Wilk?
proc univariate data=t ______;
  var weight;
run;
  1. normal
  2. plot
  3. shapiro
  4. freq
73Средний
PROC FREQ with tables group*outcome / chisq; gives a Pearson chi-square p-value of 0.002. What is the correct conclusion?
  1. group causes the outcome
  2. The groups have equal outcome proportions
  3. There is evidence that group and outcome are associated (not independent)
  4. The table has too few observations for any test
Statistical procedures9
74Лёгкий
Which statement tells PROC TTEST which variable defines the two groups being compared?
proc ttest data=study;
  ______ treatment;
  var score;
run;
  1. by
  2. class
  3. paired
  4. model
75Лёгкий
In the default PROC CORR output, what is the second number shown under each Pearson correlation coefficient?
proc corr data=t;
  var x y;
run;
  1. The p-value for testing H0: rho = 0
  2. The standard error of the coefficient
  3. The number of observations
  4. The squared correlation
76Средний
Each patient's blood pressure was measured before and after treatment, stored in variables before and after on the same row. Which PROC TTEST statement fits this design?
  1. class before after;
  2. var before after;
  3. by before after;
  4. paired before*after;
77Средний
Why use PROC GLM rather than PROC REG for a one-way ANOVA of score on a character variable diet with 3 levels?
  1. PROC REG cannot compute p-values
  2. GLM does not assume normally distributed errors
  3. GLM accepts a CLASS statement and builds the dummy variables for diet itself
  4. PROC REG only works with fewer than 3 predictors
78Сложный
In this PROC GLM model with unbalanced data, what do the Type III sums of squares test?
proc glm data=t;
  class a b;
  model y = a b;
run;
  1. Each effect adjusted only for the effects listed before it in MODEL
  2. Each effect on its own, ignoring all other effects
  3. Only the a*b interaction
  4. Each effect adjusted for all other effects in the model, so the order in MODEL does not matter
79Лёгкий
PROC REG for model weight = height gives a parameter estimate of 0.9 for height (weight in kg, height in cm). How do you interpret it?
  1. 90% of the variation in weight is explained by height
  2. Each additional cm of height is associated with a 0.9 kg higher predicted weight
  3. The correlation between height and weight is 0.9
  4. Predicted weight is 0.9 kg when height is 0
80Средний
In PROC TTEST output, the Folded F test for equality of variances has p = 0.001. Which t test row should you report?
  1. Pooled (equal variances)
  2. Neither; a t test cannot be used
  3. The Folded F test itself
  4. Satterthwaite (unequal variances)
81Средний
A simple linear regression (one predictor) has R-square = 0.64 and a negative slope. What is the Pearson correlation between x and y?
  1. 0.8
  2. -0.8
  3. -0.64
  4. 0.4096
82Сложный
A one-way ANOVA in PROC GLM compares 4 groups with 40 observations in total (no missing values). What degrees of freedom are shown for Model and Error?
  1. Model 3, Error 36
  2. Model 4, Error 36
  3. Model 3, Error 39
  4. Model 4, Error 40
Macros9
83Лёгкий
What title is shown?
%let year = 2024;
title 'Sales report &year';
  1. Sales report 2024
  2. Sales report
  3. Sales report &year
  4. Sales report year
84Средний
How many characters does the value of &name contain?
%let name =   John Smith   ;
  1. 10
  2. 16
  3. 13
  4. 4
85Средний
What does %put write to the log?
%let a = 1 + 2;
%put &a;
  1. 3
  2. 1 + 2
  3. a
  4. An error about a non-numeric value
86Сложный
Macro variable n does not exist before this step. What happens?
data _null_;
  call symputx('n', 5);
  x = &n;
  put x=;
run;
  1. x=5 is written to the log
  2. x is missing, but no warning appears
  3. &n cannot be resolved when the step is compiled, so a warning and an error appear
  4. x=0, because n starts at 0
87Лёгкий
What kind of value does a macro variable hold?
%let n = 10;
  1. A number, because the value consists of digits
  2. Whatever type a DATA step variable named n has
  3. Always text, even when it looks like a number
  4. A reference to a SAS data set
88Лёгкий
Which line correctly calls this macro to summarise variable amount in data set sales?
%macro summ(ds, var);
  proc means data=&ds;
    var &var;
  run;
%mend summ;
  1. summ(sales, amount);
  2. %summ(sales, amount)
  3. %summ ds=sales var=amount;
  4. call summ('sales', 'amount');
89Средний
What does the DATA statement resolve to?
%let lib = mylib;
data &lib..scores;
  set raw;
run;
  1. data mylib..scores;
  2. data mylibscores;
  3. data &lib.scores;
  4. data mylib.scores;
90Сложный
What do the two %PUT statements write?
%put %eval(7/2);
%put %sysevalf(7/2);
  1. 3.5 and 3.5
  2. 4 and 3.5
  3. 3 and 3.5
  4. 3 and 3
91Сложный
What does %put write?
%let city1 = Minsk;
%let city2 = Brest;
%let i = 2;
%put &&city&i;
  1. Brest
  2. Minsk
  3. city2
  4. &city2
Output and ODS9
92Лёгкий
What is needed after the PROC steps to finish writing report.pdf?
ods pdf file='report.pdf';
proc print data=sales;
run;
proc means data=sales;
run;
______
  1. run;
  2. ods pdf close;
  3. quit;
  4. ods listing;
93Лёгкий
Where does the PUT statement write by default, and what does it write?
data _null_;
  x = 5;
  put x=;
run;
  1. x=5 to the SAS log
  2. 5 to the results window
  3. x=5 to a data set named _null_
  4. x=5 to the results as a one-row table
94Средний
What does this code create?
ods output ParameterEstimates=pe;
proc reg data=t;
  model y = x;
run;
quit;
  1. A file named pe with all printed output
  2. A macro variable pe holding the slope
  3. A plot of the parameter estimates
  4. A data set pe containing the parameter estimates table
95Средний
amount in data set sales has no format. After these steps, what format does amount have in sales?
proc print data=sales;
  format amount dollar10.2;
run;
proc means data=sales;
  var amount;
run;
  1. DOLLAR10.2, saved in the data set
  2. None; the format applied only to the PROC PRINT step
  3. DOLLAR10.2 until the end of the session
  4. BEST12., because PROC PRINT converts it
96Сложный
sales has 100 observations. How many does PROC PRINT show?
proc print data=sales(firstobs=3 obs=5);
run;
  1. 5 (observations 3 to 7)
  2. 2 (observations 4 and 5)
  3. 3 (observations 3, 4 and 5)
  4. 5 (observations 1 to 5)
97Лёгкий
What does the NOOBS option do?
proc print data=sales noobs;
  var region amount;
run;
  1. Suppresses the Obs column with row numbers
  2. Prints only the variable names, no observations
  3. Hides observations with missing values
  4. Prints the number of observations at the end
98Средний
Which statement writes the names of the output tables (such as ParameterEstimates) produced by a procedure to the log?
  1. ods select all;
  2. ods listing close;
  3. ods trace on;
  4. proc contents data=_all_;
99Средний
What is displayed by this code?
ods select Moments;
proc univariate data=t;
  var weight;
run;
  1. All UNIVARIATE tables except Moments
  2. Only the Moments table of PROC UNIVARIATE
  3. Moments plus all the default tables
  4. Nothing; ODS SELECT only affects ODS OUTPUT
100Сложный
Which titles appear on output produced after these statements?
title1 'Annual Report';
title2 'Region North';
title3 'Draft';
title2 'Region South';
  1. Annual Report, Region South and Draft
  2. Region South only
  3. Annual Report, Region North, Draft and Region South
  4. Annual Report and Region South

Как проходить тест

  • Выберите темы и уровень — лёгкий уровень проверяет определения и задачи в одно действие, средний — стандартные вычисления, сложный — многошаговые задачи и теорию.
  • Отвечайте касанием или с клавиатуры: 1–4 или A–D, Enter — следующий вопрос.
  • Читайте объяснения — после ошибки разбор открывается сразу, после верного ответа его можно раскрыть кнопкой «Почему».
  • Работайте над ошибками — «Повторить ошибки» в конце теста или режим «Только мои ошибки» потом: ответы запоминаются в этом браузере.

Незавершённый тест сохраняется — после перезагрузки страницы можно продолжить с того же вопроса.

Темы теста

  • DATA step basics 10
  • Reading data 9
  • Variables and formats 9
  • Conditional logic and loops 9
  • Combining data sets 9
  • Functions 9
  • PROC SQL 9
  • Descriptive statistics 9
  • Statistical procedures 9
  • Macros 9
  • Output and ODS 9