text:
Home

The Six Pillars of Calculus

A picture is worth 1000 words

Trigonometry Review

The basic trig functions
Basic trig identities
The unit circle
Addition of angles, double and half angle formulas
The law of sines and the law of cosines
Graphs of Trig Functions

Exponential Functions

Exponentials with positive integer exponents
Fractional and negative powers
The function $f(x)=a^x$ and its graph
Exponential growth and decay

Logarithms and Inverse functions

Inverse Functions
How to find a formula for an inverse function
Logarithms as Inverse Exponentials
Inverse Trig Functions

Intro to Limits

Overview
Definition
One-sided Limits
When limits don't exist
Infinite Limits
Summary

Limit Laws and Computations

Limit Laws
Intuitive idea of why these laws work
Two limit theorems
How to algebraically manipulate a 0/0?
Indeterminate forms involving fractions
Limits with Absolute Values
Limits involving indeterminate forms with square roots
Limits of Piece-wise Functions
The Squeeze Theorem

Continuity and the Intermediate Value Theorem

Definition of continuity
Continuity and piece-wise functions
Continuity properties
Types of discontinuities
The Intermediate Value Theorem
Summary of using continuity to evaluate limits

Limits at Infinity

Limits at infinity and horizontal asymptotes
Limits at infinity of rational functions
Which functions grow the fastest?
Vertical asymptotes (Redux)
Summary and selected graphs

Rates of Change

Average velocity
Instantaneous velocity
Computing an instantaneous rate of change of any function
The equation of a tangent line
The Derivative of a Function at a Point

The Derivative Function

The derivative function
Sketching the graph of $f'$
Differentiability
Notation and higher-order derivatives

Basic Differentiation Rules

The Power Rule and other basic rules
The derivative of $e^x$

Product and Quotient Rules

The Product Rule
The Quotient Rule

Derivatives of Trig Functions

Necessary Limits
Derivatives of Sine and Cosine
Derivatives of Tangent, Cotangent, Secant, and Cosecant
Summary

The Chain Rule

Two Forms of the Chain Rule
Version 1
Version 2
Why does it work?
A hybrid chain rule

Implicit Differentiation

Introduction
Examples
Derivatives of Inverse Trigs via Implicit Differentiation
A Summary

Derivatives of Logs

Formulas and Examples
Logarithmic Differentiation

In Physics
In Economics
In Biology

Related Rates

Overview
How to tackle the problems

Linear Approximation and Differentials

Overview
Examples
An example with negative $dx$

Differentiation Review

How to take derivatives
Basic Building Blocks
Product and Quotient Rules
The Chain Rule
Combining Rules
Implicit Differentiation
Logarithmic Differentiation
Conclusions and Tidbits

Absolute and Local Extrema

Definitions
The Extreme Value Theorem
Critical Numbers
Steps to Find Absolute Extrema

The Mean Value and other Theorems

Rolle's Theorems
The Mean Value Theorem
Finding $c$

$f$ vs. $f'$

Increasing/Decreasing Test and Critical Numbers
Process for finding intervals of increase/decrease
The First Derivative Test
Concavity
Concavity, Points of Inflection, and the Second Derivative Test
The Second Derivative Test
Visual Wrap-up

Indeterminate Forms and L'Hospital's Rule

What does $\frac{0}{0}$ equal?
Examples
Indeterminate Differences
Indeterminate Powers
Three Versions of L'Hospital's Rule
Proofs

Strategies
Another Example

Newton's Method

The Idea of Newton's Method
An Example
Solving Transcendental Equations
When NM doesn't work

Anti-derivatives

Antiderivatives
Common antiderivatives
Initial value problems
Antiderivatives are not Integrals

The Area under a curve

The Area Problem and Examples
Riemann Sum Notation
Summary

Definite Integrals

Definition of the Integral
Properties of Definite Integrals
What is integration good for?
More Applications of Integrals

The Fundamental Theorem of Calculus

Three Different Concepts
The Fundamental Theorem of Calculus (Part 2)
The Fundamental Theorem of Calculus (Part 1)
More FTC 1

The Indefinite Integral and the Net Change

Indefinite Integrals and Anti-derivatives
A Table of Common Anti-derivatives
The Net Change Theorem
The NCT and Public Policy

Substitution

Substitution for Indefinite Integrals
Examples to Try
Revised Table of Integrals
Substitution for Definite Integrals
Examples

Area Between Curves

Computation Using Integration
To Compute a Bulk Quantity
The Area Between Two Curves
Horizontal Slicing
Summary

Volumes

Slicing and Dicing Solids
Solids of Revolution 1: Disks
Solids of Revolution 2: Washers
More Practice

Chain Rule

Composition of Functions

We define a composite (or compound) function of $x$ as a function that is "composed" of two functions;  one function depends on the other function that depends on $x$, namely $y= f(g(x))$.   The notation you may have seen before is $y=(f \circ g)(x)=f(g(x))$.  Suppose that we have variables $x$, $y$, and $u$, and that $y = f(u)$ and $u = g(x)$.  (Previously we called $u=g(x)$ the inside part of $f(g(x))$.)  Then $f$ is a composite function of $x$.

DO:  Find $f$ and $g$ and write as $f(g(x))$ in the following examples in order to familiarize yourself with the notation.  Determine the inside part and outside part of each.

Examples
1. $y=\sin(x^2)$ is a composite function with $u=x^2$ and $y=\sin(u)$.

2. $y=\sin^2(x)$ is a composite function with $u=\sin(x)$ and $y=u^2$.

3. $y=e^{3x}$ is a composite function with $u=3x$ and $y=e^u$.

4. $y=(x^2 + 4x + 7)^5$ is a composite function with $u=x^2 + 4x + 7$ and $y=u^5$.

Version 2 of the chain rule says that

 $$\frac{dy}{dx} = \frac{dy}{du} \frac{du}{dx}$$

Note that $\displaystyle \frac{dy}{dx}$ is the same as $\displaystyle{\frac{d}{dx}\Big(f\big(g(x)\big)\Big)}$, that $\displaystyle{\frac{dy}{du}} = f'(u)=f'(g(x))$, and that $\displaystyle{\frac{du}{dx}}$ is the same thing as $g'(x)$. So Version 2 says the exact same thing as Version 1.

Let's see how it applies to our examples above.

DO:  After looking at the first example, try to do others before looking at the solutions.  You will learn much more by trying and doing than by reading.  While you read, write down what you are thinking and what is happening.

Example 1: If $y=\sin(x^2)$, then $u=x^2$ so that $y=\sin(u)$.

Then $\dfrac{du}{dx} =2x$, and $\dfrac{dy}{du}=\cos(u)$. All together, we have $$\frac{dy}{dx} = \frac{dy}{du}\frac{du}{dx}=\cos(u)\cdot2x = \cos(x^2)\cdot 2x.$$

Example 2: If $y = \sin^2(x)$, then $u=\sin(x)$ so that $y=u^2$.

Then $\dfrac{du}{dx}=\cos(x)$, and $\dfrac{dy}{du}=2u$. All together, we have $$\frac{dy}{dx} = \frac{dy}{du}\frac{du}{dx}=2u\cdot \cos(x) = 2\sin(x)\cos(x).$$

Example 3: If $y=e^{3x}$, then $u=3x$ so that $y=e^u$.

Then $\dfrac{du}{dx}=3$, and $\dfrac{dy}{du}=e^u$. All together, we have $$\frac{dy}{dx}= \frac{dy}{du}\frac{du}{dx} =e^u\cdot3 = 3 e^{3x}.$$

Example 4: If $y=(x^2 + 4x + 7)^5$, then $u=x^2+4x + 7$ so that $y=u^5$.

Then $\dfrac{du}{dx}=2x+4$, and $\dfrac{dy}{du} = 5u^4$. All together we have $$\frac{dy}{dx} = \frac{dy}{du}\frac{du}{dx} = 5u^4(2x+4)=5(x^2+4x+7)^4(2x+4).$$

DO:  Try all these examples using version 1,  $(f(g(x)))'=f'(g(x))g'(x)$, just for practice.


text:
# zbMATH — the first resource for mathematics

Sur le groupe des automorphismes d’un $$T^n$$-fibre principal. (French) Zbl 0346.57015

##### MSC:
 57S15 Compact Lie groups of differentiable transformations 53C15 General geometric structures on manifolds (almost complex, almost product structures, etc.) 55Q05 Homotopy groups, general; sets of homotopy classes 57S25 Groups acting on specific manifolds 58D99 Spaces and manifolds of mappings (including nonlinear versions of 46Exx)

format: plain


text:
Electrostatics - Charge Density

1. Nov 5, 2008

Herbststurm

Hi,

if we only have an electrostatic potential given. How to calculate the charge density?

I know of course Maxwell equation, here without any time dependence, but I missed always some further specifications, or I forget something important

thanks
greetings

2. Nov 5, 2008

Ben Niehoff

Use Laplace's equation (derived from Gauss's Law):

$$-\nabla^2 \Phi = \rho / \epsilon_0$$

3. Nov 5, 2008

clem

That's Poisson, not Laplace.

4. Nov 6, 2008

Herbststurm

Thanks, that helps a lot.

I knew Poissons equation, but I forgot it. Damn... :grumpy:

Greetings


text:
# Determine the resistance of metal tube in term of the external diameter D, the internal diameter d , the length l and the resistivity. Calculate the resistance of a copper tube 0.5cm thick and 2m long. The external diameter is 10cm

Determine the resistance of metal tube in term of the external diameter D, the internal diameter d , the length l and the resistivity. Calculate the resistance of a copper tube 0.5cm thick and 2m long. The external diameter is 10cm
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Ragazzonibw
Given:
The external diameter of tube D = 10 cm. = 0.1 m.
The thickness of the tube t = 0.5 cm = 0.005 m.
The length of the tube l = 2 m.
The resistivity of copper
The cross section area of tube will be,

The resistance of the metal tube will be,
$R=\rho \frac{l}{A}\phantom{\rule{0ex}{0ex}}R=1.68×20.05977\phantom{\rule{0ex}{0ex}}R=56.215\mathrm{\Omega }$
The resistance of the tube is $=56.215\mathrm{\Omega }$


text:
# May 2015 Archives

## The Tripods Are Here!

Last time we discussed the polytope method, a multivariate function minimisation algorithm that seeks out a local minimum by stepping away from the worst of a set of points, most commonly a simplex; the multivariate generalisation of a triangle.

We got as far as implementing an algorithm for generating regular simplices of any size and location with ak.simplex and in this post we shall finish the job.

Full text...

## The Tripods Are Coming!

Some time ago we took a first look at multivariate function minimisation in which we try to find a point at which a two or more argument function has a local minimum, or in other words a point at which it returns a value no greater than it does at any nearby points.
The approach that we took was that of a blindfolded hill climber; take a tentative step in some direction and if it leads to a better place commit to it, otherwise stay where you are and try again. Our ak.blindfoldMinimum implemented the simplest of such hill climbing algorithms, choosing each trial step at random. We concluded that we should do much better if we chose those steps more intelligently and in this post we shall do just that.

Full text...

### Gallimaufry

 AKCalc ECMA Endarkenment Turning Sixteen

This site requires HTML5, CSS 2.1 and JavaScript 5 and has been tested with

 Chrome 26+ Firefox 20+ Internet Explorer 9+


text:
# Italics in question titles: $math$ or *asterisks*?

I noticed when editing Is there any *mathematical* basis for the Bayesian vs frequentist debate? that entering italicized text in the title field is problematic. The markup *asterisks* = asterisks doesn't have the desired effect

