text:
# Plus One Chemistry Chapter Wise Questions and Answers Chapter 12 Organic Chemistry: Some Basic Principles and Techniques

Students can Download Chapter 12 Organic Chemistry: Some Basic Principles and Techniques Questions and Answers, Plus One Chemistry Chapter Wise Questions and Answers helps you to revise the complete Kerala State Syllabus and score more marks in your examinations.

## Kerala Plus One Chemistry Chapter Wise Questions and Answers Chapter 12 Organic Chemistry: Some Basic Principles and Techniques

### Plus One Chemistry Organic Chemistry: Some Basic Principles and Techniques One Mark Questions and Answers

Question 1.
Which of the following does not contain fused benzene ring?
a) Naphthalene
b) Anthracene
c) Diphenyl
d) Phenanthrene
Answer:
c) Diphenyl

Question 2.
Hemolytic fission of a covalent bond results in the formation of ___________ .
CH2=CH – C ≡ CH2OH
Answer:
Free radicals

Question 3.
The IUPAC name of is
a) 2-pentyl-4-en-1-ol
b) 4-penten-2-yn-1-ol
c) 1-pentene-3-yn-5-ol
d) 5-Hydroxy-1-pentene-3-yne
Answer:
b) 4-penten-2-yn-1-ol

Question 4.
Lassigne’s solution on treating with sodium nitro prusside solution gives a violet colour indication the presence of ___________ in the organic compound.
Answer:
sulphur

Question 5.
In Kjeldahl’s method, nitrogen present is estimated as ___________ .
Answer:
NH3

Question 6.
In the Lassaigne’s test for nitrogen in an organic compound, the Prussian blue colour is obtained due to the formation of:
a) Na4[Fe(CN)6]
b) Fe4[Fe(CN)6]3
c) Fe2[Fe(CN)6]
d) Fe3[Fe(CN)6]4
Answer:
The Prussian blue colour i§ due to the formation Fe4[Fe(CN)6]2. Thus, option (b) is correct,

Question 7.
Which of the following carbocation is most stable?

Answer:
The order of stability of carbocation is : 3º>2º>1º

Thus, option (b) is correct.

Question 8.
The best and latest technique for isolation, purification and separation of organic compounds is:
a) Crystallisation
b) Distillation
c) Sublimation
d) Chromatography
Answer:
Chromatography. Thus, option (d) is correct.

Question 9.
The following reaction is classified as:
CH2CH2l + KOH (aq) → CH3CH2OH + Kl
a) Electrophilic Substitution
b) Nucleophilic substitution
c) Elimination
d) Addition.
Answer:
This is an example of nucleophilic substitution reaction since the nucleophile l – is replaced by the nucleophile OH ion. Thus, option (b) is correct.

Question 10.
Which of the carbocation is more stable?

Answer:

Question 11.
Absolute alcohol cannot be obtained by fractional distillation because
Answer:
constant boiling azeotrope mixture is formed with water

Question 12.
Lassaigne’s test fails in
a) NH2NH2
b) H2NCONH2
c) C6H2NHNH2
d) NH2OH
Answer:
a) Hydrazine NH2NH2

Question 13.
Beilstein test is for the detection of __________ .
Answer:
Halogens

Question 14.
Glycerine can be purified by __________ .
Answer:
Distillation under reduced pressure.

### Plus One Chemistry Organic Chemistry: Some Basic Principles and Techniques Two Mark Questions and Answers

Question 1.
2-Butene exhibits geometrical isomerism.
1. Represent the cis-trans isomers of 2-Butene.
2. Explain ozonolysis with a suitable example.
Answer:
1.

2. When an alkene is allow to react with ozone, an ozonide is obtained. This on hydrolysis gives aldehyde/ ketone. The whole process is called ozonolysis. Eg:

Question 2.
Draw the structures of the molecules represented by the IUPAC names, Pent-3-en-1-ol and 2- Nitrocyclohexene.
Answer:
a) CH3 – CH = CH – CH2 – CH2 – OH

Question 3.
Addition of HBr to propene yields 2-bromopropane, what happens if benzoyl peroxide is added to the above reaction.
Answer:
When propene is allowed to react with HBr in the presence of peroxide, 2 bromo propane is obtained as the minor product and this is called peroxide effect.

Question 4.
Write the IUPAC name of

Answer:
i) 2-Pentanone
ii) 3-Methyl-1-pentanal

Question 5.
Write any two necessary condition for a compound to be aromatic. Convert Acetylene to benzene.
Answer:
Cyclic, Planar and should contain (4n+2) n electrons.

Question 6.
What are hybridisation states of each carbon atom in the following compounds?
CH2 = C = O, CH3CH = CH2,(CH3)2CO,
CH2 = CHCN, C6H6
Answer:
The hybridisation of each carbon is written as superscript on the carbon atom in the molecule.

Question 7.
Which is expected to be more stable, O2 NCH2CH2O or
Answer:

has -l- effect and hence it tends to disperse the -ve charge on the O-atom. In contrast, CH3CH2 exerts + l – effect. It, therefore, tends to intensity the -ve change and hence destabilizes it.

### Plus One Chemistry Organic Chemistry: Some Basic Principles and Techniques Three Mark Questions and Answers

Question 1.
a) Write the structure of the following compounds.
i) Hexane-2, 4-dione
ii) 3-Bromo-4 methyl hexane-2-ol
iii) 2-Bromo-4-methyl hept-5-enal
Answer:
a) i) Hexane 2, 4-dione

Question 2.
Isomers are compounds with same formula and different properties.
a) Write all the possible structural isomers of C5H12.
b) Give the IUPAC name of above isomers.
Answer:

b) 1) Pentane
2) 2-Methyl butane
3) 2,2-Dimethyl propane

Question 3.
a) Give the IUPAC names of:

b) How is nitrogen detected by Lassaignes test?
c) Name a suitable technique for separation of the components from a mixture of benzene (b.p.353 K) and aniline (b.p.-457 K)
Answer:
a) (i) 2-Chloro 3-methyl hexane
(ii) 2-Methylbutanal

b) About 2 mL of the extract is boiled with about 1 mL of freshly prepared ferrous sulphate solution. One or two drops of con.H2SO4 are added to the solution. Presence of nitrogen is indicated by the appearance of a blue colouration.

c) Distillation

Question 4.
i) Draw the structure of propanone. Write the hybridisation of each carbon in propanone.
ii) Arrange the following carbocations in the increasing order of their stability. Justify.
CH3+, CH3CH2+, (CH3)2CH+
iii) What is the method used to separate a mixture of o-Nitrophenol from p-Nitrophenol? Which property is utilized for separation?
Answer:

Ist carbon of Propanone is sp³ hybridisation.
IInd carbon of Propanone is sp² hybridisation.
IIIrd carbon of Propanone is sp³ hybridisation.

iii) Chromatography; Difference in absorption rate of different substances..

Question 5.
1. Give the IUPAC name of the following compound.

2. How can you detect the presence of nitrogen in an organic compound?
3. Arrange the following in the increasing order of stability.
(CH3)2CH+, CH3-CH2+, (CH3)3C+
Answer:
1. 2-chloro, 2-methyl propane

2. Presence of nitrogen can be detected by Lassigne’s test. The sodium fusion extract is boiled with FeSO4 and then acidified with con.H2SO4. The formation of Prussian blue colour conforms the presence of nitrogen.
3.

Question 6.
Predict the product in the following reactions and identify the rules:

Answer:
a) When propene is allowed to react with HBr in the presence of peroxide, 2-Bromo propane is obtained as the minor product. (Peroxide effect, Kharasch effect or Anti MarkownikofFs rule of addition).

Question 7.
a) Draw the structures of the following compounds.
i) 3-hexenoic acid
ii) 2-chloro-2-methyl butanol
iii) 4-nitro-1-pent-l-yne
Answer:

Question 8.
Write the IUPAC names of the following:

Answer:
i) 2,2,4-Trimethyl pentane
ii) 2-Methyl 1-butene
iii) Propyl benzene

Question 9.
Draw the structure of the following molecules.
i) 3, 4-Dimethylhept-3-ene
ii) Neo-pentane
iii) 3-Nitrocyclohexene
Answer:

Question 10.
What is the relationship between the members of following pairs of structures? Are they structural or geometrical isomers or resonance contributors?

Answer:
a) Structural isomers (actually position isomers as well as metamers)
b) geometrical isomers,
c) resonance contributors because they differ in the position of electrons but not atoms:

Question 11.
Expain the reason for the fusion of an organic compound with metallic sodium for testing nitrogen, sulphur and phosphorus.
Answer:
The organic compound is fused with sodium metal to convert these elements (which are present in the covalent form) to ionic form. For example, Sulphur is changed to Na2S, nitrogen to NaCN and phosphorus to Na3PO4 The presence of sulphide ions, cyanide ions and phosphate ions can thus be confirmed by using suitable reagents.

### Plus One Chemistry Organic Chemistry: Some Basic Principles and Techniques Four Mark Questions and Answers

Question 1.
1) Write the structural formula of
a) 4-Ethyl-1-fluoro-2-nitrobenzene
b) 2,3,6-Trimethyl octane.
c) 1,2-Dibromo benzene.
2) Categorize the following as nucleophile and electrophile
a) HS
b) BF3
c) NO2+
d) C2H5O
e) (CH3)3N
f)NH2
Answer:

Question 2.
1. What is chromatography? Name the different types of chromatography.
2. What is Lassaigne’s test?
Answer:
1. Chromatography is a valuable method for the separations, purification and identification of the constituents of a mixture. Chromatography is classified into 2 types.
a) Adsorption chromatography
b) Partition chromatography

2. Lassigne’s test is used to determine the presence of nitrogen, halogens and sulphur present in the organic compound.

