CS 1173 Midterm

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

In MATLAB the values in an array or vector are called? a. Elements b. Scalar c. Line d. Indices

a. Elements

In MATLAB, Variables are "Case Sensitive" (MATLAB treats variables differently depending on whether it has capitals or lowercase text). If you define a variable below newvariable = A + B TRUE OR FALSE MATLAB will let you interchange any combination of variations of the word newvariable later in the script so newvariable, NewVariable, newVariable, NeWvAriable are all the same as far as the script/MATLAB and are all assigned the same value. True False

False

Error bars are a visual device that is generally used to convey uncertainty. True False

True

In MATLAB, array nomenclature typically provides the row and column dimension as ( row x column). Array 'householdDogs" (10x50) would indicate the array householdDogs has 10 rows and 50 columns. True False

True

In MATLAB, the combination of using the hold on and hold off commands allows you to plot multiple lines on the same graph. True or False

True

In MATLAB, the subplot commands allows you to display multiple graphs in the same figure. True False

True

Is the Below statement true or False? A variable is a way of holding data in a program. Variables have names and values. The value of the variable is the data that the variable holds. You can refer to the data by the variable's name. You can change the value of a variable by assigning it a new value (hence the name variable) True False

True

Measures of spread are often displayed as the wings (whiskers) of error bars with the measure of central tendency (mean or median) being the center of the error bar. True False

True

The goal of a histogram is to display a "distribution" of data, where the x axis is a range or category. True False

True

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = min(exampleArray) a. 0 -1 4 b. -4 c. 2 2 2 2 2 2 0 -1 -4 d. 4 6 -4

a. 0 -1 4

In MATLAB a function is a group of statements that perform a task. Functions can accept more than one input argument and may return more than one output argument. Below is script syntax using the SUM function. B = sum(A, 1) What dimension will MATLAB sum over (process across to do the addition)? a. 1 b. A c. 2 d. B

a. 1

In MATLAB a function is a group of statements that perform a task. Functions can accept more than one input argument and may return more than one output argument. Below is script syntax using the SUM function. B = sum(A, 1) What is the default dimension to sum over? a. 1 b. 2 c. B d. A

a. 1

When creating a Histogram in MATLAB, the default number of bins is: a. 10 b. 25 c. 5 d. 15

a. 10

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] Click on the array that shows A in Tabular Form. a. 10 15 6 4 11 4 7 3 5 -1 -3 12 b. 10 15 6 4 c. 10 11 5 15 4 -1 6 7 -3 4 3 12 d. 10 11

a. 10 15 6 4 11 4 7 3 5 -1 -3 12

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = max(exampleArray) a. 11 7 10 b. 11 c. 4 6 10 11 7 6 2 2 2 d. 10 11 0

a. 11 7 10

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] Click on the array that shows the results found in array B after you run the below script. B = sum(A) a. 26 18 10 19 b. 35 25 13 c. 73 d. 10 15 6 4 11 4 7 3 5 -1 -3 12

a. 26 18 10 19

The side-by-side (left) and stacked (right) bar graphs below show the same information. The data is from lesson 1 (count.dat) and tracks vehicles thru 3 specific intersections. The graphs below are a sub set of the overall data and display the data from 9am to 5pm. What percent of vehicle traffic was thru IH10 at 5pm? a. 32% b. 5% c. 10% d. 50%

a. 32%

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = median(exampleArray) a. 4 6 6 b. 6.6667 8.0000 -1.6667 c. 5 4 4 d. 6 7 -1

a. 4 6 6

In statistics, another common measure of spread is Standard Deviation which uses the squares of the errors instead of absolute values of errors. First, you determine the error by taking each data element, one by one and subtracting the mean. Next you square each of those values individually. Variance (of the sample) is the average squared error (usually called the mean squared error or MSE) of data from the mean. Average the squared errors (add all the squares and divide by the number of elements) to get the Variance. Because we squared the data, it is not in the correct units, so you need to take the square root of the Variance to get Standard Deviation. Standard Deviation (of the sample) is the square root of the average squared error of data (Variance) from the mean (sometimes called RMS error). Given a x = [ -1, -1, 2 , 4 ] (average is 1 and median is .05) Which of the below answers provides the Varience for x? a. 4.5 b. 2 c. 2.1213 d. 1

a. 4.5

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] To access the individual elements of an array, you give MATLAB indices in parentheses. What is the value of the new variable B given the below script? B = A(3, 1) a. 5 b. -1 c. 10 d. 6

a. 5

In MATLAB several functions default to along the first non-singleton dimension, if you do not provide a dimension argument. This means that if the array provided is: a vector of single row of values a vector of a single column of values MATLAB will perform the computation across that single vector (if no dimension argument is provided). However, if your variable is an array with multiple rows or columns, and you do NOT include a dimension argument, MATLAB will default to dimension 1 (transversing the computations down the rows). Given the MATLAB Variable: C = [ 6, 8, 10 ; 12, 4, 11] Which answer below provides the value of E if: E = min(C, [ ] , 2). a. 6 4 b. 4 c. 10 12 d. [12,11,8]

