Docsity

Statistical Programming Exam Questions and Answers, Exams of Data Analysis & Statistical Methods

Toggle sidebar
bg1
Statistical Programming Final Study
Set rated A
What is an error that prevents the creation of an executable
version of a program? -
correct answer
✅Compile-time error
Which of the following statements is best used for traversing a list
in Python? -
correct answer
✅for
What term is used for a special identifier with a predefined
meaning in a programming language? -
correct answer
✅reserved word
What is a magic command? -
correct answer
✅A command line
program executed within the IPython environment.
Which of the following describes the programming paradigm of
the Python language? -
correct answer
✅ALL OF THE ABOVE
(Procedural, Object-oriented, Functional)
A Python tuple is a structure which maps keys to values. -
correct answer
✅False
Lambda functions can be defined on one line of code. -
correct
answer
✅True
Python function definitions must begin with the def keyword and
must have a return statement. -
correct answer
✅False
pf3
pf4
pf5
pf8

Partial preview of the text

Download Statistical Programming Exam Questions and Answers and more Exams Data Analysis & Statistical Methods in PDF only on Docsity!

Set rated A

What is an error that prevents the creation of an executable version of a program? - correct answer ✅Compile-time error Which of the following statements is best used for traversing a list in Python? - correct answer ✅for What term is used for a special identifier with a predefined meaning in a programming language? - correct answer ✅reserved word What is a magic command? - correct answer ✅A command line program executed within the IPython environment. Which of the following describes the programming paradigm of the Python language? - correct answer ✅ALL OF THE ABOVE (Procedural, Object-oriented, Functional) A Python tuple is a structure which maps keys to values. - correct answer ✅False Lambda functions can be defined on one line of code. - correct answer ✅True Python function definitions must begin with the def keyword and must have a return statement. - correct answer ✅False

Set rated A

What is a debugger? - correct answer ✅A software tool for finding and correcting errors in a program. Which of the following functions returns a list of tuples, where the i'th tuple contains the i'th element from each of the argument sequences or iterables? - correct answer ✅zip A pseudo-random number generator will produce an infinite sequence of numbers which never repeat themselves. - correct answer ✅False An in-place sorting algorithm returns a new array or list - correct answer ✅False A NumPy function that performs element-wise operations on data in ndarrays is called - correct answer ✅universal function Which of the following data structures is provided by the NumPy package? - correct answer ✅ndarray The mergsort algorithm is always faster than the quicksort algorithm - correct answer ✅False What is an advantage of using the Python pandas package for data analysis? - correct answer ✅Data structures with labeled axis

Set rated A

A pivot operation on a DataFrame can be implemented by using set_index and unstack. - correct answer ✅True What is a regular expression? - correct answer ✅An expression that specifies a text pattern. A merging operation which performs an 'inner' join, will never return more key entries than one that performs an 'outer' join. - correct answer ✅True Assume you have data consisting of two numeric attributes: temperature and distance. There are many temperature values for the same distance value and vice versa. Which of the following would be the most natural visualization of this data? - correct answer ✅Scatter plot Which colormap would be best to use to show geographic regions that where sales increased or decreased by various amounts? - correct answer ✅Diverging Assume you have data consisting of one numeric attribute, GDP, and one categorical attribute, country. For each country value, there is a corresponding GDP value. Which of the following would be the most natural visualization of this data? - correct answer ✅Bar graph Assume you have data consisting of two numeric attributes: temperature and distance. For each distance value, there is a unique temperature value. Which of the following would be the

Set rated A

most natural visualization of this data? - correct answer ✅Line plot A KDE plot uses a mixture-of-normals to create a density plot. - correct answer ✅True The alpha value of a graphical object represents which of the following? - correct answer ✅fill opacity A log-scaled plot should be used when graphing quadratically increasing data. - correct answer ✅False The statementdf2[['data1','data2']].groupby([df2['key1'],df2['key2']]). mean()produces a hierarchical index. - correct answer ✅True Which of the following methods would be best to use to produce a table of group frequencies? - correct answer ✅crosstab The following Python statement:df2['attr1'].groupby(df2['attr2']).mean()produces a table of the mean values of attr2. - correct answer ✅False The qcut method produces equal-length buckets. - correct answer ✅False

Set rated A

When computing descriptive statistics using pandas methods, missing values are excluded from the result. - correct answer ✅True Which of the following pandas methods computes a set of different summary statistics for the whole DataFrame object? - correct answer ✅Describe Which of the following could be used in a dataset to denote a sentinel value corresponding to missing data? - correct answer ✅Any (depends on the dataset) What is the purpose of the map function? - correct answer ✅To transform data by applying a function Which of the following statements is best used for selection in Python? - correct answer ✅if What is a stable sorting algorithm? - correct answer ✅One that preserves relative positions of equal elements In NumPy, data stored in ndarrays must be of a homogeneous type. - correct answer ✅True Which of the following formats is a standard format for sending data by HTTP requests between web browsers and other applications? - correct answer ✅JSON

Set rated A

Which of the following pandas functions separates data into "bins"? - correct answer ✅cut The JPG image format normally uses a lossless compression algorithm. - correct answer ✅False Which of the following image formats would be best to use for large images containing pie charts and bar graphs that will be shown on a web site? - correct answer ✅PNG In a normalized histogram that corresponds to a probability density function, the sum of the bin counts must equal 1. - correct answer ✅False An operation that produces a scalar value from an array of values is called - correct answer ✅An aggregation What is downsampling? - correct answer ✅Going from higher to lower sampling What is upsampling? - correct answer ✅Going from lower to higher sampling How do you shift the index in a df that is a timeseries? - correct answer ✅ts.shift(2, freq='M')