Question 3.
1. Write IUPAC names of the products obtained by addition of HBr to Hex-1-ene.
i) in the absence of peroxide
ii) in the presence of peroxide
2. Complete the following reaction:

Answer:
1.

2. 2HCHO + H2O2

Question 4.
1. What is metamerism? Give example for metamers.
2. What are free radicals? How are they formed?
Answer:
1. It is the isomerism which arises due to different alkyl chains on either side of the functional group in the molecule.
e.g. Methoxypropane(CH3OC3H7) and ethoxyethane (C2H5OC2H5) are metamers.

2. Free radicals are highly reactive species containing unpaired electrons. They are formed by homolytic cleavage of covalent bond. e.g. $$\dot { C }$$H3

Question 5.
1. How will you prepare butane?
2. Explain Markownikoff’s rule for the addition reaction using a suitable example.
Answer:
1. When an alkyl halide (ethyl chloride) is allowed to react with metalic sodium in presence of dry ether,

2. Markownikoff’s rule of addition:
When a hydrogen hallide is added to an unsymmetrical alkane the halogen atom will goes to the double bond carbon containing lesser number of hydrogen atom, eg:

Question 6.
Identify the isomerism exhibited by the following compounds.

1. CH3CH2CH2OH and (CH3)2CHOH
2. CH3CH2CHO and CH3COCH3
3. CH3CH22CH2CH3andCH3OCH2CH2CH3
4. CH3(CH2)3 CH3 and (CH3)4C

Answer:

1. Position isomerism
2. Functional group isomerism
3. Metamerism
4. Chain isomerism

Question 7.
i) Predict the products of

ii) Classify the following compounds into aromatic and non-aromatic.

(iii) Which of the following compounds will show geometrical isomerism?
a) CH3 CH=CHCH3
b) (CH3)23 C=CH2
Answer:

Question 8.
Write the IUPAC name

b) Write the structure of the following.
i) 2-Chloro-2-methyl butanol
ii) 4-Nitro-1-pentene
Answer:
a) i) 4-Methyl pentanal
ii) Cyclohexanol

Question 9.
a) Write IUPAC names of the products obtained by addition reactions of HBrto hex-1-ene:
i) In the absence of peroxide.
ii) In the presence of peroxide.
b) How will you convert:
i) Benzene to toluene.
ii) Benzene to nitrobenzene
Answer:

Question 10
a) Explain the term
(i) Inductive effect
(ii) Nucleophile
b) Write the structural formula of the following.
i) 2,5,6-Trimethyloctane
ii) 2,4-Dimethylpentane
c) Suggest the suitable technique for separation of organic compounds given in the data.
i) Aniline-water mixture
ii) Glycerol from spent-lye
Answer:
a) Inductive effect:
If more electronegative atom X linked to a carbon atom then the bonded electron pair will be shifted more towards X. So X acquires a small negative charge and carbon get a small charge. So this carbon atom attracts the a bonded electron pair towards its from nearest carbon atom. Therefore the change is transferred from one carbon to other.

Nucleophile :
Nucleus loving species negatively charge species like $$\overline { OH }$$, $$\overline { X }$$ etc. are called nucleophiles.
b) 2,5,6-Trimethyloctane

c) i) Fractional distillation.
ii) Distillation under reduced pressure.

Question 11.
Compounds having the same molecular formula exhibit different properties is called isomerism. Explain different types of isomerism with examples.
Answer:
Chain isomerism: Consider the molecular formula C5H12 the following 3 isomers are possible for this compound.
They are

Position isomerism:
This isomerism arises as a result of the difference in the position of double bond triple bond and functional group.
The following chain isomers are possible for the molecular formula C4H8.
CH2 = CH – CH2 – CH3 1-butene
CH3 – CH = CH – CH3 2-butene

Metamerism:
This isomerism arises as a result of the difference in the alkyl group present on either side of the functional group.
Consider the molecular formula C4H10O. The following two metamers are possible for this molecular formula.
CH3 – O – CH2 -CH2 -CH3 Methyl propyl ether
CH3 – CH2 – O – CH2 – CH3 Diethyl ether

Functional group isomerism:
Consider the molecular formula C2H6O the following two functional isomers are possible for this compound.
1) CH3-CH2-OH Ethanol
2) CH3 – O – CH3 Di methyl ether

Question 12.
Why is nitric acid added to sodium extract before adding silver nitrate for testing halogens?
Answer:
Sodium extract is boiled with nitric acid to decompose NaCN and Na2S, if present,

If the sodium extract is not boiled with nitric acid then NaCN and Na2S formed will react with AgN03 and hence will interfere with the test as shown below:


text:
## Archive for the ‘Rants’ Category

$log_a(x) = ({{ln x}\over{ln a}}) = {1\over{x ln a}}$ by quotiant rule
EXHIBIT A

but this is *senior level* stuff…
“analysis” *not* freshman-calc.
and even *there*, one seldom encounters
such an *explicit* version of the
natural-log-equals-reciprocal fallacy
$ln(x) = {1\over x}$.
(the “quotiEnt rule”…
or rather, *the* quotient rule…
our subject has fallen into the
“leaving out articles makes it
harder to understand and so is
in my best interest” trap…
has *no bearing* on this [mis]-
calculation [we aren’t diff-
erentiating a fraction (or any-
thing else for that matter)].)

math is hard and everybody knows it.
what they *don’t* know is that it’s
nonetheless easier than anything else.
*particularly* when one is trying
to do things like “pass math tests”.

there’s always a widespread (and *very*
classes that trying to understand
what the technical terms mean (for
example) is “confusing” and should
be dodged at every opportunity.

we teachers go on (as we must)
pretending that when we say things like
“an equation” or “the *product* law”
we believe that our auditors
are thinking of things like
“a string of symbols
representing the assertion
that a thing-on-the-left
has the same meaning as
a thing-on-the-right”
or “the rule (in its context)

but if we ever look at the documents
produced by these auditors in attempting
to carry out the calculations we only
wish we could still believe we have been
*explaining* for all these weeks?
we soon learn that they have been thinking
nothing of the kind.

anyhow. the example at hand.
calculus class is encountered by *most* of its students
as “practicing a bunch of calculating tricks”.

the “big ideas”… algebra-and-geometry, sets,
functions, sequences, limits, and so on…
are imagined as *never to be understood*.
math teachers will perversely insist on
*talking* in this language when demonstrating
the tricks.

well, the “big ideas” that *characterize*
freshman calc are “differentiation” and
“integration”. for example “differentiation”
transforms the expression “x^n” into the
expression “n*x^(n-1)” (we are suppressing
certain details more or less of course).
this “power law” is the one thing you can
count on a former calculus student to have
remembered (they won’t be able to supply
the context, though… those pesky “details”),
in my experience.

anyhow… long story longer… somewhere
along the line, usually pretty early on…
one encounters the weirdly mystifying
*natural logarithm* function. everything
up to this point could be understood as
glorified sets, algebra, and geometry…
and maybe i’ve been able to fake it pretty well…
but *this* thing depends on the “limit” concept
in a crucial way. so to heck with it.

and a *lot* of doing-okay-til-now students
just decide to learn *one thing* about
ell-en-of-ex
(the function [x |—-> ln(x)],
to give it its right name
[anyhow, *one* of its right
“coded” names; “the log”
and “the natural-log function”
serve me best, i suppose,
most of the time]):
“the derivative of ln(x) is 1/x”.

anything else will have to wait.
but here, just as i said i would,
i have given the student too much
credit for careful-use-of-vocabulary:
again and again and again and again,
one will see clear evidence that
whoever filled in some quiz-or-exam
“ln(x) is 1/x”.

because, hey look.
how am *i* supposed to know
that “differentiation” means
“take the derivative”?
those words have *no meaning*!
all i know… and all i *want* to know!…
is that somewhere along the line in
every problem, i’ll do one of the tricks
we’ve been practicing. and the only trick
i know…. or ever *want* to know!… about
“ln” is ell-en-is-one-over-ex. so there.

it gets pretty frustrating in calc I
as you can imagine. to see it in analysis II
would drive a less battle-hardened veteran
to despair; in me, to my shame, there’s a
tendency… after the screaming-in-agony
moments… to malicious glee. (o, cursed spite.)

because, hey, look. if we all we *meant* by
“ln(x)” was “1/x” what the devil would we have
your case, grasshopper, several god-damn *years*?
did you think this was never going to *matter*?
like this could get to be a pleasure.

but how would i know. i’m just the grader;
it’s just a two-point homework problem.

and anyway, that’s not really the *exact* thing
i sat down to rant about.

next ish: *more* bad freshman calc from analysis II.

### (a=b)\implies( f(a) = f(b) )

so. a poor workman blames his tools
and i’m about to get right back to it.

recap: i’m just as guilty as anyone else.

when there’s stuff i think i’d *like* to know…
but that i *don’t* know… there are probably
*reasons*.

for example: (1) maybe i *don’t* want to know
(“does she *really* love me as much as
she says?”, e.g.).

or this: (2) the possibility of consequences
too horrible to accept (“is this guy just
another macho windbag or is he actually
tough enough to *hurt* me?”, let’s say).

or it’s just (3) flat-out too much trouble
(“what’s my credit rating and who’s
looking?… and who should i believe?”)….

and one could of course go on.

but in our context. and, again, i’m just
as guilty as the next guy.

i might “want” to know…
that i’ve been *wrong*.

wanting what can never be: life on one’s own terms.
including, in this case, an apology from the universe-
-at-large for having pretended for so long that one
hadn’t long since *really* known the true heart
of the matter. (stubborn universe. oughta know better.)

well, it’s pretty pathetic stuff, heaven knows.
but like i say, i’m just as guilty as the others
(that i’ve been working with right in here) seem
pretty consistently to be. give or take.

so, now. damn it.

when you hate and fear mathematics.

what then are we to do?
************************************************************
well, *avoid* the SOB if you get a chance, obviously.
i hate and fear fighting with fists and have done
fairly well so far running away from every chance…
too well to learn anything *about* that subject
in any realistic way.

but that’s what *you* should do.

what then are *we* to do… when, in some strange
power’s employ… “you” and “i” have agreed to
work together on clarifying some of your ideas

well, with any luck, *i* will be sensitive to
some the emotional baggage that typically goes
with *your* position. in dealing with some
intricate system of rewards-and-punishments,
you will have come up again and again against
some authoritative force telling you “you need
more math” (to acheive such-and-such a goal).

and, with any luck…

*you* won’t take it for granted that i’m just
another con artist out to get over on you
by pretending that making-it-look-easy
does anybody any service.

this is not fucking gym class.
maybe i’m willing to try to understand your point

so, now. why? why? why?

why, *for the love of god*, will you look away
the second the words “do the same thing to both sides
of the equation” escape my mouth?

why, when i make it a point to get your attention
back to the work on the page and say it again,
will you *openly complain* that i appear to be
changing the subject (from “what’s my next move
in this particular problem” to “how does one
actually go about *solving* problems like ours”).

why, when i fucking *beg* you to take me seriously
(this *one* fucking time) and get over your infantile
insistence that *you* know better than every teacher
of the subject worth taking seriously (alive or dead),
must you have some fucking *problem* with that?

because, sure, *i’m* an emotional basket case.
but *i* passed this fucking class easily and
have gone on to learn *much* more about it,
whereas *you* are going to fail it badly
(and deserve to) because you don’t want to
consider that an expert’s opinion *might*
sometimes be more valuable than the ill-
-formed fantasies of some bare-beginner.
much on the exam, most likely…)