a. 6 4

In MATLAB several functions default to along the first non-singleton dimension, if you do not provide a dimension argument. This means that if the array provided is: a vector of single row of values a vector of a single column of values MATLAB will perform the computation across that single vector (if no dimension argument is provided). However, if your variable is an array with multiple rows or columns, and you do NOT include a dimension argument, MATLAB will default to dimension 1 (transversing the computations down the rows). Given the MATLAB Variable: C = [ 6, 8, 10 ; 12, 4, 11] Which answer below provides the value of E if: E = median(C). a. 9 b. 10 c. 8 d. 4

a. 9

The side-by-side (left) and stacked (right) bar graphs below show the same information. The data is from lesson 1 (count.dat) and tracks vehicles thru 3 specific intersections. The graphs below are a sub set of the overall data and display the data from 9am to 5pm. For the side-by-side graph, what does each bar in the graph represent? a. An individual bar represents the total number of cars that passed thru a unique intersection during a specific hour. b. Each unique color represents the total for a specific intersection. c. An individual bar represents the total number cases for a particular disease in a particular month. d. The total height of each bar corresponds to the total number of cars that passed thru the intersection for all three intersections together, by hour.

a. An individual bar represents the total number of cars that passed thru a unique intersection during a specific hour.

In MATLAB a collection of data values (for example, numbers or text values) with both rows and columns (2 dimensional) is called ? a. Array b. Indice c. Scalar d. Vector

a. Array

In MATLAB a function is a group of statements that perform a task. Functions can accept more than one input argument and may return more than one output argument. Below is script syntax using the SUM function. B = sum(A. 1) Which is the variable which holds the resulting sum (addition)? a. B b. 2 c. 1 d. A

a. B

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] To access the individual elements of an array, you give MATLAB indices in parentheses. Suppose you define a new variable C with the below script, C = A( : , 1) What are the elements in C? a. C = [ 10; 11; 5 ] b. C = [10; 15; 6 ] c. C = [10, 15, 6 ] d. C = [ 10, 11, 5 ]

a. C = [10;11;5]

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] What does the equal sign do? a. It is the assignment operator. MATLAB computes a value from the expression on the right and assigns the results to the variable on the left. b. It is the assignment operator. MATLAB computes a value from the expression on the left and assigns the results to the variable on the right. c. It is the assignment operator. MATLAB computes a value from by assigning random values d. It is the assignment operator. MATLAB computes all the values from the load command.

a. It is the assignment operator. MATLAB computes a value from the expression on the right and assigns the results to the variable on the left.

he side-by-side (left) and stacked (right) bar graphs below show the same information. The data is from lesson 1 (count.dat) and tracks vehicles thru 3 specific intersections. The graphs below are a sub set of the overall data and display the data from 9am to 5pm. What hour of the day has the least amount of traffic thru these intersections? When are the busiest hours of traffic? a. Least: 11am Busiest: 9am b. Least: 12pm Busiest: 9am c. Least: 11am Busiest: 5pm d. Least: 2pm Busiest: 5pm

a. Least: 11am Busiest: 9am

The MATLAB subplot function allows you to arrange your graphs within a single figure. It tiles or places your graphs in a mosaic based on the following syntax. subplot(m, n, p) What does n stand for? a. Number of columns in the mosaic b. Number of rows in the mosaic c. Position the specific graph has in the mosaic d. How many tiles total in the mosaic

a. Number of columns in the mosaic

In a MATLAB fprintf function what does the first argument represent? a. The first argument is the format string, which controls the appearance of the output. b. It is a format specifier or rule for outputting an argument. c. It causes the output to start on a new line. d. The function outputs the arguments provided between the parentheses to the command window. It can also be used to output to a file.

a. The first argument is the format string, which controls the appearance of the output.

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = min(exampleArray(:)) a. 0 -1 -4 b. -4 c. 2 2 2 2 2 2 0 -1 -4 d. 4 6 -4

b. -4

