8 Drill Questions: Customizing Functions

At any point, you can submit your answers by collecting them and uploading them to the class site.

No answers yet collected

Link to upload site

If requested by your instructor, please identify here the people from whom you received assistance on this assignment.

If the answers that have been loaded automatically are not yours, press this button before starting your work:

Drill 8. 1 The R chunk contains a computer expression to create and plot a linear combination of two functions osc(x) and steady(x), each multiplied by a numerical coefficient. Use this as a template to re-create the requested plots. Keep in mind that you need to replace osc() and steady() with storybook functions appropriate for the task.

When you have successfully reconstructed the function displayed, cut-and-paste the line newf <- ...


NoteFunctions to reconstruct

Reconstruct the function graphed below as a linear combination of two storybook functions.

  1. One of the functions is hillside().
  2. The half-way up level for the other function is at 0 to the left and -2 to the right.

1 * osc - 2 * hillside(x)

Reconstruct the function graphed below as a linear combination of two storybook functions.

One of the functions is hillside().

0.5 * hillside(x) + 3 * hill(x)

Reconstruct the function graphed below as a linear combination of two storybook functions.

Obviously, one of the function is osc(). But on its own, the output of osc() is bounded by -1 and 1.

4 * flat(x) + 3 * osc(x)

Reconstruct the function graphed below as a linear combination of two storybook functions.

On the left side, the output is more or less a straight line, but sloping downward. steady() is our straight-line storybook function, but ordinarily it slopes upward.

1 * double(x) - 3 * steady(x)

Drill 8. 2 This set of problems involves a linear combination of two storybook functions, but there is an added twist: One or both of the functions has been input scaled to move it to the right or the left.

When you have successfully reconstructed the function displayed, cut-and-paste the line newf <- ...


NoteFunctions to reconstruct

Reconstruct the function graphed below as a linear combination of two storybook functions.

One of the functions is hillside().

hillside(x + 2) + 0.1 * steady(x)

Reconstruct the function graphed below as a linear combination of two storybook functions.

Both of the functions are hillside().

hillside(x + 3) + 2 * hillside(x - 3)

Reconstruct the function graphed below as a linear combination of two storybook functions.

One goes down, one goes up.

hill(x + 2) - 2 * hill(x - 1)

The instructors fed an AI the chapter text and asked for some simple questions based on the text. We made some small modifications to fit into the multiple-choice format. Many of the AI-generated questions ask small algebra questions. Algebra is not an important topic of this course, but the AI is presumably drawing from problems that appear in conventional textbooks. The feedback for wrong answers was written by the instructors.

Drill 8. 3 The text compares a linear combination of functions to a chocolate-chip cookie recipe. In this analogy, what corresponds to the “ingredients” and what corresponds to the “amount” of each ingredient?

hhr-1-hsld

The individual functions are the ingredients and the coefficients say in what order to mix them.

The individual functions are the ingredients and the coefficients specify what amount of each ingredient.

Each chocolate chip is a coefficient. The dough is what holds everything together.

The functions tell you the amounts while to coefficients refer to the names of the functions.

Drill 8. 4 Which of the following definitions creates a linear combination of the functions \(f(x)\) and \(g(x)\)?

lfc-1-kdw

\(h(x) \equiv f(x) \times g(x)\)

\(h(x) \equiv f(g(x))\)

\(h(x) \equiv a \cdot f(x) + b \cdot g(x)\)

\(h(x) \equiv \frac{f(x)}{g(x)}\)

Drill 8. 5 We use the notation steady() and flat() to emphasize that these are functions. The conventional algebraic notation is much simpler: \(x\) and \(1\) respectively, but it’s easy to forget that \(1\) can be a function. Suppose you create a linear combination of steady(x) and flat() with coefficients \(a\) and \(b\) respectively. What is the overall algebraic form of the resulting function?

csp-1-kse

\(x + 1\)

\(mx + b\)

\(ax + b\)

\(a + b\)

Drill 8. 6 “Pipelining” refers to feeding the output of one function into the input of another. If \(g(x)\) is the interior function and \(f(x)\) is the exterior function, how is this written in algebraic notation?

ocw-1-8ef

\(fg(x)\)

\(g(f(x))\)

\(f(x) + g(x)\)

\(f(g(x))\)

Drill 8. 7 Consider two different forms

  1. \(f(g(x))\)
  2. \(f(x)g(x)\)

Which words most appropriately describe the distinction between the two forms?

dgo-1-kcsl

multiplication & pipelining, repectively.

interior combination vs exterior combination, respectively.

pipelining & multiplication, respectively.

linear combination and pipelining, respectively.

Drill 8. 8 The text gives a specific name to the multiplication of two steady functions with different inputs, i.e., \(\text{steady}(x) \times \text{steady}(z)\). What is this term called in statistics?

bbf-1-9dls
independency       interaction       duplication       unsteady