go ahead, *hold* me in contempt.
you’ve paid for the privilege.
but, geez. this trying to *understand*
why you do it has me just about worn out.

so, you know what?

just *humor* me.

“do the *same* thing to *both* sides of the equtation.”

do the same thing to both sides of the equation
*on my authority* if it makes you feel any better.
(and *remain* a true-thinking math-is-nonsense
committed-to-ignorance equations-are-confusing
“normal” person… *blame me* if you have to…
“i’m not *really* pretending to be a math-head;
my teacher just *makes* me do it [like *all* teachers]
just to prove he can push me around”)…
i haven’t got the strength even to talk

because the *right* answer to “what do i do next?”,
after you’ve taken some perfectly good code
and munged it up by changing only *one* side
of an equation, is, and can’t ever *not* be,
“fix up this equation so it’s right”.

and if… never *mind* your reasons…
you’re not *having* it? well, it’s just
another one of those (many, many) problems
whose *solution* is “owen leaves the room”.

### midterm report

at the foundation of (an earlier version of)
this blog i ranted and rambled about
a tendency on the part of (lower-division
college math) textbooks to hamper the work
of the teacher by (deliberately!) suppressing
correct technical language.

of course things have continued to deteriorate.
but, by some miracle, i’m still earning
the random crust of bread by helping students
learn to *read* these ever-more-horribly flawed
documents. so far so good, then, i suppose.

anyhow, i’m grading linear algebra again
right in here (nothing *but* linear algebra
for something like a *year* now)…
and i’ve only recently become vividly aware
that this “tendency” has penetrated deeply into
the textbooks at this “higher level of the game”.

specifically, i hereby announce that some
satanic force has somehow (even here) replaced
*the sign of set-membership* ($\in$)
with its mindbendingly-wrong “plain english”
equivalent(s). the perfectly-correct
(and altogether-necessary) symbolism
$x \in S$ (“x is an element of S”)
is now to be replaced, by the edict of
invisible (and mostly unimaginable)
entities, with “x is in S”.

[
this is a good place to skip ahead.

i’m going to geek out slightly here.
you *don’t* have to be an adept to follow.
i’m hoping to make a point that can be
at least *partly* understood by math laity.

is the set of natural numbers (more here
much my most popular post here and probably
my best-read production of all time) “in” the set
of real numbers? loosely, yes. more precisely,
${\Bbb N} \subset {\Bbb R}$.

i can easily imagine myself talking to, say, another
teacher about, say, some “property” (like commutativity-
-of-addition; x+y=y+x [for all x & y]) that applies
in the natural numbers. “how do we *know* it applies?”,
i might say. and the answer might come: “because
the naturals are in the reals, and the *reals* enjoy
the property of commutativity”. “good answer!” i would
then reply, and move on to whatever i *really* wanted

again. are all possible probabilities in the reals?
well, yeah, (duh)! in “code”, one has $[0, 1] \subset {\Bbb R}$;
rephrasing, “all the numbers from zero to one (inclusive)
are in the reals” (but also, more precisely,
“the [closed] unit interval is a subset of the set of real numbers”)…
so. now i’m talking to some grad-school dropout (say): “is
the-interval-from-zero-to-one in the reals?” she asks;
“heck, yes” say i, and we get on with whatever we’re really doing.

is “pi” in the real numbers? sure! $\pi \in {\Bbb R}$.
“pi is an element of the reals”.

but wait! being-a-subset is an *entirely different* relation
from being-an-element! pi is simply *not* “in” the reals
in the same way that $\Bbb N$ is!

who cares? well, me and a few hundred thousand others or so.
if *you* don’t care? well, that’s why i invited you
to skip this part! read on!
]

the biggest problem from a practical standpoint
(if “how can we make this material better understood”
is a practical question) is simply that students
*hate writing* and at *every opportunity* will
replace “plain english” with (typically very
ill-understood) bits-and-pieces.

*nobody*… no student, no lecturer, no pro
mathematician… is going to write out the phrase
“is a real number” a whole lot more than
twenty or thirty times (in a given sitting-down)
without wanting *some* abbreviation for that
phrase.

and likewise for “is a subset of”… indeed,
*any* sufficiently common phrase *begs for
abbreviation* even in “plain english”

so there it is. mathophiles also… in some sense…
“hate writing”. anyhow, we *love abbreviating*.

“algebra is the science of equations”, i once
heard someone say (explicitly repeating something
he had learned “by rote” from a public-school
teacher during his own schooling… it went on
for another few lines but i didn’t learn that
part from listening to this guy say it three
or four times that one night). and i consider
this to’ve been very well said.

but first. this history of elementary algebra
at w’edia summarizes the standard dogma of its subject (as i
understand it) well. the evolution from “rhetorical” algebra
(describe *everything* in plain-language words) through “syncopated”
algebra (where “shorthand” symbols [many still common today]
began to replace the most common techical terms… but the
actual *reasoning* was still natural-language based [and so,
by contemporary standards, “informal”]) into
“symbolic algebra” (the “science of equations” as we know it
today: a study of “formal” properties of [carefully-defined!]
symbolic “objects” [“variables” and “equations”, for example]).

what w’edia *doesn’t* make much of… but what matters to me
a great deal… is that the emergence of algebra pretty
closely *coincides* in (so-called) *western* history with
the (so-called) renaissance and the (no sneerword necessary)
scientific revolution.

“modern times”, then, *began* when certain humans (*finally*!)
figured out how collections of symbols-on-paper (representing
certain abstractly-defined-objects), produced according to
various “rules”, could be interpreted to reveal previously-obscure
*laws of nature* (so-called). this *was* the “scientific revolution”.

and how does it work? *equations* is how.
so one of the *first* things in understanding
what’s going on the contemporary philosophical
environment is to find out *what an equation is*
(for all literate people): “the equality meaning
of the equals sign”
.

when we’re being sloppy, we can confuse “=” with “is”…
but when we actually get to work *using* equations,
we have to *much more precise* to get any value from
the procedure at all. plain-english “is” is *always*
in some sense metaphorical (except in empty utterances
like “it is what it is”)… whereas the equal-sign
rightly-used is as far away from metaphor as we know
how to get.

how does algebra work? (equations and *what* else?)
by *the method of substitution* is how.
“in a context such that A=B is taken as ‘true’,
a properly-written piece of code
including (the symbol) B
*does not change its truth-value*
when (the symbol) A is *substituted* for B.”

this “method” *characterises* algebra.
i first became aware of some its awesome power

and *what* else? “doing the same thing to
both sides of an equation”. and what else?
that’s about it. that’s algebra. the rest
is commentary.

now, for *set theory*, two of the main ideas
are caught up in set-inclusion and set-containment:
$\pi \in \Bbb R$ and ${\Bbb N} \subset \Bbb R$, for example.

and one must be every bit as careful in the use
of these symbols when studying sets as one must be
in the use of the sign-of-equality in studying,
say, polynomial equations (i.e., pretty much,
in algebra).

take *equations* seriously. and they’re morally
certain that “sets” are meaningless traps designed
to distract them from “how do i get the *answer*?”.

and the textbook does a great deal to encourage them
to *maintain* this view.

and i don’t like it. please stop.

### this is becoming very tiring

*most* of the exercises i’ve been marking
are… pretty obviously… somebody *else’s* work.
it becomes very tedious making corrections when
the alleged readers haven’t even taken the trouble
to try to understand whatever source document
they’re copying from.

a “2” turns magically into a “3”. what was mere
sloppiness in the source becomes *contempt for the
grader* in the BS-artists who unthinkingly copy it
over. how stupid do you think i *am*, just because
i fucking work here?

sure, i get it. everybody *else* is trying your patience.
they’ll pile on work just to see how devoted you are.
college is fucked; i get it. but this is the math
department and lies just won’t fly.

get with the program or get gone.

### bricks without straw

the procedure for TA’s administering quizzes:
print out hardcopies and run off copies (one does *not*
at the department’s copy center).