For the below MATLAB script, what do the square brackets ( [ ] ) indicate? byMonth = [ measlesByMonth', mumpsByMonth', CPByMonth' ] a. They indicate a new array formed by placing the arrays together into a new variable, 'byMonth' . b. They indicate you add the variables together (sum) and place in the new variable, 'byMonth'. c. It is incorrect syntax and will not work. d. They indicate that you take the text values of each of the variables and place them in a new variable called 'byMonth' .

a. They indicate a new array formed by placing the arrays together into a new variable, 'byMonth'

In MATLAB, the "bar" function acts similar to the "plot" function, however instead of creating a line chart it creates? a. a chart with vertical squares representing the value of the elements in the vector. b. a circular chart with portions of the circle representing percentages of the vector from the whole. c. a line with points for each value in the vector. d. It does not act similar to plot

a. a chart with vertical squares representing the value of the elements in the vector

In MATLAB a single data point is called? a. Vector b. Scalar c. Arrays d. Matrices

b. Scalar

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Which of the below scripts defines the variable bothbeaches that contains the bacterial count colomns of both beaches. a. beach1 = beaches( : , [ 2, 3]); b. beach1 = beaches( : , 2); c. beach1 = beaches( : , 3); d. beach1 = beaches( : , 1);

a. beach1 = beaches( : , [ 2, 3]);

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Which of the below scripts defines the variable beach2 that contains the bacterial count for beach 2. a. beach1 = beaches( : , 3); b. beach1 = beaches( : , 2); c. beach1 = beaches( : , [ 2, 3]); d. beach1 = beaches( : , 1);

a. beach1 = beaches(:, 3);

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Which of the below scripts defines the variable beach1 that contains the bacterial count for beach 1. a. beach1 = beaches( : , 2); b. beach1 = beaches( : , 1); c. beach1 = beaches( : , 3); d. beach1 = beaches( : , [ 2, 3]);

a. beach1 = beaches(:,2);

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Which of the below scripts defines the variable day5 that contains the bacterial count for both beaches on day 5? a. day5 = beaches( 2, [ 2, 3]) b. day5 = beaches( : , [ 2, 3]) c. day5 = beaches( 2, 3) d. day5 = beaches( 2, [ 1, 2])

a. day5 = beaches(2, [2,3])

The first step to take to analyze your data is to gather the mean and median to determine central tendency of your data set. The second step is to.... a. determine your data's measures of spread. b. start making guesses about your data c. start your hypothesis d. create a graph of your mean and median

a. determine your data's measures of spread.

Which of the below statements is false when discussing "gca" in MATLAB? a. gca stands for "graphic continuous axis" b. gca stands for "graphic current axis" c. gca allows you to manipulate how the axis of a graphs displays values d. gca has default "modes" that need to be toggled on/off in order to change variables like labels.

a. gca stands for "graphic continuous axis"

In MATLAB we use several different functions to perform statistical computations. Which MATLAB Function returns the average (adding all the values in the array and dividing by the number of elements). a. mean function b. median function c. max function d. min function

a. mean function

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Given we define the following variables in our MATLAB script beach1 = beaches(:,2); beach2 = beaches(:,3); bothBeaches = beaches(:, [2,3]); beach1Total = sum(beach1); beachesTotal = sum(bothBeaches(:)); Which of the scripts below define a variable that holds the percentage of beach 1's count that occurs on Day 15? a. percentDay15 = 100.*beach1(6)./beach1Total; b. percentDay15 = 100.*beach1(6)./beachesTotal; c. percentDay15 = 100.*beach1(2)./beachesTotal; d. percentDay15 = 100.*beach1(2)./beach1Total;

a. percentDay15 = 100.*beach1(6)./beach1Total;

Relative to the data triangle, information is a. putting context to data b. bottom of the data triangle c. based on scatter plots d. top of the data triangle

a. putting context to data

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] To access the individual elements of an array, you give MATLAB indices in parentheses. Suppose you define a new variable C with the below script, C = A( : , 1) What does the colon mean? a. take everything in that row or column the start end end of the interval of positions the last position in that row or column put the columns end to end to make one column

a. take everything in that row or column

Which of the below scripts creates a variable containing the AAD for our single vector array called 'testarray'? a. testarrayAAD = mad(testarray, 0, 1) b. testarrayAAD = mad(testarray, 2, 1) c. testarrayAAD = aad(testarray, 0, 1) d. testarrayAAD = mad(testarray, 1, 1

a. teestarrayAAD = mad(tesetarray,0,1)

Which of the below measures of spread is the most commonly used? a. unbiased estimator of population b. standard deviation c. MAD d. sample standard deviation AAD

a. unbiased estimator of population standard deviation

In statistics, Median Absolute Deviation (MAD) uses the median as the predictor and measures all the data points in the array against the median to determine how far off each data point is from that median. It then takes the absolute value (removing all negatives) for those values. Finally, it sorts the data values from smallest to largest and finds the median value from that grouping to come up with the MAD. Where x is the array and the deviation is measured by taking the absolute value of x - median of x or |x - med of x| for each data point. To get the MAD you sort all the values and find the median of that group. Given a x = [ -1, -1, 2 , 4 ] (average is 1 and median is .05) Which of the below answers provides the MAD for x? a. 8 b. 1.5 c. 3.5 d. 1

b. 1.5

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] Click on the array that shows A' Selected Answer: [None Given]Correct Answer:Top Left Coordinates(472, 5)Bottom Right Coordinates(970, 291) Instructor selection and student response a. 10 15 6 4 11 4 7 3 5 -1 -3 12 b. 10 15 6 4 c. 10 11 5 15 4 -1 6 7 -3 4 3 12 d. 10 11

b. 10 15 6 4

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = max(exampleArray(:)) a. 11 7 10 b. 11 c. 4 6 10 11 7 6 2 2 2 d. 10 11 0

b. 11

In MATLAB arrays are displayed in the Workspace after they have been initialized in a script (loaded or created). Given the above variables, how many columns does the chickenPox array contain? a. 41 b. 12 c. 697948 d. 1