What is the correct way to italicize text in the titles? Do we prefer $math$ = $math$ or *asterisks* = *asterisks*? Is there something better? Should we avoid markup in titles altogether?

Should we edit question titles with markup to conform to our chosen style?

• In general, it's probably best to avoid it in titles. – Glen_b Nov 10 '16 at 3:17
• Why is it so bad? – innisfree Nov 10 '16 at 5:53
• Abusing TeX markup to write italic text is $really$ awful - primarily because the font does not match, but more generally because syntactically it does not make sense:  denote a mathematical expression and nothing else. – amoeba Nov 10 '16 at 7:27
• My question asks about the preferred method of italicizing text in titles. I'm not advocating dollar sigms. The previous comments indicate that italics in titles are bad style. Why? – innisfree Nov 10 '16 at 7:56
• meta.stackexchange.com/questions/237125/… – innisfree Nov 10 '16 at 8:29
• I see that you found it by yourself, but: indeed, we don't support markdown in titles, sorry. – Konamiman Nov 10 '16 at 8:38
• @amoeba: In addition, compare e.g. effect & $effect$ - the spacing's all wrong in the latter if it's supposed to be a word. – Scortchi - Reinstate Monica Nov 10 '16 at 9:03
• @Konamiman right, so should asterisks/dollars for italics be removed in titles? Should we edit qs and delete the asterisks/dollars that were intended for emphasis/italics? Same question for other unsupported markup eg bold. – innisfree Nov 10 '16 at 10:18
• @Scortchi That's right, even though one could circumvent it with $\textit{effect}$: $\textit{effect}$. This would of course look horrible when un-rendered as e.g. in any google search. – amoeba Nov 10 '16 at 10:38
• One could of course argue that the unrendered *mathematical* (or _mathematical_) is nevertheless following a common convention for showing emphasis in plain text. On the other hand, even in print there seems to be a widespread aversion to using italics in titles. – Scortchi - Reinstate Monica Nov 10 '16 at 10:59
• I'm a bit confused with the responses and downvote. I'm not recommending using italics, or any particular implementation of italics, in titles. I'm asking about the preferred implementation if a question uses italics in the title, and whether we should edit titles with markup to conform to our preferred style. – innisfree Nov 10 '16 at 11:47
• As you perhaps know, on Meta the convention's that a down-vote indicates disagreement with a proposal rather than a low opinion of the question's quality. All the same I can't tell exactly what proposal the down-voter's disagreeing with. The comments are germane - they don't fully answer your question, but that's not the role of comments. – Scortchi - Reinstate Monica Nov 10 '16 at 12:27
• See also Are the questions with TeX markup in titles excluded from Hot Network Questions?. (The answer's "yes".) – Scortchi - Reinstate Monica Nov 10 '16 at 13:09
• Note also that <i>word</i> (word) doesn't work in titles either. I'll say that I am not personally opposed to italics in titles, but it doesn't seem to be done & people seem to abhor the very idea of it, so maybe it's best to just go along to get along here. – gung - Reinstate Monica Nov 10 '16 at 13:58
• @Scortchi The answer is "no": I have personally seen TeX markup in titles in the Hot Network Questions; at least twice. It is not rendered (i.e. displayed as $blabla$) and looks pretty awful especially if the formula is complicated. I remember it very well because I was wondering if I should write a Meta.SE question suggesting to turn TeX rendering on there. In the end I did not report it, but I am positive that I have seen it more than once. The questions were, I believe, from Math.SE. – amoeba Nov 10 '16 at 20:06

Briefly summarizing the discussion in the comments above.

Using LaTeX markup to write in italic in titles is a dirty hack that should really be avoided:

1. It does not look good because of the wrong font and wrong kerning: e.g. $effect$ renders as $effect$ instead of effect. Kerning can be fixed by writing $\textit{effect}$: $\textit{effect}$, but the font remains serif.

2. It will only be rendered on our own site. In Google searches this will appear as plain text leaving many people wondering what the heck these dollar signs are supposed to mean.

3. It ruins the logic of the markup which is (i) bad in itself, and (ii) can produce all sorts of weird effects on non-standard devices such as e.g. for blind people.

Standard markdown markup (asterisks or underscores) will not work in titles. Avoid it too.

1. Writing *effect* or _effect_ in the title will leave it unrendered and this is not going to change, see Can we get markdown support in Question's title field?. So it is a bit pointless.

2. One could argue, as @Scortchi notes, that unrendered *effect* or _effect_ is nevertheless following a common convention for showing emphasis in plain text. So if appearing in Google search, it will not be very confusing. Therefore I'd say one can use it but only in exceptional circumstances when emphasis is really crucially important.

3. Indeed, as @Scortchi also notes, even in print there seems to be a widespread aversion to using italics in titles.

so should asterisks/dollars for italics be removed in titles? Should we edit qs and delete the asterisks/dollars that were intended for emphasis/italics?

I think dollars should be removed, yes. Asterisks are to be avoided but can stay if they make sense.

• (+1) I'd go so far as to say we should try to avoid LaTeX in titles altogether. Unlike on Mathematics, there are few questions here that really call for it. [I've just looked through some that do use it: the majority introduce variables that aren't defined till the body of the question (if they're ever defined); & most of the others are really maths questions.] – Scortchi - Reinstate Monica Nov 15 '16 at 9:24
• I agree that we should "try to avoid" LaTeX in titles, but I think sometimes it's really the most clear and concise way to formulate the title, and so can be tolerated. I have posted some questions with some TeX in the titles and would not want to edit it out (I checked now). These are indeed often "maths questions", but we have a lot of maths questions that are on topic here. – amoeba Nov 15 '16 at 11:53
• Yes - in fact I changed "avoid" to "try to avoid" for just that reason. (And I didn't mean to imply that maths questions were off-topic; rather that they're the only ones for which the variables don't need to be defined.) Taking a couple of your questions as examples: (1) "What exactly does $\dot\sim$ notation mean?" is a case where LaTeX is more than warranted. (2) "What measure of effect size in ANOVA has mode at zero under the null (unlike $\eta^2$ that does not)?" makes me wonder if "eta-squared" mightn't be easier for search engines to find as well as to preview. – Scortchi - Reinstate Monica Nov 15 '16 at 12:41
• I'd add that $\TeX$ does not display properly in titles and comments on the mobile app, yet another reason to avoid it. – Tim Nov 16 '16 at 13:04


text:
# Above Ground Pool Ideas On A Budget with Deck

Above Ground Pool Ideas – Having a swimming pool in your own backyard is absolute heaven. How wonderful it is to be able to swim laps or to just take a quick dip on a hot day, all without leaving home.

When you have your own pool you don’t have to pack up your swim gear, towels and a cooler and drive to the local public pool or beach just to get some relief from the heat.

When considering which type of pool to install, you have several different options. First of all, you need to decide whether you want an in-ground pool or an above ground pool.

If you want your own swimming pool without breaking the bank, an above ground pool may be the better option, although they offer less versatility.

Above ground pools usually come pre-constructed, with various components that are intended to be put together on site.

The beauty of this is that these components are fairly simple to work with. But, like everything else the quality will vary depending on your budget for the project.

In addition to an above ground pool ideas being more affordable, it is usually the best choice if you have a small back yards or one that slopes, which limits your usable space.

You’re going to need a lot more space in your yard if you want an in-ground pool, so you may have no choice but to install an above ground pool if space is limited.

At any rate, there are a lot of decking ideas that you can use to make your above-ground pool look spectacular and the focal point of your back yard.

You can add a raised deck to your pool in many different styles to integrate your above-ground pool with your back yard landscaping.

## Multi-Level Deck Stairs

If you have limited space, you can add steps to expand your patio into a multi-leveled deck to surround your above ground pool.

## Above Ground Pool Ideas with Deck and Fencing

If you’re really ambitious, build a raised enclosure for an above ground pool. You can have a beautiful fenced-in pool inside a gated backyard, as shown in the above photo.

This deck was built on a solid platform surrounding the entire pool to create a private area for entertaining family and friends. To enhance the look, you can add container gardens, patio furniture and lounge chairs.

When you have enough deck space for extra towels, pool toys, and coolers, the whole family can hang out for hours on end without returning to the house for food and supplies.

The above ground pool in this photo looks like a permanent structure, since the deck is so large that it fully surrounds the pool. This is quite unusual for above ground pools.

## Semi Above Ground Pool Ideas

The expansive dark wooden pool deck makes this whole area very relaxing. With a deck this large you have ample room to add plant containers, built-in seating, patio furniture, lounges and anything else you want.

The white coping around the pool in the above photo is the only thing that gives you the idea that this is an above ground pool.

Otherwise, this shows that with serious planning, you can have an above ground pool that people just assume is an in-ground pool.

In this case, the steps are part of the design of the deck, so everything rises up to meet the level of the pool.

## Small Backyard Above Ground Pool Ideas On A Budget

For those who want to keep things simple, a basic circular above ground pool does the trick. There is no need to build an elaborate deck with stairs.

The pool in the above photo is a stand-alone model and all that’s added is the wooden paneling on the outside. A simple pool ladder, which will come with the kit, is all you need to access the pool.

## Intex Above Ground Pool Ideas and Nearby Hot Tub

You can have an above ground pool along with a separate hot tub, as shown in the photo above. You will notice that the hot tub (in the lower right corner) is covered.

These homeowners built their deck around their trees, maintaining their landscaping and giving them plenty of shade.

## A Custom-Built Abutment

In abutting this above ground pool against an existing patio, the homeowners avoided the cost of an in-ground pool, while achieving the same look from the house.

On the opposite side of the pool they added wooden paneling to enhance the look.

## Totally Fenced In

These homeowners used their creativity to build a place to hide their bright blue above ground pool by building a fence to totally surround it.

They added the cinderblock stairs and some tall grasses for interest, and then built a small deck at the top out of two-by-fours. Fantastic!!

## Stacked Stones Enhance The Look

For those of you who are confident about your stone-stacking skills, you can build a stacked-stone wall around the outside of your above ground pool.

Then further enhance it with a similarly built retaining wall a few feet from the pool’s perimeter. If you don’t have the confidence to DIY, then my advice would be to call in a professional.

## Backyard Above Ground Pool Ideas Landscaping

Creating a lush green garden around an above ground pool is the most popular way to enhance its appearance.

To do this right, you need to avoid planting flowers and instead use plants that are easy to maintain. There are many different varieties of shrubs and tall grasses to choose from.

Once planted, spread mulch on the ground for a smooth look and to extend the life of the plants. You’re going to need to keep the ants and termites away by regularly spraying, so don’t forget!

## DIY Tiki Bar

If you have one of those big round blue pools in your backyard, you may want to camouflage it with reed fencing around the outer edge.

The homeowners here used twine to attach it to the pool and for the Tiki bar; they converted an old wooden palette. Brilliant DIY job, wouldn’t you say?

## Landscaping Above Ground Pool Ideas with Deck

This is one more example of an above ground pool deck built to accommodate the landscaping. Notice how the deck rises to ensure the pool is level where the ground slopes down (on the left side of photo).

## Intex Above Ground Pool Ideas on Hillside

This San Antonio, Texas home is on hilly ground to say the least. In order to connect this above-ground pool to the home above, a multi-level wooden deck had to be custom built.

The deck was built with an anti-slip surface so that swimmers can safely go in and out of the pool.

## Backyard Above Ground Pool Ideas with Deck and Bridge

The above ground pool in this photo is enhanced with a deck and a bridge that leads from the house out to the pool.

The entire structure blends perfectly with the landscape and by adding the potted flowering plants, the whole look is enhanced.

## Oval Shaped with Double Deck

In the photo above you can see that the homeowners cordoned off their pool area with a glass fencing to keep their entire deck from getting wet.

Within the pool area you have lounge chairs and a small table with chairs, but on the other “dry” side you have a much larger patio table for more formal meals.

## Intex Above Ground Pool Ideas for Small Yards

This circular above ground pool is very basic, with just a small deck built on one end of the pool. As it is, this fairly small pool takes up a good portion of this mid-sized backyard.

This shows that with an in-ground pool in this setting, you really wouldn’t have much backyard left.

## Neshanic Decking with Deck

This above ground pool has a beautiful wooden deck and fence surrounding the entire pool, making it look very much like an in-ground pool.

## Pool Stands

Most people just assume that a swimming pool must be dug in the ground and they never consider how gorgeous many above ground pools are.

Here you can see how a pool like this can be beautifully trimmed in wood to blend in perfectly with the landscaping. Deck Pool and Olympic-Eagle above ground pools are particularly good quality and long lasting.

Above ground pools are not affected as much as in-ground pools by ground water and terrain issues.

For example: sloping yards, high water tables, clay soil, rocky terrain, and standing water can all damage in-ground pools.

Furthermore, winter weather can cause a myriad of problems for in-ground pools yet Deck-Pool and Olympic Eagle pools remain unaffected by these issues.

## Pro and Cons Above Ground Pool Ideas for Small Yards

In making your decision, it might be wise to analyze the pros and cons of installing an above ground swimming pool:

No.

### Cons

1 Affordable – An above ground pool is dramatically less expensive than the same size in-ground pool. If you compare prices you will find that an in-ground pool could end up costing you many times more than the cost of installing an above ground pool. Shorter lifetime – An above ground pool will only last you about 7-15 years before you will notice the structure giving out. If you are thinking of this as a permanent fixture in your yard, you need to know that the structure will have to be replaced periodically. The expected lifetime of an in-ground pool is 20+ years, so by comparison an above ground pool really is temporary.
2 Easy to construct – Above ground pools can be built quite easily. In most cases you will not need to hire a professional contractor to do the work. The parts are all pre-constructed and they come with very clear instructions, so just about anyone can put it all together. Less durability – Because the sides of an above ground pool are out in the open they are exposed to all the elements, which means they could be damaged. These walls are not built to withstand a lot of abuse, so this must be factored into your decision.
3 Requires less space – The amount of space needed for an above ground pool is a lot less than the amount of space you would need in your yard for an in-ground pool. So, if you have a fairly small yard, or one that slopes, an above ground pool makes sense. Fairly shallow – An above ground pool will not have the depth of an in-ground pool since they are only four feet deep. In-ground pool will typically have a shallow end that slopes down towards the deep end, which can go as deep as you want to dig the hole.
4 Less upkeep – An above ground pool will be so much easier to take care of so that the water is swimmable than an in-ground pool. You won’t have all the drains and the complicated cleaning routine that often requires a professional to deal with. Above ground pools also require much less preparation when you’re heading into winter. Limited aesthetically – Although the quality of above ground increases all the time and they are becoming more versatile, their aesthetic appeal is quite limited. They tend to be much smaller than an in-ground pool and you have few options when it comes to shape, just round, rectangle or oval.

Another advantage of having an above ground pool is that they require a lot less maintenance.

I’m not saying they are maintenance free, but you’ll spend a lot less time and money taking care of an above ground pool than you would an in-ground pool.

Very often, above ground pools are surrounded by a raised deck that includes seating areas. One of the most attractive aspects of above ground pools is that you can disassemble them if you sell your house and move.

However, it may be more difficult to dismantle and move your deck, not to mention the landscaping.

### Cost Estimation

If you’re considering an above ground pool and planning on doing the installation yourself you can purchase a kit for anywhere from $1,500 to$4,500. The price is largely determined by the size and quality of the pool.

To have a professional come out and install the pool, it would cost you another $1,000 to$3,000 or thereabouts.

Many people like the idea of having a deck built around their above-ground pool, and of course that adds to the cost.

In actuality, there are quite a few different accessories that are routinely added onto above ground pools.

In fact, you can find countless ways to creatively make your pool fit in with the rest of your yard aesthetically with decks, various levels of landscaping and steps.


text:
# 8 people meet, and each person shakes every other person's hand once. How many handshakes occurred?

Your answer is $8 \cdot 7$
$56$ handshakes occur in ths event.


text:
# What is the difference between these two derivative expressions?

is there a difference between $\frac{\partial^2 }{\partial x^2}$ and $(\frac{\partial }{\partial x})^{2}$? I have to tell if a differential equation is linear, and $(\frac{\partial }{\partial x})^{2}$ concerns me. If it's the same thing as second derivative, the equation would be linear.

-
Same thing; it means the operator $\partial / \partial x$ applied twice. –  anon Apr 1 '12 at 20:27
the notation $\frac{\partial^2 }{\partial x^2}f~~$ means $\frac{\partial }{\partial x}(\frac{\partial }{\partial x}f)$, so $\frac{\partial^2 }{\partial x^2}f~~$ and $(\frac{\partial }{\partial x})^{2}f~~$ is the same both you apply $\frac{\partial }{\partial x}$ twice.


text:
OpenKattis
popup15 hemtal 12 [converted from problem group]

Start

2015-01-17 15:00 AKST

popup15 hemtal 12 [converted from problem group]

End

2016-01-17 15:00 AKST
The end is near!
Session is over.
Not yet started.
Session is starting in -2190 days 10:05:17

8760:00:00

0:00:00

Problem HQuantum

At the Institution for Bits and Bytes at University of Ramville, Prof. Jeremy Longword and his eight graduate students are investigating a brand new way of storing and manipulating data on magnetic disks for use in hard drives. The method is based on letting quasimagnetic quantum operations operate on the sectors on the disk, and is, of course, safer and more reliable than any earlier invented storage method. The use of each quantum operation costs a certain amount of energy, and the more energy the storage unit consumes, the warmer it will get. Therefore, you and your research team, are assigned the task of writing a program that, given sets of possible quantum operations and their costs, can calculate the lowest possible total cost for transforming a set of data to the wanted result.

On the disk, binary words of length $1\leq L\leq 20$ are treated. The quantum operations are defined by strings of the same length as the binary words, and are built from the four letters N (does nothing), F (inverts one bit), S (sets a bit to 1), and C (resets a bit to 0). Each letter in the string corresponds to an operation on the bit in the binary word at the same position. The binary words are transformed one by one and the total energy cost for the transformation is calculated as the sum of the costs for the performed quantum operations.

Input

The input starts with a single positive integer $N \leq 20$ on a row, deciding the number of test cases that will follow. Then, for each of the test cases:

• One line containing three integers: $L$, $n_{op}$ and $n_ w$ separated by one space.

• $L$ indicates the length of the binary words and the quantum operations.

• $n_{op} (\leq 32)$ is the number of quantum operations that are available for use when transforming the binary words.

• $n_ w (\leq 20)$ is the number of binary words that are to be transformed in the current test case.

After this, $n_{op}$ rows follows, each of them containing the definition of a quantum operation followed by the energy cost $0\leq c_ i \leq 1000$ of carrying out the quantum operation. The definition and the cost are separated by a single space.

Finally, there are $n_ w$ rows, each containing two binary words separated by a single space. The first of these words should, when possible, be transformed to the second using the quantum operations. The binary words are expressed as sequences of 1’s and 0’s. After these rows, the next test case follows, if there is any.

Output

Each test case should produce a row containing a list of the energy costs of transforming each of the binary words. The costs should be separated by a single space and presented in the same order as the corresponding input. When there is no successful way of transforming a binary word, “NP” (meaning not possible) should be printed instead.

Sample Input 1 Sample Output 1
2
4 3 3
NFFN 1
NFNF 2
NNFN 4
0010 0100
0001 0010
0100 1000
4 4 5
CFSF 4
NNSS 3
FFFF 5
FNFN 6
1111 0000
1001 0110
0101 1000
1000 0011
0000 1001

1 3 NP
5 4 8 9 9


text:
## 2. Variance and Higher Moments

Recall that by taking the expected value of various transformations of a random variable, we can measure many interesting characteristics of the distribution of the variable. In this section, we will study expected values that measure spread, skewness and other properties.

### Variance

#### Definitions

As usual, we start with a random experiment with probability measure $$\P$$ on an underlying sample space. Suppose that $$X$$ is a random variable for the experiment, taking values in $$S \subseteq \R$$. Recall that $$\E(X)$$, the expected value (or mean) of $$X$$ gives the center of the distribution of $$X$$. The variance of $$X$$ is a measure of the spread of the distribution about the mean and is defined by

$\var(X) = \E\left([X - \E(X)]^2\right)$

Recall that the second moment of $$X$$ about $$a$$ is $$\E[(X - a)^2]$$. Thus, the variance is the second moment of $$X$$ about $$\mu = \E(X)$$, or equivalently, the second central moment of $$X$$. Second moments have a nice interpretation in physics, if we think of the distribution of $$X$$ as a mass distribution in $$\R$$. Then the second moment of $$X$$ about $$a$$ is the moment of inertia of the mass distribution about $$a$$. This is a measure of the resistance of the mass distribution to any change in its rotational motion about $$a$$. In particular, the variance of $$X$$ is the moment of inertia of the mass distribution about the center of mass $$\mu$$.

Suppose that $$X$$ has a discrete distribution with probability density function $$f$$ and mean $$\mu$$. Then

$\var(X) = \sum_{x \in S} (x - \mu)^2 f(x)$
Proof:

This follows from the discrete version of the change of variables theorem

Suppose that $$X$$ has a continuous distribution with probability density function $$f$$ and mean $$\mu$$. Then

$\var(X) = \int_S (x - \mu)^2 f(x) dx$
Proof:

This follows from the continuous version of the change of variables formula.

The standard deviation of $$X$$ is the square root of the variance. It also measures dispersion about the mean but has the same physical units as the variable $$X$$.

$\sd(X) = \sqrt{\var(X)}$

When the random variable $$X$$ is understood, the standard deviation is often denoted by $$\sigma$$, so that the variance is $$\sigma^2$$.

#### Properties

The following exercises give some basic properties of variance, which in turn rely on basic properties of expected value. As usual, we assume that the stated expected values exist. Our first result is a variance formula that is usually better than the definition for computational purposes.

$$\var(X) = \E(X^2) - [\E(X)]^2$$.

Proof:

Let $$\mu = \E(X)$$. Using the linearity of expected value we have

$\var(X) = \E(X - \mu)^2 = \E(X^2 - 2 \mu X + \mu^2) = \E(X^2) - 2 \mu \E(X) + \mu^2 = \E(X^2) - 2 \mu^2 + \mu^2 = \E(X^2) - \mu^2$

Variance is always nonnegative, since its the expected value of a nonnegative random variable. Moreover, any random variable that really is random (not a constant) will have strictly positive variance.

The nonnegative property.

1. $$\var(X) \ge 0$$
2. $$\var(X) = 0$$ if and only if $$\P(X = c) = 1$$ for some constant $$c$$ (and then of course, $$\E(X) = c$$).
Proof:

These results follow from the basic inequality properties of expected value. Let $$\mu = \E(X)$$. First $$(X - \mu)^2 \ge 0$$ with probability 1 so $$\E[(X - \mu)^2] \ge 0$$. In addition, $$\E[(X - \mu)^2] = 0$$ if and only if $$\P(X = \mu) = 1$$.

Our next result shows how the variance and standard deviation are changed by a linear transformation of the random variable. In particular, note that variance, unlike general expected value, is not a linear operation. This is not really surprising since the variance is the expected value of a nonlinear function of the variable.

If $$a$$ and $$b$$ are constants then

1. $$\var(a + b X) = b^2 \, \var(X)$$
2. $$\sd(a + b X) = |b| \, \sd(X)$$
Proof:

Let $$\mu = \E(X)$$. By linearity, $$\E(a + b X) = a + b \mu$$. Hence $$\var(a + b X) = \E\left([(a + b X) - (a + b \mu)]^2\right) = \E\left(b^2 (X - \mu)^2\right) = b^2 \var(X)$$. Part (b) follows from (a) by taking square roots.

Recall that when $$b \gt 0$$, the linear transformation $$x \mapsto a + b \, x$$ is called a location-scale transformation and often corresponds to a change of location and change of scale in the physical units. For example, the change from inches to centimeters in a measurement of length is a scale transformation, and the change from Fahrenheit to Celsius in a measurement of temperature is both a location and scale transformation. The previous result shows that when a location-scale transformation is applied to a random variable, the standard deviation does not depend on the location parameter, but is multiplied by the scale factor.

The random variable $$Z$$ given below has mean 0 and variance 1:

$Z = \frac{X - \E(X)}{\sd(X)}$
Proof:

This result follows from the previous theorem. Let $$\mu = \E(X)$$ and $$\sigma = \sd(X)$$ so that $$Z = \frac{1}{\sigma} (X - \mu)$$. Then $$\E(Z) = \frac{1}{\sigma} [\E(X) - \mu] = 0$$ and $$\var(Z) = \frac{1}{\sigma^2} \var(X) = 1$$.

The random variable $$Z$$ in Exercise 6 is sometimes called the standard score associated with $$X$$. Since $$X$$ and its mean and standard deviation all have the same physical units, the standard score $$Z$$ is dimensionless. It measures the directed distance from $$\E(X)$$ to $$X$$ in terms of standard deviations.

Let $$Z$$ denote the standard score of $$X$$, and suppose that $$Y = a + b X$$ where $$a, \; b \in \R$$ and $$b \ne 0$$. If $$b \gt 0$$, the standard score of $$Y$$ is $$Z$$ and if $$b \lt 0$$, the standard score of $$Y$$ is $$-Z$$.

Proof:

$$E(Y) = a + b \E(X)$$ and $$\sd(Y) = |b| \sd(X)$$. Hence

$\frac{Y - \E(Y)}{\sd(Y)} = \frac{b}{|b|} \frac{X - \E(X)}{\sd(X)}$

As just noted, when $$b \gt 0$$, the variable $$Y = a + b X$$ is a location-scale transformation and often corresponds to a change of physical units. Since the standard score is dimensionless, it's reasonable that the standard scores of $$X$$ and $$Y$$ are the same. On the other hand, when $$X \ge 0$$, the ratio of standard deviation to mean is called the coefficient of variation. This quantity also is dimensionless, and is sometimes used to compare variability for random variables with different means.

$\text{cv}(X) = \frac{\sd(X)}{\E(X)}$

#### Chebyshev's Inequality

Chebyshev's inequality (named after Pafnuty Chebyshev) gives an upper bound on the probability that a random variable will be more than a specified distance from its mean. This is often useful in applied problems where the distribution is unknown, but the mean and variance are at least approximately known. In the following two exercises, suppose that $$X$$ is a real-valued random variable with mean $$\mu = \E(X)$$ and standard deviation $$\sigma = \sd(X)$$.

Chebyshev's inequality:

$\P(|X - \mu| \ge t) \le \frac{\sigma^2}{t^2}, \quad t \gt 0$
Proof:

From Markov's inequality, $$\P(|X - \mu| \ge t) = \P[(X - \mu)^2 \ge t^2] \le \E[(X - \mu)^2] / t^2 = \sigma^2 / t^2$$ .

An alternate version of Chebyshev's inequality is

$\P(|X - \mu| \ge k \sigma) \le \frac{1}{k^2}, \quad k \gt 0$
Proof:

Let $$t = k \sigma$$ in the first version of Chebyshev's inequality.

The usefulness of the Chebyshev inequality comes from the fact that it holds for any distribution (assuming only that the mean and variance exist). The tradeoff is that for many specific distributions, the Chebyshev bound is rather crude. Note in particular that in the last exercise, the bound is useless when $$k \le 1$$, since 1 is an upper bound for the probability of any event.

### Examples and Applications

#### Indicator Variables

Suppose that $$X$$ is an indicator variable with $$p = \P(X = 1)$$, where $$p \in [0, 1]$$. Then

1. $$\E(X) = p$$
2. $$\var(X) = p (1 - p)$$
Proof:

We proved part (a) in the section on expected value, although the result is so simple that the derivation is trivial. For part (b), note that $$X^2 = X$$ since $$X$$ only takes values 0 and 1. Hence $$\E(X^2) = p$$ and therefore $$\var(X) = p - p^2 = p (1 - p)$$.

The graph of $$\var(X)$$ as a function of $$p$$ is a parabola, opening downward, with roots at 0 and 1. Thus the minimum value of $$\var(X)$$ is 0, and occurs when $$p = 0$$ and $$p = 1$$ (when $$X$$ is deterministic). The maximum value is $$\frac{1}{4}$$ and occurs when $$p = \frac{1}{2}$$.

#### Uniform Distributions

Suppose that $$X$$ has the discrete uniform distribution on $$\{m, m+1, \ldots, n\}$$ where $$m \le n$$. Then

1. $$\E(X) = \frac{1}{2}(m + n)$$.
2. $$\var(X) = \frac{1}{12}(n - m)(n - m + 2)$$.

Suppose that $$X$$ has the continuous uniform distribution on the interval $$[a, b]$$ where $$a \lt b$$. Then

1. $$\E(X) = \frac{1}{2}(a + b)$$
2. $$\var(X) = \frac{1}{12}(b - a)^2$$

Note that in both the discrete and continuous cases, the variance depends only on the length of the interval.

#### Dice

Recall that a fair die is one in which the faces are equally likely. In addition to fair dice, there are various types of crooked dice. Here are three:

• An ace-six flat die is a six-sided die in which faces 1 and 6 have probability $$\frac{1}{4}$$ each while faces 2, 3, 4, and 5 have probability $$\frac{1}{8}$$ each.
• A two-five flat die is a six-sided die in which faces 2 and 5 have probability $$\frac{1}{4}$$ each while faces 1, 3, 4, and 6 have probability $$\frac{1}{8}$$ each.
• A three-four flat die is a six-sided die in which faces 3 and 4 have probability $$\frac{1}{4}$$ each while faces 1, 2, 5, and 6 have probability $$\frac{1}{8}$$ each.

A flat die, as the name suggests, is a die that is not a cube, but rather is shorter in one of the three directions. The particular probabilities that we use ($$\frac{1}{4}$$ and $$\frac{1}{8}$$) are fictitious, but the essential property of a flat die is that the opposite faces on the shorter axis have slightly larger probabilities that the other four faces. Flat dice are sometimes used by gamblers to cheat. In the following problems, you will compute the mean and variance for each of the various types of dice. Be sure to compare the results.

A standard, fair die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\E(X)$$
2. $$\var(X)$$
1. $$\frac{7}{2}$$
2. $$\frac{35}{12}$$

An ace-six flat die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\E(X)$$
2. $$\var(X)$$
1. $$\frac{7}{2}$$
2. $$\frac{15}{4}$$

A two-five flat die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\E(X)$$
2. $$\var(X)$$
1. $$\frac{7}{2}$$
2. $$\frac{11}{4}$$

A three-four flat die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\E(X)$$
2. $$\var(X)$$
1. $$\frac{7}{2}$$
2. $$\frac{9}{4}$$

In the dice experiment, select one die. Run the experiment 1000 times and note the apparent convergence of the empirical mean and standard deviation to the distribution mean and standard deviation in each of the following cases:

1. Fair die
2. Ace-six flat die
3. Two-five flat die
4. Three-four flat die

#### The Poisson Distribution

Recall that the Poisson distribution has probability density function

$f(n) = e^{-a} \, \frac{a^n}{n!}, \quad n \in \N$

where $$a \gt 0$$ is a parameter. The Poisson distribution is named after Simeon Poisson and is widely used to model the number of random points in a region of time or space; the parameter $$a$$ is proportional to the size of the region. The Poisson distribution is studied in detail in the chapter on the Poisson Process.

Suppose that $$N$$ has the Poisson distribution with parameter $$a$$. Then

1. $$\E(N) = a$$
2. $$\var(N) = a$$
Proof:

Part (a) was shown in the section on expected value. For part (b), we compute the second factorial moment:

$\E[N (N - 1)] = \sum_{n=1}^\infty n (n - 1) e^{-a} \frac{a^n}{n!} = \sum_{n=2}^\infty e^{-a} \frac{a^n}{(n - 2)!} = e^{-a} a^2 \sum_{n=2}^\infty \frac{a^{n-2}}{(n - 2)!} = a^2 e^{-a} e^a = a^2$

Hence, $$E(N^2) = \E[N(N - 1)] + \E(N) = a^2 + a$$, so finally $$\var(N) = (a^2 + a) - a^2 = a$$.

Thus, the parameter is both the mean and the variance of the distribution.

In the Poisson experiment, the parameter is $$a = r \, t$$. Vary the parameter and note the size and location of the mean-standard deviation bar. For selected values of the parameter, run the experiment 1000 times and note the apparent convergence of the empirical mean and standard deviation to the distribution mean and standard deviation.

#### The Geometric Distribution

Recall that the geometric distribution on $$\N_+$$ is a discrete distribution with probability density function

$f(n) = p \, (1 - p)^{n - 1}, \quad n \in \N_+$

where $$p \in (0, 1]$$ is a parameter. The geometric distribution governs the trial number of the first success in a sequence of Bernoulli trials with success parameter $$p$$.

Suppose that $$N$$ has the geometric distribution on $$\N_+$$ with success parameter $$p$$. Then

1. $$\E(N) = \frac{1}{p}$$
2. $$\var(N) = \frac{1 - p}{p^2}$$
Proof:

We proved part (a) in the section on expected value. For part (b) we will compute the second factorial moment. Thus

$\E[N(N - 1)] = \sum_{n = 2}^\infty n (n - 1) (1 - p)^{n-1} p = p(1 - p) \frac{d^2}{dp^2} \sum_{n=0}^\infty (1 - p)^n = p (1 - p) \frac{d^2}{dp^2} \frac{1}{p} = p (1 - p) \frac{2}{p^3} = \frac{2 (1 - p)}{p^2}$

Hence $$\E(N^2) = \E[N(N - 1)] + \E(N) = 2 / p^2 - 1 / p$$ and hence $$\var(X) = 2 / p^2 - 1 / p - 1 / p^2 = 1 / p^2 - 1 / p$$.

Note that the variance is 0 when $$p = 1$$, not surprising since $$X$$ is deterministic in this case.

In the negative binomial experiment, set $$k = 1$$ to get the geometric distribution . Vary $$p$$ with the scroll bar and note the size and location of the mean-standard deviation bar. For selected values of $$p$$, run the experiment 1000 times and note the apparent convergence of the empirical mean and standard deviation to the distribution mean and standard deviation.

Suppose that $$N$$ has the geometric distribution with parameter $$p = \frac{3}{4}$$. Compute the true value and the Chebyshev bound for the probability that $$N$$ is at least 2 standard deviations away from the mean.

1. $$\frac{1}{16}$$
2. $$\frac{1}{4}$$

#### The Exponential Distribution

Recall that the exponential distribution is a continuous distribution with probability density function

$f(t) = r \, e^{-r \, t}, \quad 0 \le t \lt \infty$

where $$r \gt 0$$ is the with rate parameter. This distribution is widely used to model failure times and other arrival times. The exponential distribution is studied in detail in the chapter on the Poisson Process.

Suppose that $$T$$ has the exponential distribution with rate parameter $$r$$. Then

1. $$\E(T) = \frac{1}{r}$$.
2. $$\var(T) = \frac{1}{r^2}$$.

Thus, for the exponential distribution, the mean and standard deviation are the same.

In the gamma experiment, set $$k = 1$$ to get the exponential distribution. Vary $$r$$ with the scroll bar and note the size and location of the mean-standard deviation bar. For selected values of $$r$$, run the experiment 1000 times and note the apparent convergence of the empirical mean and standard deviation to the distribution mean and standard deviation.

Suppose that $$X$$ has the exponential distribution with rate parameter $$r \gt 0$$. Compute the true value and the Chebyshev bound for the probability that $$X$$ is at least $$k$$ standard deviations away from the mean.

1. $$e^{-(k+1)}$$
2. $$\frac{1}{k^2}$$

#### The Pareto Distribution

Recall that the Pareto distribution is a continuous distribution with probability density function

$f(x) = \frac{a}{x^{a + 1}}, \quad 1 \le x \lt \infty$

where $$a \gt 0$$ is a parameter. The Pareto distribution is named for Vilfredo Pareto. It is a heavy-tailed distribution that is widely used to model financial variables such as income. The Pareto distribution is studied in detail in the chapter on Special Distributions.

Suppose that $$X$$ has the Pareto distribution with shape parameter $$a$$. Then

1. $$\E(X) = \infty$$ if $$0 \lt a \le 1$$
2. $$\E(X) = \frac{a}{a - 1}$$ if $$1\lt a \lt \infty$$
3. $$\var(X)$$ is undefined if $$0 \lt a \le 1$$
4. $$\var(X) = \infty$$ if $$1 \lt a \le 2$$
5. $$\var(X) = \frac{a}{(a - 1)^2 (a - 2)}$$ if $$2 \lt a \lt \infty$$

In the special distribution simuator, select the Pareto distribution. Vary $$a$$ with the scroll bar and note the size and location of the mean/standard deviation bar. For each of the following values of $$a$$, run the experiment 1000 times and note the behavior of the empirical mean and standard deviation.

1. $$a = 1$$
2. $$a = 2$$
3. $$a = 3$$

#### The Normal Distribution

Recall that the standard normal distribution is a continuous distribution with density function

$\phi(z) = \frac{1}{\sqrt{2 \pi}} e^{-\frac{1}{2} z^2}, \quad z \in \R$

Normal distributions are widely used to model physical measurements subject to small, random errors and are studied in detail in the chapter on Special Distributions.

Suppose that $$Z$$ has the standard normal distribution. Then

1. $$\E(Z) = 0$$
2. $$\var(Z) = 1$$
Proof:

We showed that $$\E(Z) = 0$$ in the section on properties of expected value. Hence $$\var(Z) = \E(Z^2) = \int_{-\infty}^\infty z^2 \phi(z) \, dz$$. Integrate by parts with $$u = z$$ and $$dv = z \phi(z) \, dz$$. Thus, $$du = dz$$ and $$v = -\phi(z)$$. Hence

$\var(Z) = -z \phi(z) \bigg|_{-\infty}^\infty + \int_{-\infty}^\infty \phi(z) \, dz = 0 + 1$

Suppose again that $$Z$$ has the standard normal distribution and that $$\mu \in (-\infty, \infty)$$ and $$\sigma \in (0, \infty)$$. Recall that $$X = \mu + \sigma Z$$ has the normal distribution with location parameter $$\mu$$ and scale parameter $$\sigma$$. Then

1. $$\E(X) = \mu$$
2. $$\var(X) = \sigma^2$$
Proof:

These results follow directly from Theorem 5: $$\E(X) = \mu + \sigma \E(Z) = \mu + 0 = \mu$$ and $$\var(X) = \sigma^2 \E(Z) = \sigma^2 \cdot 1 = \sigma^2$$.

Thus, as the notation suggests, the location parameter $$\mu$$ is also the mean and the scale parameter $$\sigma$$ is also the standard deviation.

In the special distribution simulator, select the normal distribution. Vary the parameters and note the shape and location of the mean-standard deviation bar. For selected parameter values, run the experiment 1000 times and note the apparent convergence of the empirical mean and standard deviation to the distribution mean and standard deviation.

#### Beta Distributions

The distributions in this subsection belong to the family of beta distributions, which are widely used to model random proportions and probabilities. The beta distribution is studied in detail in the chapter on Special Distributions.

Graph the density functions below and compute the mean and variance of each.

1. $$f(x) = 6 \, x \, (1 - x)$$ for $$0 \le x \le 1$$
2. $$f(x) = 12 \, x^2 \, (1 - x)$$ for $$0 \le x \le 1$$
3. $$f(x) = 12 \, x \, (1 - x)^2$$ for $$0 \le x \le 1$$
4. $$f(x) = \frac{1}{\pi \sqrt{x (1 - x)}}$$ for $$0 \lt x \lt 1$$
1. $$\E(X) = \frac{1}{2}$$, $$\var(X) = \frac{1}{20}$$
2. $$\E(X) = \frac{3}{5}$$, $$\var(X) = \frac{1}{25}$$
3. $$\E(X) = \frac{2}{6}$$, $$\var(X) = \frac{1}{25}$$
4. $$\E(X) = \frac{1}{2}$$, $$\var(X) = \frac{1}{8}$$

The particular beta distribution in part (d) is also known as the arcsine distribution.

#### Exercises on Basic Properties

Suppose that $$X$$ is a real-valued random variable with $$\E(X) = 5$$ and $$\var(X) = 4$$. Find each of the following:

1. $$\var(3 X - 2)$$
2. $$\E(X^2)$$
1. $$36$$
2. $$29$$

Suppose that $$X$$ is a real-valued random variable with $$\E(X) = 2$$ and $$\E[X(X - 1) = 8]$$. Find each of the following:

1. $$\E(X^2)$$
2. $$\var(X)$$
1. $$10$$
2. $$6$$

The expected value $$\E[X(X - 1)]$$ is an example of a factorial moment.

Suppose that $$X_1$$ and $$X_2$$ are independent, real-valued random variables with $$\E(X_i) = \mu_i$$ and $$\var(X_i) = \sigma_i^2$$ for $$i \in \{1, 2\}$$. Then

$\var(X_1 X_2) = (\sigma_1^2 + \mu_1^2) (\sigma_2^2 + \mu_2^2) - \mu_1^2 \mu_2^2$

Marilyn Vos Savant has an IQ of 228. Assuming that the distribution of IQ scores has mean 100 and standard deviation 15, find Marilyn's standard score.

$$z = 8.53$$

### Higher Moments

Suppose that $$X$$ is a real-valued random variable. Recall again that the variance of $$X$$ is the second moment of $$X$$ about the mean, and measures the spread of the distribution of $$X$$ about the mean. The third and fourth moments of $$X$$ about the mean also measure interesting features of the distribution. The third moment measures skewness, the lack of symmetry, while the fourth moment measures kurtosis, the degree to which the distribution is peaked. The actual numerical measures of these characteristics are standardized to eliminate the physical units, by dividing by an appropriate power of the standard deviation. As usual, we assume that all expected values given below exist, and we will let $$\mu = \E(X)$$ and $$\sigma^2 = \var(X)$$. We assume that $$\sigma \gt 0$$, so that the random variable is really random.

#### Skewness

The skewness of $$X$$ is the third moment of the standard score $$Z = (X - \mu) / \sigma$$:

$\skew(X) = \E\left[\left(\frac{X - \mu}{\sigma}\right)^3\right]$

The distribution of $$X$$ is said to be positively skewed, negatively skewed or unskewed depending on whether $$\skew(X)$$ is positive, negative, or 0. In the unimodal case, if the distribution is positively skewed then the probability density function has a long tail to the right, and if the distribution is negatively skewed then the probability density function has a long tail to the left.

Suppose that the distribution of $$X$$ is symmetric about $$a$$. That is, the distribution of $$a - X$$ is the same as the distribution of $$X - a$$. Then

1. $$\E(X) = a$$
2. $$\skew(X) = 0$$.
Proof:

We proved part (a) in the section on Properties of Expected Value. Thus, $$\skew(X) = \E[(X - a)^3] / \sigma^3$$. But by symmetry and linearity, $$\E[(X - a)^3] = \E[(a - X)^3] = - \E[(X - a)^3]$$, so it follows that $$\E[(X - a)^3] = 0$$.

$$\skew(X)$$ can be expressed in terms of the moments of $$X$$.

$\skew(X) = \frac{\E(X^3) - 3 \mu \E(X^2) + 2 \mu^3}{\sigma^3}$
Proof:

$$(X - \mu)^3 = X^3 - 3 X^2 \mu + 3 X \mu^2 - \mu^3$$. From the linearity of expected value we have

$\E[(X - \mu)^3] = \E(X^3) - 3 \mu \E(X^2) + 3 \mu^2 \E(X) - \mu^3 = E(X^3) - 3 \mu \E(X^2) + 2 \mu^3$

Since skewness is defined in terms of an odd power of the standard score, it's invariant under a linear transformation with positve slope (a location-scale transformation of the distribution). On the other hand, if the slope is negative, skewness changes sign.

Suppose that $$a \in \R$$ and $$b \in \R \setminus \{0\}$$. Then

$\skew(a + b X) = \begin{cases} \skew(X), & b \gt 0 \\ -\skew(X), & b \lt 0 \end{cases}$
Proof:

This follows directly from the definition and Theorem 29.

#### Kurtosis

The kurtosis of $$X$$ is the fourth moment of the standard score $$Z = (X - \mu) / \sigma$$:

$\kurt(X) = \E\left[\left(\frac{X - \mu}{\sigma}\right)^4\right]$

Kurtosis comes from the Greek word for bulging. In the unimodal case, the probability density function of a distribution with large kurtosis has a sharper peak and fatter tails, compared with the probability density function of a distribution with smaller kurtosis.

$$\kurt(X)$$ can be expressed in terms of the moments of $$X$$.

$\kurt(X) = \frac{\E(X^4) - 4 \mu \E(X^3) + 6 \mu^2 \E(X^2) - 3 \mu^4}{\sigma^4}$
Proof:

$$(X - \mu)^4 = X^4 - 4 X^3 \mu + 6 X^2 \mu^2 - 4 X \mu^3 + \mu^4$$. From linearity of expected value, we have

$\E[(X - \mu)^4 = \E(X^4) - 4 \mu \E(X^3) + 6 \mu^2 \E(X^2) - 4 \mu^3 \E(X) + \mu^4 = \E(X^4) - 4 \mu \E(X^3) + 6 \mu^2 \E(X^2) - 3 \mu^4$

Since kurtosis is defined in terms of an even power of the standard score, it's invariant under linear transformations.

Suppose that $$a \in \R$$ and $$b \in \R \setminus\{0\}$$. Then $$\kurt(a + b X) = \kurt(X)$$.

Proof:

This follows directly from the definition and Theorem 29.

You will show in Exercise 48 below that the kurtosis of the standard normal distribution is 3. Using the standard normal distribution as a benchmark, the excess kurtosis of a random variable $$X$$ is defined to be $$\kurt(X) - 3$$. Some authors use the term kurtosis to mean what we have defined as excess kurtosis.

### Computational Exercises

#### Indicator Variables

In Exercise 9 you computed the mean and variance of an indicator variable. In the next exercise, you will complement the analysis by computing the skewness and kurtosis.

Suppose that $$X$$ is an indicator variable with $$\P(X = 1) = p$$, where $$0 \lt p \lt 1$$. Then

1. $$\skew(X) = \frac{1 - 2 p}{\sqrt{p (1 - p)}}$$
2. $$\kurt(X) = \frac{1 - 3 p + 3 p^2}{p (1 - p)}$$

#### Dice

Recall the definitions of fair, ace-six flat, two-five flat, and three-four flat dice given earlier. In the following problems you will compute the skewness and kurtosis for the various types of dice. Be sure to compare the results.

A standard, fair die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$0$$
2. $$\frac{303}{175}$$

An ace-six flat die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$0$$
2. $$\frac{37}{25}$$

An two-five flat die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$0$$
2. $$\frac{197}{121}$$

A three-four flat die is thrown and the score $$X$$ is recorded. Sketch the graph of the probability density function and compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$0$$
2. $$\frac{59}{27}$$

#### Continuous Distributions

Suppose that $$X$$ has uniform distribution on the interval $$[a, b]$$. Compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$0$$
2. $$\frac{1296}{5} \frac{1}{(b - a)^4}$$

Suppose that $$X$$ has the exponential distribution with rate parameter $$r \gt 0$$. Compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$2 r^3$$
2. $$9 r^4$$

Suppose that $$X$$ has the Pareto distribution with shape parameter $$a \gt 4$$. Compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$\frac{2(a + 1)(a - 2)^2 (a - 1)^3}{a^2(a - 3)}$$
2. $$\frac{3(3 a^2 + a _ 2)(1 - 2)^3 (a - 1)^4}{a^3 (a - 3)(a - 4)}$$

Suppose that $$Z$$ has the standard normal distribution. Compute each of the following:

1. $$\skew(X)$$
2. $$\kurt(X)$$
1. $$0$$
2. $$3$$

Graph the following probability density functions and compute the mean, variance, skewness and kurtosis of each distribution. The distributions are all members of the family of beta distributions; the last one is also known as the arcsine distribution.

1. $$f(x) = 6 x (1 - x)$$ for $$0 \le x \le 1$$
2. $$f(x) = 12 x^2 (1 - x)$$ for $$0 \le x \le 1$$
3. $$f(x) = 12 x (1 - x)^2$$ for $$0 \le x \le 1$$
4. $$f(x) = \frac{1}{\pi \sqrt{x (1 - x)}}$$ for $$0 \lt x \lt 1$$
1. $$\E(X) = \frac{1}{2}$$, $$\var(X) = \frac{1}{20}$$, $$\skew(X) = 0$$, $$\kurt(X) = \frac{15}{7}$$
2. $$\E(X) = \frac{3}{5}$$, $$\var(X) = \frac{1}{25}$$, $$\skew(X) = -\frac{2}{7}$$, $$\kurt(X) = \frac{33}{14}$$
3. $$\E(X) = \frac{2}{5}$$, $$\var(X) = \frac{1}{25}$$, $$\skew(X) = \frac{2}{7}$$, $$\kurt(X) = \frac{33}{14}$$
4. $$\E(X) = \frac{1}{2}$$, $$\var(X) = \frac{1}{8}$$, $$\skew(X) = 0$$, $$\kurt(X) = 96$$

### Vector Space Concepts

Variance and higher moments are related to the concept of norm and distance in the theory of vector spaces. This connection can help unify and illuminate some of the ideas.

Our vector space $$\mathscr{V}$$ consists of all real-valued random variables defined on a fixed probability space $$(\Omega, \mathscr{F}, \P)$$ (that is, relative to a given random experiment). Recall that two random variables are equivalent if they are equal with probability 1. We consider two such random variables as the same vector, so that technically, our vector space consists of equivalence classes under this equivalence relation. The addition operator corresponds to the usual addition of two real-valued random variables, and the operation of scalar multiplication corresponds to the usual multiplication of a real-valued random variable by a real (non-random) number.

#### Norm

Let $$X$$ be a real-valued random variable. For $$k \ge 1$$, we define the $$k$$-norm by

$\|X\|_k = \left[\E(|X|^k)\right]^{1 / k}$

Thus, $$\|X\|_k$$ is a measure of the size of $$X$$ in a certain sense. The following exercises establish the fundamental properties.

For $$X \in \mathscr{V}$$,

1. $$\|X\|_k \ge 0$$
2. $$\|X\|_k = 0$$ if and only if $$\P(X = 0) = 1$$ (so that $$X$$ is equivalent to 0).
Proof:

These results follow from the basic inequality properties of expected value. First $$|X|^k \ge 0$$ with probability 1, so $$\E(|X|^k) \ge 0$$. In addition, $$\E(|X|^k) = 0$$ if and only if $$\P(X = 0) = 1$$.

$$\|c X\|_k = |c| \, \|X\|_k$$ for $$X \in \mathscr{V}$$ and $$c \in \R$$.

Proof: $\| c X \|_k = [\E(|c X|^k]^{1 / k} = [\E(|c|^k |X|^k)]^{1/k} = [|c|^k \E(|X|^k)]^{1/k} = |c| [\E(|X|^k)]^{1/k} = |c| \|X\|_k$

The next exercise gives Minkowski's inequality, named for Hermann Minkowski. It is also known as the triangle inequality.

$$\|X + Y\|_k \le \|X\|_k + \|Y\|_k$$ for $$X \in \mathscr{V}$$ and $$Y \in \mathscr{V}$$ .

Proof:

The first quadrant $$S = \{(x, y) \in \R^2: x \ge 0, \; y \ge 0\}$$ is a convex set and $$g(x, y) = (x ^{1/k} + y^{1/k})^k$$ is concave on $$S$$. From Jensen's inequality, if $$U$$ and $$V$$ are nonnegative random variables, then

$\E\left[(U^{1/k} + V^{1/k})^k\right] \le \left([\E(U)]^{1/k} + [\E(V)]^{1/k}\right)^k$

Letting $$U = |X|^k$$ and $$V = |Y|^k$$ and simplifying gives the result. To show that $$g$$ really is concave on $$S$$, we can compute the second partial derivatives. Let $$h(x, y) = x^{1/k} + y^{1/k}$$ so that $$g = h^k$$. Then

\begin{align} g_{xx} & = \frac{k-1}{k} h^{k-2} x^{1/k - 2}(x^{1/k} - h) \\ g_{yy} & = \frac{k-1}{k} h^{k-2} y^{1/k - 2}(y^{1/k} - h) \\ g_{xy} & = \frac{k-1}{k} h^{k-2} x^{1/k - 1} y^{1/k - 1} \end{align}

Clearly $$h(x, y) \ge x^{1/k}$$ and $$h(x, y) \ge y^{1/k}$$ for $$x \ge 0$$ and $$y \ge 0$$, so $$g_{xx}$$and $$g_{yy}$$, the diagonal entries of the second derivative matrix, are nonpositive on $$S$$. A little algebra shows that the determinant of the second derivative matrix $$g_{xx} g_{yy} - g_{xy}^2 = 0$$ on $$S$$. Thus, the second derivative matrix of $$g$$ is negative semi-definite.

It follows from Exercises 51-53 that the set of random variables with finite $$k$$th moment forms a subspace of our parent vector space $$\mathscr{V}$$, and that the $$k$$-norm really is a norm on this vector space:

$\mathscr{V}_k = \{X \in \mathscr{V}: \|X\|_k \lt \infty\}$

Our next exercise gives Lyapunov's inequality, named for Aleksandr Lyapunov. This inequality shows that the $$k$$-norm of a random variable is increasing in $$k$$.

If $$j \le k$$ then $$\|X\|_j \le \|X\|_k$$ for $$X \in \mathscr{V}$$.

Proof:

Note that $$S = \{x \in \R: x \ge 0\}$$ is convex and $$g(x) = x^{k/j}$$ is convex on $$S$$. From Jensen's inequality, if $$U$$ is a nonnegative random variable then $$[\E(U)]^{k/j} \le \E(U^{k/j})$$. Letting $$U = |X|^j$$ and simplifying gives the result.

Lyapunov's inequality shows that if $$j \le k$$ and $$X$$ has a finite $$k$$th moment, then $$X$$ has a finite $$j$$th moment as well. Thus, $$\mathscr{V}_k$$ is a subspace of $$\mathscr{V}_j$$.

Suppose that $$X$$ is uniformly distributed on the interval $$[0, 1]$$.

1. Find $$\|X\|_k$$.
2. Graph $$\|X\|_k$$ as a function of $$k$$.
3. Find $$\lim_{k \to \infty} \|X\|_k$$.
1. $$\frac{1}{(k + 1)^{1/k}}$$
2. 1

Suppose that $$X$$ has probability density function $$f(x) = \frac{a}{x^{a+1}}$$ for $$1 \le x \lt \infty$$, where $$a \gt 0$$ is a parameter. Thus, $$X$$ has the Pareto distribution with shape parameter $$a$$.

1. Find $$\|X\|_k$$.
2. Graph $$\|X\|_k$$ as a function of $$k \lt a$$.
3. Find $$\lim_{k \uparrow a} \|X\|_k$$.
1. $$\left(\frac{a}{a -k}\right)^{1/k}$$ if $$k \lt a$$, $$\infty$$ if $$k \ge a$$
2. $$\infty$$

Suppose that $$(X, Y)$$ has probability density function $$f(x, y) = x + y$$ for $$0 \le x \le 1$$, $$0 \le y \le 1$$. Verify Minkowski's inequality.

1. $$\|X + Y\|_k = \left(\frac{2^{k+2} - 2}{(k + 2)(k + 3)}\right)^{1/k}$$
2. $$\|X\|_k + \|Y\|_k = 2 \left(\frac{1}{k + 2} + \frac{1}{2(k + 1)}\right)^{1/k}$$

#### Distance

The $$k$$-norm, like any norm on a vector space, can be used to measure distance; we simply compute the norm of the difference between two vectors. Thus, we define the $$k$$-distance (or $$k$$-metric) between real-valued random variables $$X$$ and $$Y$$ to be

$d_k(X, Y) = \|X - Y\|_k = \left[\E(|X - Y|^k)\right]^{1/k}$

The properties in the following exercises are analogies of the properties in Exercises 51-53 (and thus very little additional work is required for the proofs). These properties show that the $$k$$-metric really is a metric on $$\mathscr{V}_k$$.

Suppose that $$X, \; Y \in \mathscr{V}$$. Then

1. $$d_k(X, Y) \ge 0$$
2. $$d_k(X, Y) = 0$$ if and only if $$\P(X = Y) = 1$$ (so that $$X$$ and $$Y$$ are equivalent).
Proof:

These results follow directly from Theorem 51.

$$d_k(X, Y) = d_k(Y, X)$$ for $$X, \; Y \in \mathscr{V}$$.

$$d_k(X, Z) \le d_k(X, Y) + d_k(Y, Z)$$ for $$X, \; Y, \; Z \in \mathscr{V}$$ (this is another version of the triangle inequality).

Proof:

From Minkowski's inequality (Theorem 53),

$d_k(X, Z) = \|X - Z\|_k = \|(X - Y) + (Y - Z) \|_k \le \|X - Y\|_k + \|Y - Z\|_k = d_k(X, Y) + d_k(Y, Z)$

Thus, the standard deviation is simply the 2-distance from $$X$$ to its mean $$\mu = \E(X)$$:

$\sd(X) = d_2(X, \mu) = \|X - \mu\|_2 = \sqrt{\E[(X - \mu)^2]}$

and the variance is the square of this. More generally, the $$k$$th moment of $$X$$ about $$a$$ is simply the $$k$$th power of the $$k$$-distance from $$X$$ to $$a$$. The 2-distance is especially important for reasons that will become clear below and in the next section. This distance is also called the root mean square distance.

Measures of center and measures of spread are best thought of together, in the context of a measure of distance. For a real-valued random variable $$X$$, we first try to find the constants $$t \in \R$$ that are closest to $$X$$, as measured by the given distance; any such $$t$$ is a measure of center relative to the distance. The minimum distance itself is the corresponding measure of spread.

Let us apply this procedure to the 2-distance. Thus, we define the root mean square error function by

$d_2(X, t) = \|X - t\|_2 = \sqrt{\E[(X - t)^2]}, \quad t \in \R$

$$d_2(X, t)$$ is minimized when $$t = \E(X)$$ and that the minimum value is $$\sd(X)$$.

Proof:

Note that the minimum value of $$d_2(X, t)$$ occurs at the same points as the minimum value of $$d_2^2(X, t) = \E[(X - t)^2]$$ (this is the mean square error function). Expanding and taking expected values term by term gives

$\E[(X - t)^2 = \E(X^2) - 2 t \E(X) + t^2$

This is a quadratic function of $$t$$ and hence the graph is a parabola opening upward. The minimum occurs at $$t = \E(X)$$, and the minimum value is $$\var(X)$$. Hence the minimum value of $$t \mapsto d_2(X, t)$$ also occurs at $$t = \E(X)$$ and the minimum value is $$\sd(X)$$.

The physical interpretation of this result is that the moment of inertia of the mass distribution of $$X$$ about $$t$$ is minimized when $$t = \mu$$, the center of mass.

In the error function applet, select the root mean square error function. Click on the $$x$$-axis to generate an empirical distribution, and note the shape and location of the graph of the error function.

Next, let us apply our procedure to the 1-distance. Thus, we define the mean absolute error function by

$d_1(X, t) = \|X - t\|_1 = \E[|X - t|]$

We will show that $$d_1(X, t)$$ is minimized when $$t$$ is any median of $$X$$. (Recall that the set of medians of $$X$$ forms a closed, bounded interval.) We start with a discrete case, because it's easier and has special interest.

Suppose that $$X$$ has a discrete distribution with values in a finite set $$S \subseteq \R$$. Then $$d_1(X, t)$$ is minimized when $$t$$ is any median of $$X$$.

Proof:

Note first that $$\E(|X - t|) = \E(t - X, \, X \le t) + \E(X - t, \, X \gt t)$$. Hence $$\E(|X - t|) = a_t \, t + b_t$$, where $$a_t = 2 \, \P(X \le t) - 1$$ and where $$b_t = \E(X) - 2 \, \E(X, \, X \le t)$$. Note that $$\E(|X - t|)$$ is a continuous, piecewise linear function of $$t$$, with corners at the values in $$S$$. That is, the function is a linear spline. Let $$m$$ be the smallest median of $$X$$. If $$t \lt m$$ and $$t \notin S$$, then the slope of the linear piece at $$t$$ is negative. Let $$M$$ be the largest median of $$X$$. If $$t \gt M$$ and $$t \notin S$$, then the slope of the linear piece at $$t$$ is positive. If $$t \in (m, M)$$ then the slope of the linear piece at $$t$$ is 0. Thus $$\E(|X - t|)$$ is minimized for every $$t$$ in the median interval $$[m, M]$$.

The last exercise shows that mean absolute error has a couple of basic deficiencies as a measure of error:

• The function may not be smooth (differentiable).
• The function may not have a unique minimizing value of $$t$$.

Indeed, when $$X$$ does not have a unique median, there is no compelling reason to choose one value in the median interval, as the measure of center, over any other value in the interval.

In the error function applet, select the mean absolute error function. Click on the $$x$$-axis to generate an empirical distribution, and note the shape and location of the graph of the error function.

Let $$X$$ be an indicator random variable with $$\P(X = 1) = p$$, where $$0 \le p \le 1$$. Graph $$\E(|X - t|)$$ as a function of $$t \in \R$$ in each of the cases below. In each case, find the minimum value of the function and the values of $$t$$ where the minimum occurs.

1. $$p \lt \frac{1}{2}$$
2. $$p = \frac{1}{2}$$
3. $$p \gt \frac{1}{2}$$
1. The minimum is $$p$$ and occurs at $$t = 0$$.
2. The minimum is $$\frac{1}{2}$$ and occurs for $$t \in [0, 1]$$
3. The minimum is $$1 - p$$ and occurs at $$t = 1$$

Suppose now that $$X$$ has a general distribution on $$\R$$. Then $$d_1(X, t)$$ is minimized when $$t$$ is any median of $$X$$.

Proof:

Suppose that $$s \lt t$$. Computing the expected value over the events $$X \le s$$, $$s \lt X \le t$$, and $$X \ge t$$, and simplifying gives

$\E(|X - t|) = \E(|X - s|) + (t - s) \, [2 \, \P(X \le s) - 1] + 2 \, \E(t - X, \, s \lt X \le t)$

Suppose that $$t \lt s$$. Using similar methods gives

$\E(|X - t|) = \E(|X - s|) + (t - s) \, [2 \, \P(X \lt s) - 1] + 2 \, \E(X - t, \, t \le X \lt s)$

Note that the last terms on the right in these equations are nonnegative. If we take $$s$$ to be a median of $$X$$, then the middle terms on the right in the equations are also nonnegative. Hence if $$s$$ is a median of $$X$$ and $$t$$ is any other number then $$\E(|X - t|) \ge \E(|X - s|)$$.

Suppose that $$X$$ is uniformly distributed on the interval $$[0, 1]$$. Find $$d_1(X, t) = \E(|X - t|)$$ as a function of $$t$$ and sketch the graph. Find the minimum value of the function and the value of $$t$$ where the minimum occurs.

Suppose that $$X$$ is uniformly distributed on the set $$[0, 1] \cup [2, 3]$$. Find $$d_1(X, t) = \E(|X - t|)$$ as a function of $$t$$ and sketch the graph. Find the minimum value of the function and the values of $$t$$ where the minimum occurs.

#### Convergence

Whenever we have a measure of distance, we automatically have a criterion for convergence. Let $$(X_1, X_2, \ldots)$$ and $$X$$ be real-valued random variables defined on the same sample space (that is, defined for the same random experiment). We say that $$X_n \to X$$ as $$n \to \infty$$ in $$k$$th mean if

$d_k(X_n, X) = \|X_n - X\|_k \to 0 \text{ as } n \to \infty$

or equivalently

$\E(|X_n - X|^k) \to 0 \text{ as } n \to \infty$

When $$k = 1$$, we simply say that $$X_n \to X$$ as $$n \to \infty$$ in mean; when $$k = 2$$, we say that $$X_n \to X$$ as $$n \to \infty$$ in mean square. These are the most important special cases.

If $$j \lt k$$, then $$X_n \to X$$ as $$n \to \infty$$ in $$k$$th mean implies $$X_n \to X$$ as $$n \to \infty$$ in $$j$$th mean.

Proof:

This follows from Lyapunov's inequality: $$0 \le d_j(X_n, X) \le d_k(X_n, X) \to 0$$ as $$n \to \infty$$.

Our next sequence of exercises shows that convergence in mean is stronger than convergence in probability.

If $$X_n \to X$$ as $$n \to \infty$$ in mean, then $$X_n \to X$$ as $$n \to \infty$$ in probability.

Proof:

This follows from Markov's inequality. For $$\epsilon \gt 0$$, $$0 \le \P(|X_n - X| \gt \epsilon) \le \E(|X_n - X|) / \epsilon \to 0$$ as $$n \to \infty$$.

The converse is not true. Moreover, convergence with probability 1 does not imply convergence in $$k$$th mean and convergence in $$k$$th mean does not imply convergence with probability 1. The next two exercises give some counterexamples.

Suppose that $$(X_1, X_2, \ldots)$$ is a sequence of independent random variables with

$\P(X = n^3) = \frac{1}{n^2}, \; \P(X_n = 0) = 1 - \frac{1}{n^2}; \quad n \in \N_+$
1. $$X_n \to 0$$ as $$n \to \infty$$ with probability 1.
2. $$X_n \to 0$$ as $$n \to \infty$$ in probability.
3. $$\E(X_n) \to \infty$$ as $$n \to \infty$$.
Proof:

Part (a), follows from the basic characterization of convergence with probability 1: $$\sum_{n=1}^\infty \P(X_n \gt \epsilon) = \sum_{n=1}^\infty 1 / n^2 \lt \infty$$ for $$0 \lt \epsilon \lt 1$$. Part (b) follows since convergence with probability 1 implies convergence in probability. For (c), note that $$\E(X_n) = n^3 / n^2 = n$$ for $$n \in \N_+$$.

Suppose that $$(X_1, X_2, \ldots)$$ is a sequence of independent indicator random variables with

$\P(X_n = 1) = \frac{1}{n}, \; \P(X_n = 0) = 1 - \frac{1}{n}; \quad n \in \N_+$
1. $$\P(X_n = 0 \text{ for infinitely many } n) = 1$$.
2. $$\P(X_n = 1 \text{ for infinitely many } n) = 1$$.
3. $$\P(X_n \text{ does not converge as } n \to \infty) = 1$$.
4. $$X_n \to 0$$ as $$n \to \infty$$ in $$k$$th mean for every $$k \ge 1$$.
Proof:

Parts (a) and (b), follow from the second Borel-Cantelli lemma since $$\sum_{n=1}^\infty \P(X_n = 1) = \sum_{n=1}^\infty 1 / n = \infty$$ and $$\sum_{n=1}^\infty \P(X_n = 0) = \sum_{n=1}^\infty (1 - 1 / n) = \infty$$. Part (c) follows from parts (a) and (b). For part (d) note that $$\E(X_n) = 1 / n \to 0$$ as $$n \to \infty$$.

The implications in the various modes of convergence are shown below; no other implications hold in general.

### Related Topics

For a related statistical topic, see the section on the Sample Variance in the chapter on Random Samples. The variance of a sum of random variables is best understood in terms of a related concept known as covariance, that will be studied in detail in the next section.


text:
# Isolation Level

We are currently refactoring our documentation. Please excuse any problems you may find and report them here.

Isolation is one of the ACID (Atomicity, Consistency, Isolation, Durability) properties. It determines how transaction integrity is visible to other users and systems. For example, when a user is creating a Purchase Order and has created the header, but not the Purchase Order lines, is the header available for other systems/users (carrying out concurrent operations, such as a report on Purchase Orders) to see?

A lower isolation level increases the ability of many users to access the same data at the same time, but increases the number of concurrency effects (such as dirty reads or lost updates) users might encounter. Conversely, a higher isolation level reduces the types of concurrency effects that users may encounter, but requires more system resources and increases the chances that one transaction will block another.

Most DBMSs offer a number of transaction isolation levels, which control the degree of locking that occurs when selecting data. For many database applications, the majority of database transactions can be constructed to avoid requiring high isolation levels (e.g. SERIALIZABLE level), thus reducing the locking overhead for the system. The programmer must carefully analyze database access code to ensure that any relaxation of isolation does not cause software bugs that are difficult to find. Conversely, if higher isolation levels are used, the possibility of deadlock is increased, which also requires careful analysis and programming techniques to avoid.

Since each isolation level is stronger than those below, in that no higher isolation level allows an action forbidden by a lower one, the standard permits a DBMS to run a transaction at an isolation level stronger than that requested (e.g., a “Read committed” transaction may actually be performed at a “Repeatable read” isolation level).

The isolation levels defined by the ANSI/ISO SQL standard are listed as follows.

### Serializable

This is the highest isolation level.

With a lock-based concurrency control DBMS implementation, serializability requires read and write locks (acquired on selected data) to be released at the end of the transaction. Also range-locks must be acquired when a SELECT query uses a ranged WHERE clause, especially to avoid the phantom reads phenomenon.

When using non-lock based concurrency control, no locks are acquired; however, if the system detects a write collision among several concurrent transactions, only one of them is allowed to commit. See snapshot isolation for more details on this topic.

Per the SQL-92 standard:

The execution of concurrent SQL-transactions at isolation level SERIALIZABLE is guaranteed to be serializable. A serializable execution is defined to be an execution of the operations of concurrently executing SQL-transactions that produces the same effect as some serial execution of those same SQL-transactions. A serial execution is one in which each SQL-transaction executes to completion before the next SQL-transaction begins.

In this isolation level, a lock-based concurrency control DBMS implementation keeps read and write locks (acquired on selected data) until the end of the transaction. However, range-locks are not managed, so phantom reads can occur.

Write skew is possible at this isolation level, a phenomenon where two writes are allowed to the same column(s) in a table by two different writers (who have previously read the columns they are updating), resulting in the column having data that is a mix of the two transactions.

Repeatable reads is the default isolation level for MySQL’s InnoDB engine.

In this isolation level, a lock-based concurrency control DBMS implementation keeps write locks (acquired on selected data) until the end of the transaction, but read locks are released as soon as the SELECT operation is performed (so the non-repeatable reads phenomenon can occur in this isolation level). As in the previous level, range-locks are not managed.

Putting it in simpler words, read committed is an isolation level that guarantees that any data read is committed at the moment it is read. It simply restricts the reader from seeing any intermediate, uncommitted, ‘dirty’ read. It makes no promise whatsoever that if the transaction re-issues the read, it will find the same data; data is free to change after it is read.

This is the lowest isolation level. In this level, dirty reads are allowed, so one transaction may see not-yet-committed changes made by other transactions.

### Snapshot Isolation

We mentioned 4 different isolation levels above, but TiDB doesn’t adopt any of them. Instead, TiDB uses snapshot isolation as its default ioslation level. The main reason for it is that it allows better serializability, yet still avoids most of the concurrency anomalies that serializability avoids (but not always all).

TiDB is not alone: snapshot isolation also has been adopted by major database management systems such as InterBase, Firebird, Oracle, MySQL, PostgreSQL, SQL Anywhere, MongoDB and Microsoft SQL Server (2005 and later).

Snapshot isolation is a guarantee that all reads made in a transaction will see a consistent snapshot of the database, and the transaction itself will successfully commit only if no updates it has made conflict with any concurrent updates made since that snapshot.

In practice snapshot isolation is implemented within multiversion concurrency control (MVCC), where generational values of each data item (versions) are maintained: MVCC is a common way to increase concurrency and performance by generating a new version of a database object each time the object is written, and allowing transactions’ read operations of several last relevant versions (of each object). The prevalence of snapshot isolation has been seen as a refutation of the ANSI SQL-92 standard’s definition of isolation levels, as it exhibits none of the “anomalies” that the SQL standard prohibited, yet is not serializable (the anomaly-free isolation level defined by ANSI).

A transaction executing under snapshot isolation appears to operate on a personal snapshot of the database, taken at the start of the transaction. When the transaction concludes, it will successfully commit only if the values updated by the transaction have not been changed externally since the snapshot was taken. Such a write-write conflict will cause the transaction to abort.

In a write skew anomaly, two transactions (T1 and T2) concurrently read an overlapping data set (e.g. values V1 and V2), concurrently make disjoint updates (e.g. T1 updates V1, T2 updates V2), and finally concurrently commit, neither having seen the update performed by the other. Were the system serializable, such an anomaly would be impossible, as either T1 or T2 would have to occur “first”, and be visible to the other. In contrast, snapshot isolation permits write skew anomalies.

As a concrete example, imagine V1 and V2 are two balances held by a single person, James. The bank will allow either V1 or V2 to run a deficit, provided the total held in both is never negative (i.e. V1 + V2 ≥ 0). Both balances are currently $100. James initiates two transactions concurrently, T1 withdrawing$200 from V1, and T2 withdrawing $200 from V2. If the database guaranteed serializable transactions, the simplest way of coding T1 is to deduct$200 from V1, and then verify that V1 + V2 ≥ 0 still holds, aborting if not. T2 similarly deducts $200 from V2 and then verifies V1 + V2 ≥ 0. Since the transactions must serialize, either T1 happens first, leaving V1 = -$100, V2 = $100, and preventing T2 from succeeding (since V1 + (V2 -$200) would be -$200), or T2 happens first and similarly prevents T1 from committing. If the database is under snapshot isolation (MVCC), however, T1 and T2 operate on private snapshots of the database: each deducts$200 from an account, and then verifies that the new total is zero, using the other account value that held when the snapshot was taken. Since neither update conflicts, both commit successfully, leaving V1 = V2 = -$100, and V1 + V2 = -$200.

In TiDB, you can use SELECT … FOR UPDATE statement to avoid write skew anomaly. In this case, TiDB will use locks to serialize writes together with MVCC to gain some of the performance gains and still support the stronger “serializability” level of isolation.


text:
Fraction to decimal calculator is a online tool that converts the fractions into decimals. You just have to enter the fraction and get its decimal instantly.

Fraction to Decimal Steps

Lets see how to convert the fraction in to decimal:
Step 1 : Read the problem and choose a number that when multiplied with the denominator to gives you the multiples of 10's.
Step 2 : Multiply that number with both numerator and denominator. Now place the decimal point in numerator from unit place to the left depending on how many units are there.

Fraction to Percent Calculator

 Decimal to Fraction Fraction to Decimal Conversion Chart Decimals to Fractions Conversion from Fraction to Decimal What are Like Fractions? Improper Fraction to Mixed Fraction
 Calculator Decimal to Fraction A Fraction Calculator Add 3 Fractions Calculator Add Fraction Calculator Calculating Mixed Fractions Calculator Dividing Fractions


text:
Stefan Löffler st.loeffler at gmail.com
Mon Oct 18 08:12:59 CEST 2010

An embedded and charset-unspecified text was scrubbed...
Name: warning1.txt
URL: <http://tug.org/pipermail/texworks/attachments/20101018/3a1258d4/attachment.txt>
-------------- next part --------------
Hi,

Am 2010-10-14 20:54, schrieb Arno Trautmann:
> this just entered my mind when opening a document that was \input into
> another one: Is it possible or would it be possible to implement a
> feature that opens a document that is \input or \included into another
> document by clicking on it? (Assuming LaTeX syntax, i.e. \input{filename})
> That would be a nice and useful feature!

Sure, scripting is your friend. I've attached a preliminary version of
such a script. It should support both \include{} and \input{}. I haven't
tested it extensively, though. So problems may arise on Windows
(different path syntax?), or with \include'd files in subdirectories,
parent directories, etc. But it's a start :).

HTH
Stefan


text:
Classical Limit, Top Level draft done

I have just finished a short posting on the classical limit using the 7 Steps Towards a Classical World and the Bohmian Mechanics book as a reference.

I have no idea how to typeset the third derivative and an equals sign had something bad happen to it. Otherwise, the texxing went okay.

The top pages have also been done and I think the final structure of the site is done for now.

Now I just need to add content. It takes a long time to add content, even meager content.

And, of course, these are really just drafts.

• Jason wrote:

Triple derivative is either $$x”’$$ or $$\dddot{x}$$ (as long as you use the amsmath package).

If by equals sign you mean the “…and wanting to make the assumption that $$- \langle \nabla V(X(t)) \rangle \approx – \nabla V(\langle X(t)\rangle)$$”, that’s because you used \approx instead of =.

• Jason wrote:

Oh. Hrm. Maybe $x{‘}{‘}{‘}$ (x{‘}{‘}{‘}) will fix your derivatives?

• Jason wrote:

No, maybe $x'{}'{}’$ (x'{}'{}’). Is there a sandbox to play with how this site renders TeX?

• It uses MathJax to render TeX. I am sure there is a sandbox for that somewhere. Thanks for your suggestions. I used $V^{\,\,\prime}$ V^{\,\,\prime} to get the initial spacing right and three primes in a row worked fine. I do not know why the spacing is such an issue, but perhaps that is just V.

As for the equals, I do not remember what that issue was. Seems fine to me now. The approx was intentional.


text:
Approximate Confidence Limits for the Ratio of Two Binomial Variates with Unequal Sample Sizes

Title & Authors
Approximate Confidence Limits for the Ratio of Two Binomial Variates with Unequal Sample Sizes
Cho, Hokwon;

Abstract
We propose a sequential method to construct approximate confidence limits for the ratio of two independent sequences of binomial variates with unequal sample sizes. Due to the nonexistence of an unbiased estimator for the ratio, we develop the procedure based on a modified maximum likelihood estimator (MLE). We generalize the results of Cho and Govindarajulu (2008) by defining the sample-ratio when sample sizes are not equal. In addition, we investigate the large-sample properties of the proposed estimator and its finite sample behavior through numerical studies, and we make comparisons from the sample information view points.
Keywords
Approximate confidence limits;ratio of two binomial proportions;modified MLE;sampleratio;large-sample properties;
Language
English
Cited by
References
1.
Anscombe, F. J. (1952). Large sample theory of sequential estimation, Proceedings of the Cambridge Philosophical Society, 48, 600-607.

2.
Bailey, B. J. R. (1987). Confidence limits to the risk ratio, Biometrics, 43, 201-205.

3.
Cho, H. (2007). Sequential risk-efficient estimation for the ratio of two binomial proportions, Journal of Statistical Planning and Inference, 137, 2336-2346.

4.
Cho, H. and Govindarajulu, Z. (2008). Sequential confidence limits for the ratio of two binomial proportions, International Journal of Statistics and Management System, 3, 26-42.

5.
Chow, Y. S. and Robbins, H. (1965). On the asymptotic theory of fixed-width sequential confidence intervals for the mean, The Annals of Mathematical Statistics, 36, 457-462.

6.
Gart, J. (1985). Approximate tests and interval estimation of the common relative risk in the combination of 2 ${\times}$ 2 tables, Biometrika, 72, 673-677.

7.
Gart, J. and Nam, J. (1988) Approximate interval estimation of the ratio of binomial parameters: A review and corrections for skewness, Biometrics, 44, 323-338.

8.
Katz, D., Baptista, J., Azen, S. and Pike, M. (1978). Obtaining confidence intervals for the risk ratio in cohort studies, Biometrics, 34, 469-474.

9.
Khan, R. (1969). A general method of determining fixed-width confidence intervals, The Annals of Mathematical Statistics, 40, 704-709.

10.
Ray, D. (1957). Sequential confidence intervals for the mean of a normal distribution with unknown variance, Journal of the Royal Statistical Society, Series B, 19, 133-143.

11.
Siegmund, D. (1982). A sequential confidence interval for the odds ratio, Probability and Mathematical Statistics, 2, 149-156.

12.
Starr, N. (1966). The performance of a sequential procedure for the fixed-width interval estimation of the mean, The Annals of Mathematical Statistics, 37, 36-50.

13.
Walter, S. (1976). The estimation and interpretation of attributable risk in health research, Biometrics, 32, 829-849.