so far so good if the system actually worked.
but no such luck. when i got the email with
the link to the originals over the weekend,
i went and glanced at the link; okay.
there appears to be a quiz here. but i don’t
own a printer so i waited until i was on campus
to begin creating the actual paper documents.

whoops. locked out of the system. no time
to fix it. gotta postpone the quiz.

naturally there’s some resentment from the class;
naturally i’ll take a great deal of the blame.
(fortunately for me there were others suffering
the same problem or the *administration*
would presumably go ahead and blame me, too.)

in the twentyfirst century economy there’s *usually*
a robot between me and whatever i want.
and the more i want it? the more of my time
the robots will burn up uselessly while i try
and if you try to get it fixed, prepare to wait
on hold for a long time before you can get
to the menu with no option remotely like
serving your needs. home internet connection?
same thing, but worse (on my model because
i actually *want* to be online but not to talk
on the god-damn telephone). and don’t even
try to get me to *think* about health insurance.

look, i like breathing in and breathing out
as much as the next guy. but when does
this become unacceptable?

(here’s last year’s why i don’t
live at the p.o.
.)

### A Man’s A Man Who Looks A Man Right Between The Eyes

3. Let $U= \{0, 1, 2, 3, 4, 5, 6\}$ be the Universal Set (for this problem) and let $X=\{0,1,2,3\}$, $Y=\{0, 3, 6\}$, and $Z=\{0, 5\}$.

Compute the given sets. (Remark: we will have shown that set difference is not associative).

$(X-Y)-Z$
$X-(Y-Z)$
$Y^c \cup Z^c$
$X \cap X^c$

Again (sorry for the child’s play). A poor workman blames his tools; this doesn’t make him wrong. Obviously X – Y is (the set) {1, 2}. It follows then that (X-Y) – Z is also {1, 2}.

Whereas, in light of the fact that Y – Z = {3, 6}, one has X – (Y-Z) = {0, 1, 2}.

Anybody (outside a math class) pretending to want an explanation of what (if anything) has gone wrong is, pretty reliably, actually looking for some weakness whereby they can undermine somebody’s authority.

The classic blunder at this point is to refuse to take such a student seriously. And yet, they’re doing what I would’ve done; what I’ll go out on a limb and guess you would have done. Students didn’t just become stupid because you got an advanced degree any more than kids got to be some inferior order-of-being just because you decided to call yourself a growup.

How are they to know that, here in math class, we mean what we say? When, in every other arena (and for all we know, this one), authority rules?

(Yes, yes… they call it “opinion” and blame it on “the people”. Are we bored yet?)

### january 2010

I Relaunch(01/05) as MathEdZineBlog at the site… vlorbik.wordpress.com… of my quit-in-a-fit-of-frustration Vlorbik On Math Ed of ’07 to ’09. I offer subscriptions to the then-purely-imaginary MathEdZine (and, though of course this isn’t revealed in the post itself, I get no takers. I am not at all surprised. Heck, I’m not at all discouraged, even. “Disappointed” might not be going too far.) In Where Did That Amazing Blogroll Go? (01/05) I offer a backhanded apology for having deleted the blogroll for the relaunch; this was probably the feature I’d’ve found most attractive about VME if somehow I’d found one just like it done by somebody else before I’d ever started blogging. A fellow mathblogger with better net chops than mine… “sumidiot”… had already modified it for the new feedbased formats anyhow, so my work was finished (“feeds” are part of what I’d been so frustrated at when I’d quit, I’ll go ahead and mention). Also WDTABG? was the first in what promises to be a pretty steady stream of links lists. Probably I shouldn’t drop links here in this post for all of ’em… here’s the WordPress Archive for Jan ’10.

In Songs For Beginners: Pascal’s Triangle (01/05) I hinted at one of my ideas for the first issue of the zine. “Lectures Without Words” is a phrase I’d been dropping here and there already… for example in this post from Open A Vein (my “homepage” blog) back in December. I have indeed gone on to create four zines on this theme and have convinced myself I could probably do one a week or so… on the model of the hugely-popular-though-nobody-knows-about-it cartoon diaries of recent years… indefinitely and love doing it. Not that I will. I’ve got plenty of other ideas about math, and ed, and zines. Unless this is some monster hit, I’ll move on pretty quick I imagine. One never knows. Where was I.

in lovely dark and deep (1/07)
i slip into my “ramble” style for some
discussion of early drafts of issue zero.
i crossposted this
in order, i think, to cause a link to show
up in twittr or facebook or some other
“social” site that i’d caused to be linked
but had lost track of (this problem has
of course grown even worse in the
ensuing weeks).

then in comment thread reprint (1/08)
i continued my very-intermittent conversation
with the frighteningly-successful dan meyer
about sizzle and steak; i followed up immediately
with “continued from…“, yet another
in a never-ending line of luddite ravings.
what am *i* gonna do with it?

Vlorbik On Math Ed(1/13) is the title of this post; its contents are actually a list of links to selected posts from the blog of that name… much like this one though much better organized. I’ve revised it substantially from the version of its posting date. Usually I avoid doing this but in this context it looks like plain common sense to go ahead and over-ride that “house style” rule.

prehistory of MEdZ, part i (1/19)
tells, rather, the prehistory of the ten page news
(volume iii), with some math ed thrown in.
prehistory of MEdZ, part ii (1/21)
is a dismal failure wherein i tried to put
a photo in and it was there briefly and
even drew a comment from JD (one of
thanks jonathan). further fiddling…
specifically this photo-post (1/25)…
clobbered the picture; to heck with it.
i’ve gotten a little better at moving
pictures around with flickr and tumblr
but it’s infuriatingly “intuitive” and
i can still barely work any of it at all.
the picture that stuck… not at all by
the way… is of madeline’s scanner/printer.
i’ve made some mighty cool zines with
this thing already but i’ll probably
have to beat it to death with a goddamn
hammer before too much longer.
when it can be made to work at all…
at random as far as i can tell…
it makes gorgeous copies but
gohd knows what they cost and
anyway i can’t stand the aggro
and when it breaks soon i’m done.

### continued from…

… the comments to my last post here.

what “we” do with math; right.

i’ve never done *anything* with a large
data set. what i *have* done is coached
a senior computer-science student in SQL
(a “database” program based on ordinary
p-and-q symbolic logic in a straightforward way)
*without my ever having seen* SQL.
she was pretty helpless in it for a day or so
because she hadn’t looked at the tiny little
“easy” problems quite hard enough to make
certain things-obvious-to-experienced-users
available to her consciousness *at all*:
math is full of (what turn out to be)
“simple” things that are either trivially easy
or difficult-to-impossible (with no
middle ground; there’s some
not-at-all-quantum-like “leap”
where one “gets it”; this is widely
understood actually…).

i can read “logic” in any of many flavors
after all and even write it if i absolutely must.

and *that*’s what i’d like
*math teachers* to be able to do

“what can you do with this?”…
famous all over town. good.

here’s a shaggy-dog story (lack-of-spoiler alert)
about one of my favorite lines in one of my
favorite movies. it’s in _fisher_king_ and
robin williams has gone nuts from witnessing
some horrific violence and lives in a squat
and hangs with the street people. jeff bridges
played a part in perry’s triggering episode
(robin williams is called perry; there’s a
character in the “fisher king” legend called
percival and one is left to draw conclusions
or not). so jeff feels guilty and wants to do
something for this perry guy and hunts him
out down in the derelict street to give him
some money. robin williams immediately
turns around and gives the money to
another crazy street person. “i gave it
to *you*” sez jeff; “what am *i* gonna
do with it?” sez robin. gets me every time.
(yes, that was the punchline. move along;
nothing to see here.)

“What Can You Do With This?”
well, if you can’t do it with
*tools at hand*, probably nothing.
what am *i* gonna do with it?

what can i do with SQL?
nothing until somebody else wants
to understand it; then i can
*put it aside* and look at
some much simpler ‘underlying
structure’ that i actually understand.
then i can talk about it.

same with, pretty much, any other “application”.

i don’t interest myself much in the question
“how can i generate student interest?”.
all the other teachers in all the other subjects
plus mass media, the church, and the wolf
at the door are my competition if i enter
this arena and i’ll lose.

my material not my presentation is
the best possible. my presentation
is just what “we” who are present
at the time are able to make out
of the materials at hand. going out
and working on my presentation
is distasteful *to me* because
i know i’m going to get my ass
handed to me by richer better looking
smarter people with better connections.
no fun.

so. at long last. a vision of what math is?

well, it’s sort of like 42nd street.
where the underworld can meet the elite.
respect and attention will be lavished upon
those who best understand equations
(and, okay, certain, yick, drawings).
much more so if they’re able and willing
(rare in combination) to *explain* them
to interested parties of a wide variety
of levels of previous experience.
best of all like everybody knows
is working with small groups
(scribbling symbols and *talking*).

if you need this explained
you’re never gonna get it.
jazz math ed.

### Section 5.5: A Manifesto

The post is even more of a mess than usual. That “does not parse” parsed yesterday. I had to cut a piece out (you’ll find the hole) because it was acting downright weird for no apparent reason. Welcome to WordPress.

The text is even more of a mess than usual. Evidently certain forces have led its creators (“the Redactor”—an entity whose exact nature is very ill-understood [and for all I know, incomprehensible], but that we can imagine as a sequence of corporate committees— and “the Author” [typically also, from what I have been able to ascertain, a committee]) to create a display called Steps for Finding the Real Zeroes of a Polynomial Function. And thus far, we are of course in full, sweet, agreement: this is the holy grail of Algebra and as such, one of the most interesting subjects there is or ever could be in Life Itself; let such steps be i-cast on every cel (from the rooftops)… or whatever the kids say these days. (“Factor it if you know how. If it’s a constant, you’re done. If it’s linear, use subtractions and divisions to isolate the variable. The Quadratic Formula tells the whole story in the quadratic case. The cubic presents special difficulties. So first use a change of variable, if necessary, to….“—instead of, say, “buy! buy! buy!“). But now look what they’ve done to the beautiful face of this Alma Mater of problems.