b. 12

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] Click on the array that shows the results found in array B after you run the below script. B = sum(A, 2) a. 26 18 10 19 b. 35 25 13 c. 73 d. 10 15 6 4 11 4 7 3 5 -1 -3 12

b. 35 25 13

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = mean(exampleArray, 2) a. 4 6 6 b. 6.6667 8.0000 -1.6667 c. 5 4 4 d. 6 7 -1

b. 6.6667 8.0000 -1.6667

In MATLAB a function is a group of statements that perform a task. Functions can accept more than one input argument and may return more than one output argument. Below is script syntax using the SUM function. B = sum(A, 1) Which is the variable which holds the array to be sum? a. B b. A c. 1 d. 2

b. A

What is the definition of a histogram? a. A table with counts of the number of times each unique value appears in the dataset. b. A graphical display of a frequency table, usually using bars to present counts. c. A bar chart that computes the median of all the data set and spreads the counts across bins. d. A graph that displays quartiles with a median in the middle and has whiskers to represent outliers.

b. A graphical display of a frequency table, usually using bars to present counts.

What is the definition of a Frequency Table? a. A graphical display which is based on quartiles. b. A table with counts of the number of times each unique value appears in a dataset. c. A table that totals each data set and computes the median. d. A graphical display usually using bars to represent count.

b. A table with counts of the number of ties each unique value appears in a dataset.

In MATLAB, when working with an array, the application needs information in order to perform calculations. It needs to know which rows or columns to use if you don't want to work with the entire set. MATLAB uses what to tell the system which rows or columns to use? a. Dimensions; Dimension 2 is rows, Dimension 3 is columns b. Dimensions; Dimension 1 is rows, Dimension 2 is columns c. Dimensions; Dimension 0 is rows, Dimension 1 is columns d. Dimensions; Dimension 2 is rows, Dimension 1 is columns

b. Dimensions; Dimension 1 is rows, Dimension 2 is columns

In a MATLAB fprintf function what does the \n represent? a. The first argument isterm-92 the format string, which controls the appearance of the output. b. It causes the output to start on a new line. c. It is a format specifier or rule for outputting an argument. d. The function outputs the arguments provided between the parentheses to the command window. It can also be used to output to a file.

b. It causes the output to start on a new line.

In a MATLAB fprintf function what does the % represent? a. It causes the output to start on a new line. b. It is a format specifier or rule for outputting an argument. c. The function outputs the arguments provided between the parentheses to the command window. It can also be used to output to a file. d. The first argument is the format string, which controls the appearance of the output.

b. It is a format specifier or rule for outputting an argument.

The MATLAB subplot function allows you to arrange your graphs within a single figure. It tiles or places your graphs in a mosaic based on the following syntax. subplot(m, n, p) What does m stand for? a. Number of columns in the mosaic b. Number of rows in the mosaic c. Position the specific graph has in the mosaic d. How many tiles total in the mosaic

b. Number of rows in the mosaic

The MATLAB subplot function allows you to arrange your graphs within a single figure. It tiles or places your graphs in a mosaic based on the following syntax. subplot(m, n, p) What does p stand for? a. Number of columns in the mosaic b. Position the specific graph has in the mosaic c. Number of rows in the mosaic d. How many tiles total in the mosaic

b. Position the specific graph has in the mosaic

In MATLAB a function is a group of statements that perform a task. Functions can accept more than one input argument and may return more than one output argument. Below is script syntax using the SUM function. B = sum(A) If the array A is a single row or column of numbers, what will this script provide? a. The results depends on how many elements are in A. b. The results will be just one number (value). c. The results will be one number in each column or one number for each row d. B will be the same array as A

b. The results will be just one number (value).

Which of the below statements is NOT true about Variables? a. The value of the variable is the data that the variable holds. b. Variables can never be changed once they are set for the first time in the script. c. You can refer to the data by the variable's name. d. It is a way of holding data in a program or script.

b. Variables can never be changed once they are set for the first time in the script.

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Given we define the following variables in our MATLAB script beach1 = beaches(:,2); beach2 = beaches(:,3); bothBeaches = beaches(:, [2,3]); beach1Total = sum(beach1); beachesTotal = sum(bothBeaches(:)); Which of the scripts below define a variable that holds the percentage of total bacteria represented by Beach 1? a. beach1Percent = 100.*beachesTotal./beach1Total; b. beach1Percent = 100.*beach1Total./beachesTotal; c. beach1Percent = 100.*beach1./beachesTotal; d. beach1Percent = 100./beach1Total./beachesTotal;

b. beach1Percent = 100.*beach1Total./beachesTotal;

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Given we define the following variables in our MATLAB script beach1 = beaches(:,2); beach2 = beaches(:,3); bothBeaches = beaches(:, [2,3]); Which of the scripts below define an variable that holds the total bacterial count for beach 1? a. beach1Total = sum(beaches(:); b. beach1Total = sum(beach1); c. beach1Total = sum(beach2) d. beach1Total = sum(beaches)

b. beach1Total = sum(beach1);

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Given we define the following variables in our MATLAB script beach1 = beaches(:,2); beach2 = beaches(:,3); bothBeaches = beaches(:, [2,3]); Which of the scripts below define a variable that holds the overall total bacterial count for both beaches? a. beachesTotal = sum(beach1 + beach2); b. beachesTotal = sum(bothBeaches(:)); c. beachesTotal = total(bothBeaches(:)); d. beachesTotal = sum(beaches(:))

b. beachesTotal = sum(bothBeaches(:));

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Given we define the following variables in our MATLAB script beach1 = beaches(:,2); beach2 = beaches(:,3); bothBeaches = beaches(:, [2,3]); beach1Total = sum(beach1); beachesTotal = sum(bothBeaches(:)); day5Total = sum(bothBeaches(2,:)); Which of the scripts below define a variable that holds the percentage of Day 5's count occurring on Beach 1? a. day5Beach1Percent = 100.*beach1(5)./day5Total; b. day5Beach1Percent = 100.*beach1(2)./day5Total; c. day5Beach1Percent = 100.*day5Total./beach1Total; d. day5Beach1Percent = 100./beach1(2)./day5Total;

b. day5Beach1Percent = 100.*beach1(2)./day5Total;

One tool used when creating a histogram, is the square-root rule. This rule is used to help determine the adequate number of bins for your data. How is it calculated? a. ideal bins = number of data elements x square root of the first element. b. ideal bins = square root of the number of elements in the data set c. ideal bins = square root of the average data elements d. ideal bins = 10

b. ideal bins = square root of the number of elements in the data set

In MATLAB the position in an array or vector are called? a. elements b. indices c. line d. scalar

b. indices

In MATLAB we use several different functions to perform statistical computations. Which MATLAB Function returns the middle value after sorting the values in the array? a. mean function b. median function c. max function d. min function

b. median function

In Nature Data Distributions can take on many forms. Below is one example of a typical distribution. What type of distribution does the above graph display? a. exponential b. normal c. linear d. uniform

b. normal

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] To access the individual elements of an array, you give MATLAB indices in parentheses. Suppose you define a new variable B with the below script B = A(3, 1) The first indice (in this case the value is 3) tells you to take the value from a. array 3 b. row 3 c. element 3 d. column 3

b. row 3

In Nature Data Distributions can take on many forms. Below is one example of a typical distribution. What type of distribution does the above graph display? a. exponential b. uniform c. linear d. normal

b. uniform

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] Click on the array that shows A(:) a. 10 15 6 4 11 4 7 3 5 -1 -3 12 b. 10 15 6 4 c. 10 11 5 15 4 -1 6 7 -3 4 3 12 d. 10 11

c. 10 11 5 15 4 -1 6 7 -3 4 3 12

In MATLAB several functions default to along the first non-singleton dimension, if you do not provide a dimension argument. This means that if the array provided is: a vector of single row of values a vector of a single column of values MATLAB will perform the computation across that single vector (if no dimension argument is provided). However, if your variable is an array with multiple rows or columns, and you do NOT include a dimension argument, MATLAB will default to dimension 1 (transversing the computations down the rows). Given the MATLAB Variable: C = [ 6, 8, 10 ; 12, 4, 11] Which answer below provides the value of E if: E = max(C, [ ] , 2). a. [12, 11, 8] b. 8 c. 10 12 d. 6

c. 10 12

In statistics, Average Absolute Deviation (AAD) uses the mean as the predictor and measures all the data points in the array against the mean to determine how far off each data point is from that mean. It then takes the absolute value (removing all negatives) for those values. Finally, it then calculates the average of all those error values to come up with AAD. Where x is the array and the deviation is measured by taking the absolute value of x - average of x or |x - avg of x| for each data point. To get the AAD you divide the total of all the errors by the number of elements. Given a x = [ -1, -1, 2 , 4 ] (average is 1 and median is .05) Which of the below answers provides the AAD for x? a. 1 b. 4 c. 2 d. 8

c. 2

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = min(exampleArray, 2) a. 0 -1 -4 b. -4 c. 2 2 2 2 2 2 0 -1 -4 d. 4 6 -4

c. 2 2 2 2 2 2 0 -1 -4

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = max(exampleArray, 2)) a. 11 7 10 b. 11 c. 4 6 10 11 7 2 2 2 d. 10 11 0

c. 4 6 10 11 7 2 2 2

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = mean(exampleArray) a. 4 6 6 b. 6.6667 8.0000 -1.6667 c. 5 4 4 d. 6 7 -1

c. 5 4 4

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] Click on the array that shows the results found in array B after you run the below script. B = sum(A(:)) a. 26 18 10 19 b. 35 25 13 c. 73 d. 10 15 6 4 11 4 7 3 5 -1 -3 12

c. 73

Given the above Histogram, approximately how many birds had beak sizes of 11 mm? a. 125 b. 75 c. 100 d. 240

c. 75