Step 1: Use the degree of the polynomial to determine the maximum number of zeros.
Step 2: If the polynomial has integer coefficients, use the Rational Zeros Theorem to identify those rational numbers that potentially can be zeros.
Step 3: Using a graphing utility, graph the polynomial function.
Step 4: (a) Use eVALUEate, substitution, synthetic division, or long division to test a potential rational zero based on the graph.
(b) Each time that a zero (and thus a factor) is found, repeat Step 4 on the depressed equation. In attempting to find the zeros, remember to use (if possible) the factoring techniques that you already know (special products, factoring by grouping, and so on).
Why not skip the Rational Zeros Theorem altogether? Or, not that I’m proposing to do it here at Home Campus Community College, omit the calculator?

I’d probably love to do a “drill-and-kill” version of the course (where I have of course used the industry code for “those who establish a routine of doing lots of routine exercises, set by the instructor, should flatten the exams”)… but it’s just not an option, not with this many topics on the schedule (and us, mea culpa, so far behind it): a lot of teachers really like this “synthetic division” thing and there’s a pretty obvious reason: if you’re gonna crank out dozens of divisions-by-monic-linears, this is your tool.

In such a course, one would—naturally—ban calculators (and check by-hand homeworks for completeness, and much else besides). Certain Computer Gods of Texas have made certain unholy alliances with the local Management Gods to decree that ours shall be a calculator-driven version. In this context, I’m even ready to pretend to accept this decree: this very section is, for me, the first really essential use of the doggone graphers in the whole 102-103-104-148 sequence. There’s no time for lots of polynomial divisions, that’s for sure… so we’ll only do divisions if we have to… which means we won’t use ’em to find zeros (R‘s,say [“roots”])… but will use ’em to “divide away” the corresponding factors ((x-R)‘s, say).

The mostly-unspoken absurdity here is of course that, once you’ve decided to use a computer, why should you limit yourself to one of these expensive handhelds that do very few things compared to more modern electronica (and mostly do those badly)? I dropped a link to a free polynomial-factoring page into my homepage recently; any goodsize class will include some students who can access such programs on their telephones. Why should the line for “what computations the human should do” be drawn at “what such-and-such no-bid-contracting Behemoth decides they can sell”? But as I say, I’m pretending to accept this state of affairs (in order to speak to other issues).

Returning to the text. The “human computation” version should omit Step 3, together with the reference to “eVALUEate” (which, besides being twee, is bad calculator advice: one of course actually uses TRACE here). And then you just put in a “calculator” version saying what to do if you’re using a graphing calculator (which by the way is not a fucking “graphing utility” [utilities are programs not hardware except in edu-babble]). Instead of this neither-fish-nor-fowl thing that nobody will ever do (that isn’t crazy, or stupid, or, what is obviously the most likely case, simply following orders).

Steps 1 and 2 I’ll accept as they stand. Note that the Rational Zeros Theorem can be considered part of the “calculator” version of the process (RZT gives us a bound on rational zeros and a darn good set of hints as to where to “guess-and-test” [between integer values as observed on the grapher, say]; this avoids using intersect [or, worse, root] to determine certain rational values).

Step 3 speaks for itself; put it in the one version, out of the other.

In Step 4 we’ll find most of the trouble, then. So here’s a scholarly crux right off the bat: VME (to [selfindulgently] use “impersonal third person authorial” for a moment) is here using the Fourth Edition while knowing full well that Step 4 has actually been changed in the Fifth. But, a poor workbeing blames its tools, the Fifth is downtown in the office, whereas Fourths, their cash value having fallen suddenly to nothing a short time ago, are promiscuously littered about in various remote VME locations.

This much is known to me of the new Step 4 as of now: they made it worse. Because now it has the nerve actually to say “Use the Factor Theorem to determine if the potential rational zero is a zero”, when, goddamnit, the Factor Theorem has precisely nothing to tell us about whether a rational number is a zero until we already have the factored form—which is essentially the problem we’re supposed to be trying to solve. The Redactor has swallowed its own philosophical tail here and entered some new dimension of incomprehensibility.

Returning to the edition at hand, then:

In (a) I’ve complained of the calculator slang already; separating the p-and-p (paper-and-pencil, natch) methods from the FGC (graphing calculator) methods.

In (b) we have another of the Redactor’s masterpieces: we are told to “repeat Step 4 on the depressed equation”. But the depressed equation is available to us only if we have used a p-and-p method in step 4a. The calculator version here requires an explicit declaration to the effect: “Use the root to depress the equation (by either division algorithm)”. Anyway, the depressed equation appears to have popped out of the thin air here: in part (a) it hasn’t been mentioned even as a side-effect of the “test a zero” process. And yet this process is the very heart of the matter: in practical terms, it’s very much what this section is about. (Where, to be perfectly explicit, by “practical terms”, I’m referring to “terms of ‘how do you do the exercises?’ “.)

Speaking of which. Does anybody here not lay out all the possible p‘s and q‘s out across the top and the LHS of a table to form all of the “potential roots” supplied by the Rational Zeros Theorem (RZT)? Because if you’re in a big hurry and there’s this overwhelming amount of stuff that you’re given to cover in a couple meetings that oughta probably take months, this is an exercise you can essentially train students to do, in a pretty short time, and I’d never dream of doing this other than by laying out a table … oughtn’t that be in the book somewhere?

Even the statement of RZT resists comprehension (as I guess… it’s clear enough to me…): “${p\over q}$, in lowest terms, is a rational zero of f, then p must be a factor of $a_0$ and q must be a factor of $a_n$” is perfectly clear in its context; don’t let anybody tell you any different. (In particular, $a_0$ and $a_n$ have been displayed with their usual meanings right there in the statement of the theorem, as good taste requires.) But one should darn well put it in words as well, as if people are actually going to talk about it: “the numerator (of the zero) divides the constant term (of the polynomial)”.

“Numerator divides constant” is much more memorable to at least some minds than “pee divides a-naught”, and is anyway more meaningful (since, in another context, my own lectures for example, one may have, say $A_i$‘s in place of the $a_i$‘s or $n\over d$ in place of $p \over q$). That the verbal translation of a formula should appear somewhere near its display looks like a simple corrollary of, what is taken by at least some people as a basic principle for Math Ed, the “Rule of Three” (or of “Four”).

I’ll go ahead and add that “p must be a factor of a_0, and q must be a factor of a_n” gets old pretty fast when you’re writing on the board (or notebook or what have you); one soon discovers a crying need for some such symbolism as the (completely standard and easily understood) $p | a_0$ and $q | a_n$; moreover, we’ll be able to use this notation quite a bit in other contexts (like
$f(R) = 0 \Rightarrow (x-R) | f$
this is of course the statement of the Factor Theorem (as it appears, not in the book, but in The Book).

One more thing here. Students will of course take $p | A_0$ and $q|A_n$ as facts to be memorized. And some will inevitably mix them up: it was for situations of exactly this type that the phrase “minding one’s p‘s and q‘s” must have been coined. But of course, by merely contemplating, say 2x – 3 = 0 for a few seconds, one easily reminds oneself of what’s going on: $3\over 2$ is the root … it must be the numerator that divides the constant… (and so on). We darn well have to keep showing students how to do this kind of thing (use small examples to remind oneself of the details of big generalities). Whenever there’s some easy way to avoid memorizing something, we should at least mention it.

I wouldn’t mind so much—I kind of like being the “good guy” who gets to come in and say, “You know that passage of the text that doesn’t make any sense? Well, what they’re trying to tell you is this…”—but I’ve got reasons to believe that some of my colleagues are even more clueless than I am about stuff like this; it’s safer to just put it into the text in the first place.

The theorem of the very first display of the section—mysteriously called an “algorithm” there—is that polynomials “divide like natural numbers” … a fact summarized in the equation f/g = q + r/g.

I’ll remark here on the fly that $(\exists q, r) (\forall f,g (g\not=0)), \delta(r)<\delta(g)$ should precede this equation (in some dialect—I hope it’s obvious that I don’t dare indulge in such straight-up set-theory with my live audiences… in part because one would also need to make it clear somewhere that $f, g, r, q, 0 \in {\Bbb R}[x]$ and that the inequality under the $\forall$ quantifier states that g is not the zero polynomial) and that $\delta$ here represents “degree”. [There’s a lost passage here that caused WordPress to freak out utterly and set the whole page wrong. The Tex code parsed OK, but then … blooey. It wasn’t essential. Just me playing around with the degree function.]

But that was just me playing around. The fact that quotients and remainders can be computed (for ordered pairs of polynomial functions) deserves such prominent placement. It also deserves the name of a theorem; “the Division Algorithm”, rightly so-called, is the process defined in the proof of the theorem (and used in actually computing the polynomials r and q—we’re speaking of a constructive proof). What does not deserve such prominent placement is the next thing: the dreaded Remainder Theorem (RT).

Not in my course anyway. RT is hard to understand (of course I can’t prove this … but I can say that I’m pretty sure I didn’t understand it until about Abstract Algebra or so …) and is used only in proving the “hard” direction of the Factor Theorem (by us; those ever-so-fortunate p-and-p classes use it a bunch; I’m guessing here). Moreover, the authors have just gotten through admitting that they stated The Theorem Called “Algorithm” without proof; this theorem is of course quoted in the proof of RT (so it ain’t much of a proof at that).

And I walked into a trap here and caused myself to deflate right out in front of a class when I suddenly realized I wasn’t willing to try to really explain—I mean “explain so as to be understood” (with all the necessary give-and-take)— what was going on with this part of this section (and so I oughtn’t to have brought it up in the blackboard notes at all): you can lose a lot of hard-won trust in a moment flat by just giving up.

The Theorem for Bounds on Zero is omitted campuswide; good. I’ll go ahead and mention that this omission sort of hints that the creators of the local version of the course are aware that this might not really be the text we should use. While I’m at it, they’ve also changed the order of the sections in this Chapter. This might very well be contributing to my difficulties. If there can be said to be an intended audience for this treatment, then that audience will have had more experience in graphing rational functions before getting here (and so would have seen lots more examples of the Factor Theorem at work before its statement here, for example).

As much as I’ve been complaining about the text, I ought to make it clear that what I’m really fighting is the lack of time to talk about it. There’s enough here for a whole ten-week course as far as I’m concerned (and I’d love to teach that course, with students just like the ones I’ve got now). Meanwhile, there’s this completely demented parody of an industry standard to the effect that “This is College! It’s supposed to be hard! Let ’em learn how to study!” and so on. This is far from a majority opinion in most departments according to my wild guess. But when the committees start making up the rules, all of a sudden those with this opinion speak up plenty loud and nobody wants to appear like the weakling. (“Well, my students seem to need about twice the time on this topic than what’s allotted” can very easily be twisted into “I don’t know how to teach this stuff properly”, so it’s just easier to keep your mouth shut. And another invisible 800-pound gorilla is born.)

And then, and this is the most frustrating phenomenon of all, you get together in the group-office-cum-teacher’s-lounge and all anybody ever wants to complain about is the students. “They keep wanting to do this, no matter how I tell ’em to do that!”—and I keep trying to change the subject to “We’re telling ’em to do that, in the wrong way!”

Because once new students are seen to make the same old mistakes, that’s information: knowing the most likely mistakes tells us where to put up the warning signs (even Bourbaki, whose indifference to pedagogy was legendary, did this). The fault, dear colleagues, is not in our students but in ourselves.

So why do I always feel like I’m the only one complaining about textbooks and syllabi and stuff that’s actually somewhat under the control of people right here in our department (instead of the lack of math maturity found in math students, which is not)? OK. Rhetorical question. Because disrespect for the helpless is free, but fighting the power is dangerous, is why. To which I can only say, sure. But at least it’s interesting

### It’s Not The Cheat, It’s The Futility

The transformations section of the text begins, to my predictable chagrin, with a graphing-calculator “Exploration”: adding (or subtracting) a constant value at the end of a function (in the Function Editor [i.e., the “Y=” screen] of the grapher) produces the by-now familiar (to any student in regular attendance) vertical shift. “We are led to the following conclusion:

If a real number k is added to the right side of a function y = f(x), the graph of the new function y = f(x) + k is the graph of f shifted vertically up k units (if $k > 0$) or down |k| units (if $k < 0$)."
And this is about as clear as can be expected: this stuff is hard. But, doggone it, we’re adding to the right side of an equation, aren’t we. And shouldn’t we take a hint from the doggone grapher and refer to $y_1$ and $y_2$ (the authors go on, in effect, to call $y_1$ by the name f—but what’s the name for the new graph?)?

As for the cases on the sign of k (and the use of absolute value), well, it’s not the way I’d handle it but it’s not obviously worse. I usually say something to the effect that the graph of [the equation] y = f(x) + h is obtained by shifting the graph of y = f(x) “up” by k units with the understanding that “shifting up by a negative number” is interpreted—in a very familiar way—as shifting down. It can be helpful to mention, say “y = Mx + B” here—the point being that we don’t need to know the sign of B for the formula to be valid. (Or the words: for the case of y = f(x-h) we add h to each x co-ordinate of the graph—regardless of the sign of h.)

Again, it’s not obvious that treating the “up” and “down” cases explicitly right there in the display that (effectively) defines “vertical shifting” was a bad idea … but I believe it was a bad idea (sort of): anyway, by the time a student reaches the Conic Sections stuff (next quarter) some of the “formula” displays have become much more complicated than they have any good reason to be (and goodness knows, Conics are hard enough already). The sign issues have to be discussed somewhere; using inequalites and absolute values to do it is probably very much the right idea … what I’m after here is that the definitions be definitions. Which would mean, first of all, identifying ’em as such; and then, as concise as you can be while getting the job done.

It would appear that somebody made an editorial decision not to discuss the kind of “understanding”s I mentioned a moment ago; the results are disastrous. This is particularly true for students inclined to the so-called “rote memory” strategy (learn the formulas by heart before even beginning to work at “seeing the big picture”). Of course, most of us probably consider it something of a duty to try to talk such students out of relying heavily on this strategy … but this hardly seems like the right way to do it. And yes, there sure does seem to be quite a bit of resistance (anyway at the level just below 148) to the idea that, say, “dividing by a number is just multiplying by its reciprocal”—this comes across as “mumblemumble” to many a 102 student (for example).

I call it “teacher talk”: the student somehow knows for sure that this technical stuff you’re always so careful about saying cannot possibly have anything to do with their existing ideas about how to solve equations; they’ll move heaven and earth to try to find some list of “rules” they can memorize if only they can avoid using the word “reciprocal” (or, of course, what’s worse, “multiplicative inverse”). And if you’d only stop trying to pretend any of this means anything and just tell them what to do, the scales would probably fall from their eyes in a minute flat. Of course it’s damn-right a duty to try to disabuse these poor souls of their misapprehensions as to the nature of our art. And this duty doesn’t fall on me alone.

Overlooking the power of the symbols until we end up with different formulas for, say, ellipses with vertical and horizontal major axes feels to me like pandering to the worst instincts of our weakest students and, I keep having to apologize (“Well, if they’d done this right, it’d be much easier … well, look: forget it. Here’s what they want you to do …”).

So. Let’s try and make this very difficult task as easy as it can (reasonably) be. Thinking of, say “stretching” and “compressing” graphs as two aspects of the same process (requiring only a single formula), is just a flat out good idea: the notation is beginning to do some of our thinking for us. It’s not quite the Heart of the Matter—an awful lot of people have learned about Transformations and Conics (for example) with the kind of overly-detailed treatment of cases I’m complaining of here, after all. But for me it’s pretty close. And, believe it or not, I don’t necessarily want to do constant battle with textbooks.

• ## (Partial) Contents Page

Vlorbik On Math Ed ('07—'09)
(a good place to start!)

format: plain


text:
2936
Q:

# Today is Monday. After 61 days, it will be :

 A) Tuesday B) Monday C) Sunday D) Saturday

Explanation:

Each day of the week is repeated after 7 days. So, after 63 days, it will be Monday.

After 61 days, it will be Saturday.

Q:

If it was a Sunday on 1 January 2017, what was the day of the week on 31 December 2017?

 A) Tuesday B) Monday C) Sunday D) Friday

Explanation:

12 4014
Q:

What was the day of the week on 26 January 2012 ?

 A) Sunday B) Saturday C) Thursday D) Tuesday

Explanation:

10 2958
Q:

The time duration that would elapse between 12:37 p.m of 11h April 2019 and 12:29 p.m. of 12th April 2020 is

 A) 366 days 23 hours 52 mins B) 367 days 8 mins C) 365 days 23 hours 52 mins D) 366 days 8 mins

Explanation:

13 1803
Q:

What percent of 1 day is 36 minutes?

 A) 25% B) 2.5% C) 3.6% D) 0.25%

Explanation:

36 3615
Q:

What day of the week was 31 January 2007?

 A) Monday B) Tuesday C) Thursday D) Wednesday

Explanation:

43 7417
Q:

Lata decides to go for a walk every alternate day. In a particular month she starts on a Friday. On which of the following days will she be mina for a walk the following week?

 A) Wednesday, Friday, Sunday B) Monday, Wednesday, Friday C) Thursday, Saturday, Sunday D) Tuesday, Thursday and Saturday

Explanation:

28 3230
Q:

Afroze was born on the  $2nd$of February 2015, while Avash was born 555 days later. On which date was  Avash born?

 A) 11thAugust 2016 B) 9thAugust 2016 C) 10thAugust 2016 D) 8thAugust 2016

Explanation:

30 4941
Q:

Rohit remembers that his birthday is before 12th December and after 6th December. His wife remembers that Rohit’s birthday is after 7th December. His son remembers
that Rohit’s birthday is before 10th December. On which date of December is Rohit’s birthday?

 A) 8 B) 9 C) 10 D) 8 or 9


text: The El Paso Solar Pond, a research, development, and demonstration project operated by the University of Texas at El Paso, is a salinity-gradient solar pond with a surface area of 3,000 m$2$ and a depth of 3.2 m. The pond utilizes an aqueous solution of predominantly sodium chloride (NaCl). The surface convective zone, main gradient zone, and bottom convective zone are approximately 0.6 m, 1.4 m, and 1.2 m, respectively. The project, located on the property of Bruce Foods, Inc., was initiated in 1983 in cooperation with the U.S. Bureau of Reclamation. Since then, the El Paso Solar Pond has successfully developed a series of technologies for solar pond operation and maintenance, as well as demonstrated several different applications. In 1985, the El Paso Solar Pond became the first in the world to deliver industrial process heat to a commercial manufacturer; in 1986 became the first solar pond electric power generating facility in the United States; and in 1987 became the nation’s first experimental solar pond powered water desalting facility. Currently, the major research at El Paso Solar Pond is focused on desalination and brine management technologies. The long-term goal of this research is to develop a systems approach for desalination/brine management via a multiple process desalination coupled with solar ponds. This systems approach will reuse the brine concentrate rejected from desalting plants thereby negating the need for disposal (zero discharge), and provide additional pollution-free renewable energy for the desalting process.


text:
# Math Help - [SOLVED] Simple proof

1. ## [SOLVED] Simple proof