The side-by-side (left) and stacked (right) bar graphs below show the same information. The data is from lesson 1 (count.dat) and tracks vehicles thru 3 specific intersections. The graphs below are a sub set of the overall data and display the data from 9am to 5pm. a. 70 b. 50 c. 80 d. 50

c. 80

What is Linear Representation (:) and how does it work in MATLAB? a. MATLAB forms the linear representation by placing rows of an array, end to end to make a single horizontal row. b. MATLAB forms the linear representation by placing rows of an array, end to end to make a single vertical column. c. MATLAB forms the linear representation by placing the columns of an array, end to end to make a single vertical column. d. Linear Representation is how MATLAB creates output lines. The fprintf command is an example of a linear command.

c. MATLAB forms the linear representation by placing the columns of an array, end to end to make a single vertical column.

What does the transpose operation ( ' ) do? a. The operation turns text into numbers and numbers into text. b. The operation provides the highest numeric value in the specified column or row based on arguments provided in the script. c. The operation flips an array on its main diagonal, making rows into columns and columns into rows. d. The operation places the columns of an array, end to end, to make a single vertical column.

c. The operation flips an array on its main diagonal, making rows into columns and columns into rows.

The side-by-side (left) and stacked (right) bar graphs below show the same information. The data is from lesson 1 (count.dat) and tracks vehicles thru 3 specific intersections. The graphs below are a sub set of the overall data and display the data from 9am to 5pm. For the stacked graph, what does each bar in the graph represent? a. An individual bar represents the total number cases for a particular disease in a particular month. b. Each unique color represents the total for a specific intersection. c. The total height of each bar corresponds to the total number of cars that passed thru all the intersections together, by hour. d. An individual bar represents the total number of cars that passed thru a unique intersection during a specific hour.

c. The total height of each bar corresponds to the total number of cars that passed thru all the intersections together, by hour.

In MATLAB, we use functions to perform specific activities. For example 'sum' is a function that performs addition. What are the "arguments" of a function? a. They are the resulting values passed to the function so that it can perform its computation. These values appear in parentheses after the function name. b. They are the inputing values passed to script once the function has processed its computation. These values appear in the workspace. c. They are the input values passed to the function so that it can perform its computation. These values appear in parentheses after the function name. d. They are the resulting values passed to script once the function has processed its computation. These values appear in the workspace.

c. They are the input values passed to the function so that it can perform its computation. These values appear in parentheses after the function name.

When would you use a "stacked bar" chart? a. When your data is very different and the groups are not aligned. b. When you want to show a percentage that each element in a vector or matrix contributes to the sum of all elements. c. When you want to show a better estimate and comparison of the overall totals of the group. You can comprehend a larger number of groups with this type of chart. d. When you don't have any other option.

c. When you want to show a better estimate and comparison of the overall totals of the group. You can comprehend a larger number of groups with this type of chart.

In MATLAB several functions default to along the first non-singleton dimension, if you do not provide a dimension argument. This means that if the array provided is: a vector of single row of values a vector of a single column of values MATLAB will perform the computation across that single vector (if no dimension argument is provided). However, if your variable is an array with multiple rows or columns, and you do NOT include a dimension argument, MATLAB will default to dimension 1 (transversing the computations down the rows). Given the MATLAB Variable: C = [ 6, 8, 10 ; 12, 4, 11] Which answer below provides the value of E if: E = max(C). a. 8 b. 6 c. [12, 8, 11] d. 10 12

c. [12, 8, 11]

In statistics the sample Standard Deviation (where you divide by the number of data elements in the sample) is not a good example of a sample predicting the overall characteristics of a population because it provides to much emphasis (bias) on the lower data values in the sample set. A small correction factor can improve this estimate. Dividing the n-1 (one element less than the original number of data elements) instead when taking the average. This is called the unbiased estimator of the population variance. The Standard Deviation (unbiased estimator of the population - pop est) is just the square root of the unbiased estimator of the population variance. In MATLAB we use the std function with an additional argument in the second position to indicate if we are calculating the standard deviation with the unbiased estimator or if we are using actual standard deviation (sometimes called sample SD). Which of the below MATLAB scripts, indicates using the unbiased estimator for standard deviation? a. b = unbiasedstd(A, 0, dim) b. b = std(a, dim, 0) c. b = std( A, 0, dim) d. b = std(A, 1, dim)

c. b = std( A, 0, dim)

In Nature Data Distributions can take on many forms. Below is one example of a typical distribution. What type of distribution does the above graph display? a. normal b. uniform c. exponential d. linear

c. exponential

In MATLAB we use several different functions to perform statistical computations. Which MATLAB Function returns the largest value in the array (depending on the number of rows/columns and which dimension is provided)? a. mean function b.median function c. max function d. min function

c. max function

In MATLAB a collection of data (say numbers or text values) in a single column or row is called a? a. arrays b. matrices c. vector d. scalar

c. vector

In statistics, average error uses the mean as the predictor and measures all the data points in the array against the mean to determine how far off each data point is from that mean. It then calculates the average of all those error values to come up with average error. Where x is the array and the deviation is measured by taking " x - avg of x " for each data point. To get the average error you divide the total of all the errors by the number of elements. Given a x = [ -1, -1, 2 , 4 ] (average is 1 and median is .05) Which of the below answers provides the average error for x? a.3 b. 1 c. -1 d. 0

d. 0

In MATLAB several functions default to along the first non-singleton dimension, if you do not provide a dimension argument. This means that if the array provided is: a vector of single row of values a vector of a single column of values MATLAB will perform the computation across that single vector (if no dimension argument is provided). However, if your variable is an array with multiple rows or columns, and you do NOT include a dimension argument, MATLAB will default to dimension 1 (transversing the computations down the rows). Given the MATLAB Variable: C = [ 6, 8, 10 ] Which answer below provides the value of E if: E = max(C). a. 6 b. 8 c. [6, 8, 10] d. 10

d. 10

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = max(exampleArray, [ ], 2)) a. 11 7 10 b. 11 c. 4 6 10 11 7 6 2 2 2 d. 10 11 0