Show that if $a\mid{c}$ and $b\mid{c}$ then $ab\mid{c}$

I got started and have Let c=ae and c=bd where d and e are integers.
c=ae=bd and a and b are not equal then e=b and d=a thus $ab\mid{c}$ where the result would be 1.
I am pretty sure my logic is really messed up though.

2. Originally Posted by diddledabble
Show that if $a\mid{c}$ and $b\mid{c}$ then $ab\mid{c}$
$3\mid12~\&~6\mid 12\text{ but is it true that }18\mid 12?$

3. I forgot to add that gcd (a,b)=1 Sorry.

4. In your equations c=ae and c=bd try solving for a and b then look and the product of the two.

That should get ya there

5. So then $a=c/e$ and $b=c/d$ then $ab=e/d$ Where $e/d=c$ Is that correct?

6. ## Proof

$(a,b)=1\Rightarrow \exists s,t\in \mathbb{Z} s.t. as+bt=1$

Multiply through by c to arrive at
$asc+btc=c$

ab|asc because a|a and b|c

ab|btc because a|c and b|b

so it divides the sum which is c as desired.

7. Originally Posted by diddledabble
So then $a=c/e$ and $b=c/d$ then $ab=e/d$ Where $e/d=c$ Is that correct?

I take back my original post. Let's try another approach.

Since gcd(a,b) = 1 then there exists integers $x,y$ such that $1=ax+by$

Multiply this equation by c to yield
1) $c*1 = c = c(ax+by)=axc+byc$

Now $c=ak=bl$ where $k,l$ are integers

Substitute these values in equation 1)
$c=ax(bl)+by(ak)=abxl+abyk=ab(xl+yk)=abm$ where $m$ is an integer

Thus $c=abm$ or equivalently $ab|c$


text:
# 10th International Conference on Hard and Electromagnetic Probes of High-Energy Nuclear Collisions

May 31, 2020 to June 5, 2020
Online
US/Central timezone

## ATLAS measurements of transverse and longitudinal flow decorrelations in Xe+Xe, Pb+Pb, and $p$+Pb collisions

Jun 3, 2020, 10:30 AM
20m
https://cern.zoom.us/j/94475079687

#### https://cern.zoom.us/j/94475079687

Oral Presentation Initial State

### Speaker

Arabinda Behera (Stony Brook University (US))

### Description

ATLAS measurements of flow harmonics ($v_n$) and their fluctuations in Pb+Pb and Xe+Xe collisions covering a wide range of transverse momenta, pseudorapidity and collision centrality are presented. The measurements are performed using data from Xe+Xe collisions at 5.44 TeV, Pb+Pb collisions at 5.02 TeV, and $p$+Pb collisions at 5.02 and 8.16 TeV. The $v_{n}$ are measured up to $n=6$ using the two-particle correlations, multi-particle cumulants, and scalar product methods. The $v_{n}$ values are also performed using a non-flow subtraction technique that was developed for flow measurements in $pp$ and $p$+Pb collisions. This non-flow subtraction is found to have a significant effect on the measured $v_n$ at high-$p_T$ and in peripheral collisions. A universal scaling in the $p_{T}$ dependence of the $v_{n}$ is observed for both systems.
Measurements of correlations between the $v_n$ for different order $n$, studied with three- and four-particle mixed-harmonic cumulants, are also presented, and contributions to these correlations from centrality fluctuations'' are also discussed. Measurements of longitudinal flow decorrelations involving two- and four-particle correlations for $v_{2}$ and $v_{3}$ in Xe+Xe and $p$+Pb collisions are also presented and compared with the corresponding measurements in Pb+Pb collisions. The four-particle decorrelation is found to not factorize as a product of two-particle decorrelations. The ability of such measurements to distinguish between different models of initial geometry and to reduce the uncertainty in determining the effective shear-viscosity to entropy-density ratio of the QGP is demonstrated.

Contribution type Contributed Talk Initial State ATLAS

### Primary authors

Lidija Zivkovic (Institute of physics Belgrade (RS))

### Presentation materials

 HP20talk_ABehera_ver3.pdf Recording


text:
# Find volume of region using change of variables

I want to find the volume of the region $R$ that lies between

$$z= x^2 + y^2, \quad z= 4(x^2 + y^2), \quad z = 1, \quad z = 4$$

Using the transformation \begin{align} x &= \frac{r}{t}\cos(\theta)\\ y &= \frac{r}{t}\sin(\theta)\\ z &= r^2 \end{align}

Now, I understand how to do this problem(finding the jacobian, plugging in the transformation, doing the triple integral), but what I don't understand is how to find the bounds for r,t and theta. Is there a general method on how to do this?

-
add comment

## 1 Answer

Your region is as follows:

$r\in[2,4]$, $\theta\in[0..2\pi]$, $z\in[2..4]$

-
er why isn't r from 0.5 to 1? (plugging in z=1 and z = 4 into the equations) –  praks5432 Nov 1 '12 at 6:33
and what about t? what's t? –  praks5432 Nov 1 '12 at 6:35
@praks5432: Which coordinates are you using? Cartesian $(x,y,z)$? Cylindrical $(r,\theta,z)$? Or Spherical $(\rho,\theta,\phi)$? It looks to me that you are using the second coordinates, so we have 3 coordinates $(r,\theta,z)$ not 4 coordinates. I mean that existing another parameter, say $t$, is meaningless here. –  B.S. Nov 1 '12 at 6:44
Beautiful! $\quad +1 \;\ddot\smile\;$ I hope to see you tonight before I go to bed (my time that is, but morning your time!) –  amWhy Apr 2 at 2:48
@amWhy: I came here but seems you went to the Heaven. Have a peaceful colored sleep my dear Amy. –  B.S. Apr 2 at 6:26
show 4 more comments


text:
# Equation practice with angles

### Problem

The angle measurements in the diagram are represented by the following expressions.
Solve for x and then find the measure of start color greenD, angle, B, end color greenD:
start color greenD, angle, B, end color greenD, equals
degree


text:
# Machine Learning with Scikit-Learn¶

Please follow all standard guidance for submitting this assignment to the Gradescope autograder, including storing your solutions in a dictionary called results and ensuring your notebook runs from the start to completion without any errors.

For this assignment, please name your file exercise_sklearn.ipynb before uploading.

You can check that you have answers for all questions in your results dictionary with this code:

assert set(results.keys()) == {
"ex3_num_columns",
"ex6_model_smoking",
"ex7_first_prediction",
"ex8_score",
"ex9_SVR_score",
"ex10_SVR_linear_score",
}

### Submission Limits¶

Please remember that you are only allowed three submissions to the autograder. Your last submission (if you submit 3 or fewer times), or your third submission (if you submit more than 3 times) will determine your grade Submissions that error out will not count against this total.

## Machine Learning in Medicine¶

In these exercises, we’ll learn to fit and evaluate (in a basic way) machine learning models using the package scikit-learn.

The emphasis of these exercises is to help you get comfortable with the data-wrangling component of machine learning so that in future courses you can focus on the theory underlying machine learning. With that in mind, we will be quite cavalier with model fitting and evaluation. As with our statsmodels exercises—in which we quickly ran through a few models to practice model implemention without thinking too much about model selection and specification—this is not how you should do your actual data science analyses!

Though this is true generally, it is doubly true in the context of these exercises: the application of machine learning to medicine.

In these exercises, we will use the birth-weight data we used for our statsmodels exercises to predict birth weights. As you will see, implementing a machine learning model to predict birth weights is actually surprisingly straightforward. But that ease is deceptive; while machine learning algorithms are easy to use, they’re hard to use well, and if you get them wrong in contexts where they impact real people, poorly implemented machine learning models can literally kill people.

Lest you think I’m being hyperbolic, consider the case of a machine learning model used by medical providers across the US to make treatment decisions for millions of people. The goal of the model (distributed by a company called Optum) was to help providers figure out what patients were especially likely to face health problems down the road, so they could provide these patients extra preventative care.

The problem, though, is that the way Optum did this was by training a supervised machine learning model to predict future healthcare use by patients. Patients the model predicted would consume more healthcare in the future, the model implicitly assumed, were those who should get extra care today.

But as was recently described in a paper in the journal Science, the problem is that the model had a large racial bias, and was less likely to recommend extra preventative care for black patients.

The reason was that Black patients in the United States tend to use the medical system less than White patients even when the Black patients have the same level of medical need as White patients. Why? The paper doesn’t explore that fully, but the causes likely include skepticism towards the medical establishment due to the history of Black Americans being used as unknowing test subjects for medical studies, or the fact that Black Americans tend to have lower incomes and are less likely to be insured than White Americans.

So when this model saw that Black patients didn’t consume as much healthcare in the future, the algorithm interpreted that as evidence that Black patients didn’t need healthcare in the future. This resulted in the model falsely telling doctors that Black patients were systematically less in need of preventative care.

Crucially, this occurred even though race wasn’t even a variable in the model. Machine learning models are very good at picking up subtle signals, and so even though patient race wasn’t an explicit factor in the model, the model was nevertheless able to differentiate Black and White patients. Though it’s not clear exactly how it did so, this can happen whenever variables are included in models that are correlated with race. For example, people’s zip codes (which identify where people live) are notorious for proxying for race in machine learning algorithms since residential segregation in the US means that most people in a given zip code are of the same race.

And so as a result, this well-meaning machine learning algorithm resulted in black patients receiving fewer preventative medical interventions than white patients, even after taking into account other (medically relevant) factors.

So: in this exercise, we’ll play with predicting birth weights in infants. But do NOT think that just because it’s this easy to fit a model, it is appropriate to then go use these in the real world in contexts where people’s lives are affected!

## Exercises¶