d. 10 11 0

What is the formula for calculating percentages? a. total population *100 * portion of population b. 100 * (total of population / portion of population) c. total population / portion of population d. 100 * (portion of population / total of population)

d. 100 * (portion of population / total of population)

In statistics, another common measure of spread is Standard Deviation which uses the squares of the errors instead of absolute values of errors. First, you determine the error by taking each data element, one by one and subtracting the mean. Next you square each of those values individually. Variance (of the sample) is the average squared error (usually called the mean squared error or MSE) of data from the mean. Average the squared errors (add all the squares and divide by the number of elements) to get the Variance. Because we squared the data, it is not in the correct units, so you need to take the square root of the Variance to get Standard Deviation. Standard Deviation (of the sample) is the square root of the average squared error of data (Variance) from the mean (sometimes called RMS error). Given a x = [ -1, -1, 2 , 4 ] (average is 1 and median is .05) Which of the below answers provides the Standard Deviation for x? a. 4.5 b. 2 c. 1 d. 2.1213

d. 2.1213

Suppose a MATLAB variable A is defined by: A = [ 5, 6, 9; 5, 2, 11 ] Given below MATLAB script. c = sum(A,2); What are the value(s) in the array c? a. 10 8 20 b. 0 c. 38 d. 20 18

d. 20 18

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = min(exampleArray, [ ], 2) a. 0 -1 -4 b. -4 c. 2 2 2 2 2 2 0 -1 -4 d. 4 6 -4

d. 4 6 -4

In MATLAB arrays are displayed in the Workspace after they have been initialized in a script (loaded or created). Given the above variables, how many rows does the chickenPox array contain? a. 1 b. 697948 c. 12 d. 41

d. 41

In MATLAB you can put arrays together to create new variables using coma and semicolons. Suppose you have two arrays: a = [ 10; 14; 6 ] and b = [ 1; 3; 6 ] Given you create a new variable called ab; ab = [ a ; b] How would the elements of the results be displayed? a. 10, 14, 6 b. 1, 3, 6 c. 10, 14, 6, 1, 3, d. 6

d. 6

Suppose the MATLAB variable exampleArray is defined by: exampleteArray = [ 4, 6, 10; 11, 7, 6; 0, -1, -4]; Click on the array that shows the results of the MATLAB command: x = median(exampleArray, 2) a. 4 6 6 b. 6.6667 8.0000 -1.6667 c. 5 4 4 d. 6 7 -1

d. 6 7 -1

What are the four layers of the Data Analysis Triangle, from bottom to top? a. Numbers, Text, Data, Information b. Information, Data, Knowledge, Wisdom c. Wisdom, Information, Knowledge, Data d. Data, Information, Knowledge, Wisdom

d. Data, Information, Knowledge, Wisdom

Which MATLAB graph uses buckets (bins) to group items for display? a. Pie Charts b. Box charts c. Bar charts d. Histograms

d. Histograms

Referencing the Data Triangle, data is: a. Putting context to data b. The top of the Data triangle c. Consolidating information d. Individual values with no context

d. Individual values with no context

Which two of the MATLAB measures of spread are LEAST sensitive to outliers? a. IQR and actual or sample SD b. MAD and unbiased estimator of the population SD c. actual or Sample SD and unbiased estimator of the population SD d. MAD and IQR

d. MAD and IQR

The side-by-side (left) and stacked (right) bar graphs below show the same information. The data is from lesson 1 (count.dat) and tracks vehicles thru 3 specific intersections. The graphs below are a sub set of the overall data and display the data from 9am to 5pm. Which intersection had the most traffic between 9am and 5pm overall? Which intersection had the least amount of vehicles thru the intersection overall? a. Most: IH10 Least: Durango b. Most: Durango Least: IH10 c. Most: Durango Least: LP410 d. Most: LP410 Least: Durange

d. Most: LP410 Least: Durange

What does the fprintf function do? a. It causes the output to start on a new line. b. The first argument is the format string, which controls the appearance of the output. c. It is a format specifier or rule for outputting an argument. d. The function outputs the arguments provided between the parentheses to the command window. It can also be used to output to a file.

d. Thee function outputs thee arguments provided between the parentheses tot her command window. It can also be used to output to a file.

Mean and Median both provide measures of "central tendency". A measure of central tendency is a single value that describes the way in which a group of data cluster around a central value. To put in other words, it is a way to describe the center of a data set. Why is it important to get the mean and median of your data set? a. You don't, mean can provide you all the information you need. b. When the mean and median are far apart in value, you can surmise that there are very large numbers in your data set. c. When the mean and median are far apart in value, you can surmise that there are no outliers in the data. d. When the mean and median are far apart in value, you can surmise that there must be some outliers in the data.

d. When the mean and median are far apart in value, you can surmise that there must be some outliers in the data.

The following table gives the counts of bacteria at two different beaches. The shaded portion of the table corresponds to the MATLAB variable called beaches. Given we define the following variables in our MATLAB script beach1 = beaches(:,2); beach2 = beaches(:,3); bothBeaches = beaches(:, [2,3]); Which of the scripts below define a variable that holds the total bacterial count for day 5? a .day5Total = sum(bothBeaches(5,:)); b. day5Total = sum(bothBeaches(:,2)): c. day5Total = sum(beaches(2,:)); d. day5Total = sum(bothBeaches(2,:))

d. day5Total = sum(bothBeaches(2,:))

In MATLAB functions max and min, the second argument does NOT correspond to the dimension. When the second argument isn't empty ( [ ] ) , the function does an element by element comparison between the corresponding first and second arguments. Given the MATLAB variable: C = [ 6, 10, 8; 11, 13, 4] Which of the answers below both give the same results? a. max(C) max([], C, 1) b. max(C) max(c, [], 2) c. max(C) max(c, [], 2) d. max(C) max(c, [], 1)

d. max(C) max(c, [], 1)

Measures of spread describe how similar or varied the set of observed values are for a particular variable (data item). (How clustered around their mean/median are the data points) In MATLAB we use several different functions to determine measures of spread. Which of the below options is NOT a function used to measure the spread of our data. a. prctile function b. std function c. mad function d. mean function

d. mean function

In MATLAB arrays are displayed in the workspace after they have been initialized in a script(loaded or created). Given the above variables, which array is a single vector with 1 row and with 12 columns? a. measlesByYear b. measlesTotal c. measles d. measlesByMonth

d. measlesByMonth

In MATLAB we use several different functions to perform statistical computations. Which MATLAB Function returns the smallest value in the array (depending on the number of rows/columns and which dimension is provided)? a. mean function b. median function c. max function d. min function

d. min function

What type of chart is best for showing percentages that each element in a vector or matrix contributes to the sum of all elements? Best for showing percentages of a whole? a. line chart b. error chart c. bar chart d. pie chart

d. pie chart

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] In this script, the coma (,) tells MATLAB to a. start a new row b. the start and end of the interval c. take everything in that row or column d. separate items within the row

d. separate items within the row

Suppose a MATLAB variable A is defined by: A = [ 10, 15, 6, 4; 11, 4, 7, 3; 5, -1, -3, 12 ] In this script, the semicolon (;) tells MATLAB to a. separate items within the row b. take everything in that row or column c. the start and end of the interval d. start a new row

d. start a new row

In statistics the interquartile range (IQR) starts with sorting all the values in your sample from smallest to largest. It identifies markers in the data set that indicate specific points in the data set. The first is the 25th percentile at which point, 1/4 of data values are smaller than this point. The 75th percentile is such that 3/4 of the data values are smaller than this point. The IQR is the 75th percentile minus ( - ) the 25th percentile. In MATLAB, the iqr function ( a = iqr(x, dim) ) provides a single number that represents the 75th percentile minus the 25 percentile. We also use the prctile function to generate the values for both the 75 percentile point and the 25 percentile point -- a = prctile(x, [25, 75], dim) . This function gives us the two end points of the IQR range. Which of the below MATLAB scripts, generates two numbers that represent the 25th and 75th percentile or our array testarray ? a. testarrayIQR = iqr(testarray, [25, 75], 1) b. testarrayIQR = prctile(testarray, 1) c. testarrayIQR = prctile([25, 75], testarray, 1) d. testarrayIQR = prctile(testarray, [25, 75], 1)

d. testarrayIQR = prctile(testarray, [25, 75], 1)

Which of the below scripts creates a variable containing the MAD for our single vector array called 'testarray'? a. testarrayMAD = mad(testarray, 0, 1) b. testarrayMAD = mad(testarray, 2, 1) c. testarrayMAD = aad(testarray, 0, 1) d. testarrayMAD = mad(testarray, 1, 1)

d. testarrayMAD = mad(testarray, 1, 1)


Set pelajaran terkait

Chapter 55 Clients W/Male Reproductive Disorders

View Set

Marketing Sample Questions Exam 1

View Set

Guaranteed Exam Wrong Questions Part 1

View Set