(1) Load the data “smoking.csv”, which includes information on both biometrics of infants at birth, and information on mothers (variables prefixed with the letter “m”), from this MIDS repo. We’ll be working with this data in this exercise.

Unlike in statsmodels, we can’t use pandas DataFrames in scikit-learn, so the first step in nearly any machine learning workflow (if you haven’t already been given a nice giant numpy array) is to convert our heterogeneous pandas array (which includes strings, categorical variables, integers, and floating point numbers) into a single large matrix that consists only of floating point numbers.

While you can do this by hand, this is most easily accomplished using the patsy library, which will take a pandas array and a special formula string and return numpy arrays for use in libraries like scikit-learn. (patsy is actually the library that implemented the formulas we used in statsmodels to specify our regression models—here we’re just using it on its own).

Let’s assume that for most of these exercises, we want to predict birth weight (bwt.oz) using:

• whether the mother is (a) White, (b) Black, (c) Hispanic or (d) of another ethnicity (in other words, please recode mrace into four categories)

• whether the mother smokes (smoke)

• Mother’s age (mage)

• Mother’s weight (mpregwt)

• Mother’s height (mht)

We won’t use any interaction terms in this exercise, just these entered on their own.

For race, recall that in the raw data, mrace is coded as:

mrace    mother’s race or ethnicity
0-5= white
6  = mexican
7 = black
8 = asian
9 = mix
99 = unknown

Re-group mrace to be White(0-5), Hispanic (6), Black(7), other (8, 9, 99)

(We’re ignoring gestation because we don’t really know the value of gestation before the child is born, so we can’t use it to predict the birthweight of not-yet-born children!)

(2) Begin by using patsy.dmatrices() to create two datasets (y, which is the birth weights, and X, which is a matrix with all your “features” in a nice numpy array).

Note: You may hit a similar issue using patsy here you encountered when writing formulas in the statsmodels exercise.

(3) Look at your features matrix X. How many columns does it have? Store your answer as ex3_num_columns. How does that compare to the number of variables you used as inputs? (if they’re the same, you probably did something wrong…).

Explain all the things patsy has done with your data (hint: it’s made TWO changes affecting the number of columns in your data).

In machine learning, model selection is often accomplished by:

1. Splitting your data into two parts (a training set and a test set),

2. Training your model on the training set (i.e. set the parameters of your model to best explain the training data).

3. Testing the model by using the parameters generated during that training to predict values for the testing data, then comparing the predicted values for the testing data to the actual values in the test data. The smaller the difference between the predicted values and the true values in the testing data, the better the model is said to perform.

Suppose we just wanted to use linear regression as our model. First, we’d randomly pick 80% our data, then regress birth weight on the various variables (“features” in machine learning terminology) we specified above. Then we’d use the coefficients from that regression to predict birth weights for the 20% of children we didn’t use in our estimation, and see how different those predictions are from actual birth weights. If we find a model that performs well on our testing data, then we assume (hope) that that model will also work well on new data (i.e. on children who haven’t been born yet whose weight we want to predict).

(Readers from a statistics background will recognize this as being a little analogous to “cross-validation.”)

So the first step in machine learning is to split our sample! Thankfully this is easy to do with the sklearn train_test_split function. Import the function with from sklearn.model_selection import train_test_split, and split your data. To give you a sense of how it works, this is a common syntax:

from sklearn.model_selection import train_test_split

X_train, X_test, Y_train, Y_test = train_test_split(X, y,
test_size=0.2,
train_size=0.8,
random_state=42)

Where X_train is your training features, Y_train are your training birth weights, X_test are your test features, and Y_test are your test birth weights. The random_state var just ensures that you can re-create this split if you have to re-run your code (helpful for debugging and for our autograder).

(4) Start by splitting YOUR data, putting 80% into the training data. Set your random state with the seed 42 so your random split is the same as will be used by the autograder.

Now it’s time to train our model!

scikit-learn is much loved because it has, like… every model ever already built in, and it provides a common interface (API) for all of them. Seriously—go check out all the supervised machine learning models that come with scikit-learn here.

Moreover, unlike many open-source projects, all of its models are really well documented, so you can read all about them. And check out this nifty guide to choosing an appropriate model.

For this exercise, let’s start by fitting a LinearRegression model.

Wait, you say: isn’t that what we did in statsmodels? Yes!

Data Science is a very fragmented discipline, and some stuff gets recapitulated in slightly different ways in different places, so it’s common to see different implementations of the same thing as you move from the world of statisticians (statsmodels) to the world of computer scientists (i.e. machine learning and scikit-learn).

(5) Import the Linear Regression model and instantiate it with code like:

from sklearn.linear_model import LinearRegression
my_model = LinearRegression(fit_intercept=False)

The fit_intercept=False tells scikit-learn you don’t want it to fit an intercept for your model behind the scenes. We use False because patsy included an intercept in our design matrix (a column of 1s), and we want to see the coefficient on that column in our coefficients.

(6) Now fit your model against X and y and take a look at the coefficients.

Machine learning, more than absolutely anything else, is concerned with predicting values, and that’s evident in what functionality is exposed by this implementation of linear regressions. As you may recall, in statsmodels, you could type .summary() and get something that looked like this:

A full printout of various diagnostics, all your coefficients, estimates of confidence intervals for each coefficient, etc.

By contrast, LinearRegression from sklearn has no summary method. Indeed, the only output you really get for what the model has actually fit is my_model.coef_, which will look something like (not real values or number of coefficients you should get here):

> my_model.fit(X_train, y_train)
> my_model.coef_

array([[ 7.89347789e+00, -12.3442359e+00,
-8.78152768e+00, 3.215196740e+00]])

Which I think we can all agree is not nearly as informative a print-out!

To be clear, you can recover many of the diagnostics for LinearRegression by digging around in other corners of sklearn, but what is made available speaks to the prioritizes of different users: sklearn is for making predictions; statsmodels is for statistics and understanding mechanisms (i.e. seeing if the coefficient on smoking is significant).

Store your model’s coefficients for smoking in ex6_model_smoking. (Note how much trickier this is here than with statsmodels! sklearn doesn’t think anyone would ever care about individual coefficients).

Note: In statsmodels, the .fit() method returned a new fitted model. In sklearn, by contrast, .fit modifies (mutates) the model in place.

(7) OK, but we’re in the world of sklearn, so let’s do some prediction! Now that you’ve fit your model, use the predict method your data to create a set of predictions. Store the first (index 0) predicted birthweight in ex7_first_prediction.

So we now have a trained model that we can use to predict birthweights. Yay! But is it any good?

All sklearn models have a method called score you can used to get the most basic evaluation of your model. The syntax is just:

my_model.score(X_test, y_test)

If you’re doing a classification model (something that tries to guess the category for each observation, like a model that evalutes a set of pictures and tries to figure out if the pictures are of cats, dogs, or humans), score will return an “accuracy” score (the percentage of observations you properly classified). For a regression model (trying to guess a continuous variable) it will give an R-squared score.

As you get more sophisticated, you will discover these basic scores are often inadequate for evaluating models, and you can turn to other evaluation functions found in sklearn.metrics. But for now we’ll just use the default score output of R-squared.

(8) What is the score of your model? Store the result as ex8_score

## Machine Learning Workflow Summary¶

Congratulations! You just did you just fit your machine learning algorithm! And you also learned that sometimes what constitutes “machine learning” is in the eye of the beholder, given what you did today is the same thing you did in our last class without calling it machine learning. :)

But hopefully that’s given you a general sense for the work-flow of scikit-learn:

import patsy
y , X = patsy.dmatrices('bwt_oz ~ C(race_recoded) + smoke + mage + mpregwt + mht', smoking_and_bw)

from sklearn.model_selection import train_test_split

X_train, X_test, Y_train, Y_test = train_test_split(X, y,
test_size=0.2,
train_size=0.8,
random_state=42)

1. Import and fit a model:

from sklearn.linear_model import LinearRegression
my_model = LinearRegression()
my_model.fit(X_train, y_train)

my_model.score(X_test, y_test)

1. Use youre model to make predictions:

my_predictions = my_model.predict(X_test)

## Comparing Models¶

Now that we have a baseline estimate for the performance of LinearRegression for this set of features and outputs, let’s try a different model and see how it compares!

(9) Now repeat your analysis using a Support Vector Regression (from sklearn.svm import SVR).

How does the model perform? Is it better or worse than LinearRegression?

Note: You’ll probably get a DataConversionWarning: A column-vector y was passed when a 1d array was expected. This is related to this common gotcha. Make sure you understand the problem / are able to resolve the warning.

Why didn’t you get this with LinearRegression? That I can’t say! They must each be implemented slightly differently beneath the hood.

ROUND your value of the score of this fit model result to 2 decimal places and store as "ex9_SVR_score". (SVR is not deterministic, and it doesn’t seem to respect our random seeds, so values beyond this may differ a little across computers.)

(10) One choice parameter for SVRs is the kernel it uses for weighting (again, this isn’t a class on machine learning, so don’t worry too much about what this means—just know that it’s a parameter of the model). Check the SVR documentation to figure out how to set the kernel to linear and see how it performs now.

Store the score of the SVR with linear kernel as "ex10_SVR_linear_score". ROUND your value of the score of the SVR with linear kernel to 2 decimal places and store as "ex10_SVR_linear_score"`

(11) Now pick whatever regression model you’d like and see how it performs (some suggestions). Play with your model specifications and see how well you can do with your new model of one of the ones we used above.

## Want More Practice?¶

Try replicating our attempts to predict whether infants would be born premature from the statsmodels exercises in scikit-learn. Start with a LogisticRegression, then try some different “classification models” for comparison!


text:
×

# infinite universe

universe is created through infinity,by infinity and in infinify which starts from zero and ends with infinite which is nearer to zero

Note by Deepak Patil
4 years, 3 months ago

Sort by: