text:
Home > Mean Square > Mean Square Error Variance

# Mean Square Error Variance

## Contents

In the applet, construct a frequency distribution with at least 5 nonempty classes and and at least 10 values total. A symmetric, unimodal distribution. References ^ a b Lehmann, E. In the applet, set the class width to 0.1 and construct a distribution with at least 30 values of each of the types indicated below. this content

The root mean-square error, RMSE, is the square root of MSE. 3. MSE is also used in several stepwise regression techniques as part of the determination as to how many predictors from a candidate set to include in a model for a given As you perform these operations, note the position and size of the mean ± standard deviation bar and the shape of the MSE graph. If not, well, Glen_b once rightly admonished me for being colonizing with my personal style preferences and edits to others Qs and As. click resources

## Mean Squared Error Example

Variance Further information: Sample variance The usual estimator for the variance is the corrected sample variance: S n − 1 2 = 1 n − 1 ∑ i = 1 n A uniform distribution. The F statistic can be obtained as follows: The P value corresponding to this statistic, based on the F distribution with 1 degree of freedom in the numerator and 23 degrees

It is quite possible to find estimators in some statistical modeling problems that have smaller mean squared error than a minimum variance unbiased estimator; these are estimators that permit a certain Your cache administrator is webmaster. L.; Casella, George (1998). How To Calculate Mean Square Error The MSE can be written as the sum of the variance of the estimator and the squared bias of the estimator, providing a useful way to calculate the MSE and implying

What we would really like is for the numerator to add up, in squared units, how far each response is from the unknown population mean μ. Root Mean Square Error Formula To clarify your question, could you (a) describe what kind of data you are applying these concepts to and (b) give formulas for them? (It's likely that in so doing you Addison-Wesley. ^ Berger, James O. (1985). "2.4.2 Certain Standard Loss Functions". http://stats.stackexchange.com/questions/140536/whats-the-difference-between-the-variance-and-the-mean-squared-error This is the formula to calculate the variance of a normally distributed sample: $$\frac{\sum(X - \bar{X}) ^2}{n-1}$$ This is the formula to calculate the mean squared error of observations in a

We can analyze this data set using ANOVA to determine if a linear relationship exists between the independent variable, temperature, and the dependent variable, yield. Mse Download That is, the n units are selected one at a time, and previously selected units are still eligible for selection for all n draws. Note that, if an estimator is unbiased then its MSE is equal to its variance. â€¹ 3.5.3 Bias of the estimator $\hat \sigma^2$ up 3.5.5 Consistency â€º Book information About this A symmetric bimodal distribution.

## Root Mean Square Error Formula

Estimator The MSE of an estimator θ ^ {\displaystyle {\hat {\theta }}} with respect to an unknown parameter θ {\displaystyle \theta } is defined as MSE  ( θ ^ ) https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/statug_intromod_sect005.htm Examples Mean Suppose we have a random sample of size n from a population, X 1 , … , X n {\displaystyle X_{1},\dots ,X_{n}} . Mean Squared Error Example Among unbiased estimators, minimizing the MSE is equivalent to minimizing the variance, and the estimator that does this is the minimum variance unbiased estimator. Mse Mental Health Thus, argue that the graph of MSE is a parabola opening upward. 2.

L.; Casella, George (1998). http://threadspodcast.com/mean-square/mean-square-error-estimate-of-variance.html If the data are uncorrelated, then it is reasonable to assume in that instance that the new observation is also not correlated with the data. The reason for taking an expectation is to remove the randomness of the squared difference by averaging over the distribution of the data. For an unbiased estimator, the MSE is the variance of the estimator. Mean Squared Error Calculator

Figure 3: Data Entry in DOE++ for the Observations in Table 1 Figure 4: ANOVA Table for the Data in Table 1 References [1] ReliaSoft Corporation, Experiment Design and Analysis Reference, Each subpopulation has its own mean , which depends on x through . Browse other questions tagged variance error or ask your own question. have a peek at these guys p.229. ^ DeGroot, Morris H. (1980).

Also in regression analysis, "mean squared error", often referred to as mean squared prediction error or "out-of-sample mean squared error", can refer to the mean value of the squared deviations of Root Mean Square Error Interpretation However, a biased estimator may have lower MSE; see estimator bias. p.60.

## Like the variance, MSE has the same units of measurement as the square of the quantity being estimated.

H., Principles and Procedures of Statistics with Special Reference to the Biological Sciences., McGraw Hill, 1960, page 288. ^ Mood, A.; Graybill, F.; Boes, D. (1974). The graph of MSE is shown to the right of the histogram. Sum of Squares and Mean Squares The total variance of an observed data set can be estimated using the following relationship: where: s is the standard deviation. Mean Square Error Matlab How does the mean square error formula differ from the sample variance formula?

When $\hat{\boldsymbol {\theta }}$ is a biased estimator of $\theta$, its accuracy is usually assessed by its MSE rather than simply by its variance. p.229. ^ DeGroot, Morris H. (1980). Again, the quantity S = 8.641 (rounded to three decimal places here) is the square root of MSE. http://threadspodcast.com/mean-square/mean-square-error-bias-variance.html Using the result of Exercise 2, argue that the standard deviation is the minimum value of RMSE and that this minimum value occurs only when t is the mean.

McGraw-Hill. Note that, although the MSE (as defined in the present article) is not an unbiased estimator of the error variance, it is consistent, given the consistency of the predictor. How do spaceship-mounted railguns not destroy the ships firing them? The deviation for this sum of squares is obtained at each observation in the form of the residuals, ei: The error sum of squares can be obtained as the sum of

Generated Thu, 20 Oct 2016 11:54:49 GMT by s_wx1196 (squid/3.5.20) is the mean of the n observations. Now let's extend this thinking to arrive at an estimate for the population variance σ2 in the simple linear regression setting. Entropy and relative entropy Common discrete probability functionsThe Bernoulli trial The Binomial probability function The Geometric probability function The Poisson probability function Continuous random variable Mean, variance, moments of a continuous

The fitted line plot here indirectly tells us, therefore, that MSE = 8.641372 = 74.67. However, you are right about personal preferences, so feel free to roll back with apologies. A U-distribution. Click on "Next" above to continue this lesson. © 2004 The Pennsylvania State University.

The estimate of σ2 shows up in two places in Minitab's standard regression analysis output. This property, undesirable in many applications, has led researchers to use alternatives such as the mean absolute error, or those based on the median. As shown in Figure 3.3 we could have two estimators behaving in an opposite ways: the first has large bias and low variance, while the second has large variance and small Applications Minimizing MSE is a key criterion in selecting estimators: see minimum mean-square error.

Statistical decision theory and Bayesian Analysis (2nd ed.). You may have wondered, for example, why the spread of the distribution about the mean is measured in terms of the squared distances from the values to the mean, instead of Compute the min, max, mean and standard deviation by hand, and verify that you get the same results as the applet.


text:
# Numerical Methods: The Trapezium Rule and Simpson's Rule

Integrals don't have to get very complicated before symbolic methods fail to work. Consider, for example, the integral $$\int_0^1\cos(x^3+x)\,dx:$$ there are no know symbolic methods, based on indefinite integration, that can be brought to bear on this problem.

Instead, we can sample the integrand at regular integrals and carry out an estimate based on this. One way of doing that is to approximate the function by a sequence of straight line segments, as in the figure. The area between each segment and the x-axis is a trapezium, meaning that if the width of the interval is h, and the y-values at each end of the interval are y_i and y_{i+1}, then the area of the trapezium is $$\frac{h}{2}\,(y_i+y_{i+1}).$$ The entire area between the curve and the x-axis, which is to say the integral, can be approximated by adding together several such trapezia. If there are n trapezia, and n+1 y-values (ordinates) running from y_0 to y_n, then the integral is approximately $$T_n=\frac{h}{2}\,(y_0+2\,y_2+2\,y_2+\dots+2\,y_{n-2}+2\,y_{n-1}+y_n).$$ This is called the trapezium rule.

The trapezium rule with four ordinates

For example, let us estimate $$\int_0^1\cos(x^3+x)\,dx,$$ using five ordinates (four intervals). The interval width, h, is 0.25. From the table, $$T_4=\frac{0.25}{2}\times(0.58385+2\times2.16432)=0.6141.$$

 i x_i y_1 0 0.00 1.0000 1 0.25 0.96493 2 0.50 0.81096 3 0.7 0.38843 4 1.00 -0.41615 Totals 0.58385 2.16432

An alternative, which is often (though not always) more accurate, is to approximate the curve with a sequence of quadratic parabolic segments instead of straight lines. Each parabola requires three points to specify it, so each parabola spans two intervals. This method can only be used, therefore, if the number of intervals is even (and the number of ordinates, therefore, odd).

Figure 2: Approximating a curve (red) with a quadratic (blue): the basis of Simpson's rule

Now, consider the quadratic passing through the points (-h,y_0), (0,y_1) and (h,y_2). It's not hard to show that this has the equation $$y=\left(\frac{y_0-2y_1+y_2}{2h^2}\right)\,x^2+\left(\frac{y_2-y_0}{2h}\right)\,x+y_1.$$ If we integrate this between -h and h we get $$\frac{h}{3}\,(y_0+4\,y_1+y_2).$$ This would also have been the area if we'd situated the middle of the interval somewhere other than zero (though the calculations would have been harder). So from our quadratic approximation we get the estimate $$S_n=\frac{h}{3}\,(y_0+4\,y_2+2\,y_2+4\,y_3+\dots+4\,y_{n-3}+2\,y_{n-2}+4\,y_{n-1}+y_n),$$ where n must be even. This is called Simpson's rule.

From the table,

 i x_i y_1 0 0.00 1.0000 1 0.25 0.96493 2 0.50 3 0.7 0.38843 4 1.00 -0.41615 Totals 0.58385 1.35335 0.81096

$$S_4=\frac{0.25}{3}\,(0.58395+4\times1.35335+2\times0.81096)=0.6349.$$

format: plain


text:
# Most efficient way to build block / banded SparseArray

I have a matrix that I generate with a procedure that looks like this:

blaMX[ptsX_Integer, ptsY_Integer] :=
Table[
With[
{
ix = 1 + Floor[(i - 1)/(ptsY)], jx = 1 + Floor[(j - 1)/(ptsY)],
iy = Mod[i, ptsY, 1], jy = Mod[j, ptsY, 1]
},
If[iy != jy,
0,
k1[ix, jx]
] +
If[ix != jx,
0,
k2[iy, jy]
]
],
{i, ptsX*ptsY},
{j, ptsX*ptsY}
];

where I have two square matrices k1 of dimension ptsX and k2 of dimension ptsY

It generates a block-diagonal matrix with a bunch of block-bands. The basic structure looks like:

blaMX[6, 9] /. {_k1 -> 1, _k2 -> 2, c -> 3} // MatrixPlot

where each of those diagonal blocks is k2 duplicated:

blaMX[3, 6][[7 ;; 12, 7 ;; 12]] /. _k1 -> 0 // Grid

k2[1,1] k2[1,2] k2[1,3] k2[1,4] k2[1,5] k2[1,6]
k2[2,1] k2[2,2] k2[2,3] k2[2,4] k2[2,5] k2[2,6]
k2[3,1] k2[3,2] k2[3,3] k2[3,4] k2[3,5] k2[3,6]
k2[4,1] k2[4,2] k2[4,3] k2[4,4] k2[4,5] k2[4,6]
k2[5,1] k2[5,2] k2[5,3] k2[5,4] k2[5,5] k2[5,6]
k2[6,1] k2[6,2] k2[6,3] k2[6,4] k2[6,5] k2[6,6]

Each band is made up of blocks, as an unwrapping of k1 with the Band starting at {n+(i-1)*ptsY, n+(j-1)*ptsY} being k1[[i+1, j+1]] (essentially just using Quotient:

With[{n = 1},
Table[
blaMX[6, 9][[
(i - 1)*9 + n,
(j - 1)*9 + n
]] /. _k2 -> 0,
{i, 6},
{j, 6}
]
] // Grid

Now, my generation procedure is wildly inefficient. I do ptsX^2 * ptsY^2 work, when I really only have ptsX * ptsY * (ptsX + ptsY - 1) (which is just 2 n^3 - n^2 if ptsX == ptsY == n) non-zero elements.

So, what is the best way to build a matrix of this form? My current version looks like:

makeKMat[k1_, k2_] :=
With[{
k1SparseRules =
With[{ptsX = Length@k1, ptsY = Length@k2},
Flatten[
Table[
Band[{(i - 1)*ptsY + 1, (j - 1)*ptsY + 1}, {i*ptsY, j*ptsY}] ->
k1[[i, j]],
{i, ptsX},
{j, ptsX}
],
1
]
],
k2SparseRules =
With[{ptsX = Length@k1, ptsY = Length@k2},
{
Band[{1, 1}] ->
ConstantArray[k2, ptsX]
}
]
},
With[{k3 = SparseArray[k2SparseRules]},
SparseArray[k1SparseRules, Dimensions[k3]] + k3
]
];

And this works:

k1Pts = 6;
k2Pts = 9;
k1Test = Array[k1, {k1Pts, k1Pts}];
k2Test = Array[k2, {k2Pts, k2Pts}];
kMatTest = makeKMat[k1Test, k2Test];
kMatTest == blaMX[6, 9]

True

And is pretty fast, all considered:

k1Test2 = RandomReal[{}, {15, 15}];
k2Test2 = RandomReal[{}, {15, 15}];

{tt, mx} = makeKMat[k1Test2, k2Test2] // RepeatedTiming;
tt

0.0071

{tt2, lmx} = lazyMX[k1Test2, k2Test2] // RepeatedTiming;
tt2

0.338

But, I can't help but feel that this could be done more efficiently. Can someone propose a better way to build a block-banded SparseArray like this?

### Some mild goal-post moving:

What if we wanted to extend this to an $N$-dimensional system? A way to implement this element-wise would be:

getCrds[i_, j_, gridDivs_] :=
FoldList[
With[{tot = #[[3]], new = #2},
Append[
Map[
Mod[1 + Quotient[# - 1, tot], new, 1] &,
{i, j}
],
tot*new
]
] &,
{i, j, 1},
gridDivs
][[2 ;;, ;; 2]];

makeNDKMat[ks : {__List}] :=
With[{gridDivs = Length /@ ks},
Table[
With[{divvy = getCrds[i, j, gridDivs]},
Total@
Table[
If[AllTrue[Delete[divvy, k], Apply[Equal]],
ks[[k, Sequence @@ divvy[[k]]]],
0
],
{k, Length@gridDivs}
]
],
{i, Times @@ gridDivs},
{j, Times @@ gridDivs}
]
]

For example, in 4D this looks like:

k1T = Array[k1, {2, 2}];
k2T = Array[k2, {3, 3}];
k3T = Array[k3, {4, 4}];
k4T = Array[k4, {5, 5}];
k4DLazy =
makeNDKMat[{k4T, k3T, k2T, k1T}] /. {_k1 -> 1, _k2 -> 2, _k3 ->
3, _k4 -> 4};
k4DLazy // MatrixPlot

How could we efficiently build a sparse representation of this?

This is definately faster. It took me some time to figure out the combinatorics and there might still be some potential for improvement within the compiled functions.

getColumnIndices = Compile[{{m, _Integer}, {n, _Integer}, {i, _Integer}},
Transpose[Partition[
Partition[
Join[
Table[k, {k, 1, i n}],
Flatten[Table[Table[k, {j, 1, n}], {k, i n + 1, i n + n}]],
Table[k, {k, i n + n + 1, m n}]
], {1}], {n}]],
RuntimeAttributes -> {Listable},
Parallelization -> True,
CompilationTarget -> "C",
RuntimeOptions -> "Speed"
];

getValues = Compile[{{k1row, _Real, 1}, {k2, _Real, 2}, {i, _Integer}},
Block[{A},
A = Join[
Table[CompileGetElement[k1row, k], {l, 1, Length[k2]}, {k, 1, i}],
k2,
Table[CompileGetElement[k1row, k], {l, 1, Length[k2]}, {k, i + 2, Length[k1row]}],
2];
Do[A[[k, k + i]] += CompileGetElement[k1row, i + 1], {k, 1, Length[k2]}];
A
],
RuntimeAttributes -> {Listable},
Parallelization -> True,
CompilationTarget -> "C",
RuntimeOptions -> "Speed"
];

makeKMat3[k1_, k2_] := With[{m = Length[k1], n = Length[k2]},
SparseArray @@ {Automatic, {m n, m n}, 0, {1, {
Range[0, (m n ) (m + n - 1), m + n - 1],
Flatten[getColumnIndices[m, n, Range[0, m - 1]], 2]
},
Flatten[getValues[k1, k2, Range[0, m - 1]]]
}}
]

Just to give you an idea of the timings:

m = 100;
n = 6;
k1 = RandomReal[{-1, 1}, {m, m}];
k2 = RandomReal[{-1, 1}, {n, n}];
A = makeKMat2[k1, k2]; // RepeatedTiming
B = makeKMat3[k1, k2]; // RepeatedTiming
Max[Abs[A - B]]

{0.11, Null}

{0.000481, Null}

0.

The idea for the "higher dimensional" case is similar to the idea above. I exploit that the "ColumnIndices" of the resulting matrices (when partitioned into column indices per row) stay rectangular so that column indices from the diagonal matrices can be joined to it from the left and right. Some extra index list (diagidx) is needed for book keeping of those column indices of the blocks that belong to the diagonal entries. All in all, only operations on the nonzero values and the column indices are performed. No SparseArrays are built intermediately: Even building a SparseArray from row pointers, column indices and nonzero values has still some considerable overhead, probably because there is a consistency checker involved in the backend. That's a pitty since I know that I produce consistent data. This issue is also closely related to this post by Szabolcs.

getValues2 = Compile[{{k1row, _Real, 1}, {blockvals, _Real, 2}, {diagidx, _Integer, 1}, {i, _Integer}},
Block[{A},
A = Join[
Table[CompileGetElement[k1row, k], {l, 1, Dimensions[blockvals][[1]]}, {k, 1, i}],
blockvals,
Table[CompileGetElement[k1row, k], {l, 1, Dimensions[blockvals][[1]]}, {k, i + 2, Length[k1row]}],
2];
Do[A[[k, CompileGetElement[diagidx, k] + i]] += Compile`GetElement[k1row, i + 1], {k, 1, Length[blockvals]}];
A
],
RuntimeAttributes -> {Listable},
Parallelization -> True,
CompilationTarget -> "C",
RuntimeOptions -> "Speed"
];

getColumnIndices2 = Compile[{
{blockci, _Integer, 3}, {diagci, _Integer,
3}, {m, _Integer}, {n, _Integer}, {i, _Integer}
},
If[i > 0,
If[i < m - 1,
Join[diagci[[All, 1 ;; i]], blockci + i n, diagci[[All, i + 1 ;; m - 1]] + (n), 2],
Join[diagci[[All, 1 ;; i]], blockci + i n, 2]
],
Join[blockci + i n, diagci[[All, i + 1 ;; m - 1]] + (n), 2]
],
RuntimeAttributes -> {Listable},
Parallelization -> True,
CompilationTarget -> "C",
RuntimeOptions -> "Speed"
];

toSparseArrayData[b_?MatrixQ] := {
Partition[SparseArray[b]["ColumnIndices"], Dimensions[b][[2]]],
b,
Dimensions[b][[2]],
Range[Dimensions[b][[2]]]
}

toSparseArray[X_] :=
With[{d1 = Dimensions[X[[1]]][[1]], d2 = Dimensions[X[[1]]][[2]]},
SparseArray @@ {Automatic, {d1, d1}, 0,
{1, {Range[0, d1 d2, d2], Flatten[X[[1]], 1]}, Flatten[X[[2]]]}}
]

iteration[X_, a_] := With[{
m = Length[a],
blockci = X[[1]],
blockvals = X[[2]],
n = X[[3]],
diagidx = X[[4]]
},
With[{ran = Range[0, m - 1]},
{
Join @@ getColumnIndices2[blockci, Transpose[Partition[Partition[Range[(m - 1) n], 1], n]], m, n, ran],
Join @@ getValues2[a, blockvals, diagidx, ran],
m n,
Join @@ Outer[Plus, ran, diagidx]
}
]
]

makeKMat3ND[ks : {__List}] :=
toSparseArray[Fold[iteration, toSparseArrayData[ks[[1]]], Rest[ks]]]

Usage example and timing test:

SeedRandom[123];
ks = Table[RandomReal[{-1, 1}, {RandomInteger[{3, 8}]}[[{1, 1}]]], 6];
A = makeKMat2ND[Reverse@ks]; // AbsoluteTiming
B = makeKMat3ND[ks]; // AbsoluteTiming
Max[Abs[A - B]]

{24.0011, Null}

{0.038756, Null}

8.88178*10^-16

This is the sparsity pattern of the resulting matrix:

• Wow. Honestly just wow. – b3m2a1 Feb 15 '18 at 20:18
• This is great work ++1 – mrz Feb 21 '18 at 19:41
• @b3m2a1 Thank you very much for the bounty! May I ask where this sort of "fractal" iterations get applied? – Henrik Schumacher Feb 22 '18 at 7:30
• It pops up in a specific version of discrete variable representation. This is the type of process you use for building the kinetic energy term in multiple dimensions for a direct product basis (which leads to a representation that is diagonal in the different coordinates, hence block-banded in the way I presented). – b3m2a1 Feb 22 '18 at 7:34
• Reminds me of link – Emy Mar 17 '18 at 16:38

Not faster, but maybe easier to implement

makeKMat2[k1_, k2_] := Module[{A, m, n},
m = Length[k1];
n = Length[k2];
A = Map[SparseArray[Band[{1, 1}] -> #, {n, n}, 0.] &, k1, {2}];
With[{B = SparseArray@k2}, Do[A[[i, i]] += B, {i, 1, m}]];
ArrayFlatten[A]
]

(b3m2a1 comment)
Note that this has a simple extension to the N-dimensional case:

makeKMat2ND[ks : {__List}] := Fold[makeKMat2, ks]
• Very nice. I'm gonna be sharing this code with others so the easier it is to read for people without Mathematica experience the better. – b3m2a1 Feb 15 '18 at 7:49
• Good to hear! I was also tempted to compute the "ColumnIndices" and "RowPointers" of the resulting matrix by hand since building from the "FullForm" of the matrix is usually much faster than letting Mathematica assemble it. But I am somewhat relieved that I don't have to do that. Although it should not be too complicated as each row has the same number of entries... – Henrik Schumacher Feb 15 '18 at 8:31
• One difficulty, how can I keep make sure to keep the entire thing as a SparseArray? If I feed it: makeKMat2[RandomReal[{}, {10, 10}], RandomReal[{}, {10, 10}]] it unwraps to a List for me, presumably owing to some auto-determined memory optimization, while if I feed it more regular data: makeKMat2[Table[i + j, {i, 10}, {j, 10}], Table[i + j, {i, 10}, {j, 10}]] it's happy to keep it Sparse. This becomes more of a problem as I move to 4D and beyond, which I was hoping I could do recursively with this. – b3m2a1 Feb 15 '18 at 9:27
• When using ArrayFlatten it is important that all occuring SparseArray have the same "Background" (aka. as default values). When casting dense, real matrices to sparse ones by applying SparseArray to them, the "Background" is automatically set to 0. (machine precision) while building sparse arrays with the constructor have 0 as background by default. Adding ,0. as last argument to SparseArray cures this. I also edited the post. – Henrik Schumacher Feb 15 '18 at 9:45
• Moreover: Feel free to add as much information as other users might find useful. – Henrik Schumacher Feb 15 '18 at 9:47

This is slightly faster and certainly more compact than the uncompiled implementation in Henrik's answer:

makeKMat[k1_?SquareMatrixQ, k2_?SquareMatrixQ] := Module[{m = Length[k1], n = Length[k2]},
KroneckerProduct[k1, IdentityMatrix[n, SparseArray]] +
KroneckerProduct[IdentityMatrix[m, SparseArray], k2]]

and as b3m2a1 notes, the extension can be done as

makeKMatND[ks : {__?SquareMatrixQ}] := Fold[makeKMat[#2, #1] &, ks]

Using the examples in the OP:

MatrixPlot[makeKMat[ConstantArray[1, {9, 9}], ConstantArray[2, {6, 6}]]]

AbsoluteTiming[tst =
makeKMatND[{ConstantArray[4, {5, 5}], ConstantArray[3, {4, 4}],
ConstantArray[2, {3, 3}], ConstantArray[1, {2, 2}]}];][[1]]
0.000406914

MatrixPlot[tst, MaxPlotPoints -> Infinity]

• +1 for SquareMatrixQ. I did not know that it existed! And for the KroneckerProduct trick. I learnt it from here several days later and I was really suprised that it worked so well. – Henrik Schumacher Mar 17 '18 at 11:28
• By sheer chance, I was rereading Van Loan's paper when I came across this old question... :D – J. M. is away Mar 17 '18 at 11:36
• Wow, thanks! That's a nice overview on Kronecker products. This will turn out very useful one day! – Henrik Schumacher Mar 17 '18 at 11:55
• Very cool! I had never heard of a Kronecker product (being a chemist who masquerades as a mathematician). Very cool to know that this type of operation has a full calculus behind it (and fun to see that this matrix built from Kronecker deltas is called a Kronecker product). – b3m2a1 Mar 21 '18 at 7:13
• @b3m2a1 I'm a chemist pretending to be a mathematician (with varying degrees of success); to be perfectly fair, I didn't learn about Kronecker products until I was well out of school. ;) – J. M. is away Mar 21 '18 at 7:19


text:
# Explain The Substitution Reaction

Substitution reaction is defined as a chemical reaction during which an atom or group of atoms in a molecule is replaced or substituted by another atoms or group of atoms. An excellent example of a substitution reaction is halogenation.

Substitution reactions possess primary importance in the field of organic chemistry. These reactions are of two types.

1. Nucleophilic reaction
2. Electrophilic reactions

Substitution reaction is also called a single displacement reaction, single replacement reaction,

or single substitution reaction.

Example of Substitution reaction

The reaction of Chloromethane with the hydroxyl ion (OH-) will lead to the formation of the original molecule called methanol with that hydroxyl ion.

$$CH_{3}Cl + (OH^{-}) \rightarrow CH_{3}OH + Cl^{-}$$

Methanol

The reaction of Ethanol with the hydrogen iodide forms iodoethane along with water.

$$CH_{3}CH_{2}OH + HI → CH_{3}CH_{2}I + H_{2}O$$

Explore more such questions and answers at BYJU’S.

0 (0)

Upvote (0)

#### Choose An Option That Best Describes Your Problem

Thank you. Your Feedback will Help us Serve you better.


text:
This post is everything you want
it’s everything you need
it’s every viz inside of you that you wish you could see
it’s all the right viz at exactly the right time
but it means nothing to you and you don’t know why

LET US MAKE SOME HORIZON CHARTS.

What is a horizon chart you ask? That’s exactly what I was thinking earlier this weekend. Well, not exactly. I sort of knew what horizon charts were, but I couldn’t say exactly what they were good for. But then, after making some it struck me. Come with me on this journey.

As we usually do in this space, we’ll use R to create our plots.

## Horizon Charts

Check out Flowing Data on horizon charts and this document for some other examples of horizon charts.

I was inspired to look into this by this awesome tweet from [@timelyportfolio](https://twitter.com/timelyportfolio):

In this example timelyportfolio showed how to embed horizon charts into a datatable widget. We’ll get to that, but first let’s build our own horizon chart.

# Building a horizon chart with ggplot2

In building this chart, I was greatly aided by this post from timelyportfolio, which dates back to 2012 (!). Since then, ggplot2 has evolved, so the code needed minor tweaking. Using that modified code I was able to build up a horizon chart. We’ll go over the steps, but first let’s get some data.

## Getting data

For today’s examples I’m going to use employment data from the U.S. Bureau of Labor Statistis (BLS) and house price data from the Freddie Mac. We’ve used these data before, here for employment and here for house prices. The posts linked to describe more about how to the data. For the employment data we’ll load it from the web, and the house price data is available in a csv file hpistate.csv.

Let’s follow the strategies from our earlier post and get the employment data from BLS and the house price data from our .csv.

First, let’s check our house price data:

################################################################################
################################################################################

library(tidyverse)
## Loading tidyverse: ggplot2
## Loading tidyverse: dplyr
## Conflicts with tidy packages ----------------------------------------------
## filter(): dplyr, stats
## lag():    dplyr, stats
library(data.table)
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
##
##     between, first, last
## The following object is masked from 'package:purrr':
##
##     transpose
library(scales)
##
## Attaching package: 'scales'
## The following object is masked from 'package:purrr':
##
##     discard
## The following object is masked from 'package:readr':
##
##     col_factor
################################################################################
################################################################################

df$date<-as.Date(df$date, format="%m/%d/%Y")

# Compute percent change by year
#df=df[,hpa:=(hpi-shift(hpi,12,fill=NA))/shift(hpi,12,fill=NA),by=c("statename")]

# Print table for checking
htmlTable::htmlTable(tail(df))
state geo date hpi year month type hpa12 lat long metro.pop fips statename division region
1 WY WY 2016-04-01 185.7677316 2016 4 State 0.0157535023308515 41.15 -104.79 97121 56 Wyoming Mountain Division West Region
2 WY WY 2016-05-01 186.6263416 2016 5 State 0.0111053021335621 41.15 -104.79 97121 56 Wyoming Mountain Division West Region
3 WY WY 2016-06-01 187.2050436 2016 6 State 0.00508809832570378 41.15 -104.79 97121 56 Wyoming Mountain Division West Region
4 WY WY 2016-07-01 187.6827817 2016 7 State 0.00144925455864708 41.15 -104.79 97121 56 Wyoming Mountain Division West Region
5 WY WY 2016-08-01 188.0179497 2016 8 State 0.00186408591734799 41.15 -104.79 97121 56 Wyoming Mountain Division West Region
6 WY WY 2016-09-01 187.743011 2016 9 State 0.00291143018858708 41.15 -104.79 97121 56 Wyoming Mountain Division West Region

Okay, seems all right. We’ve got a few extra columns from our earlier post, but we’ll drop them.

Let’s get some employment data from BLS:

################################################################################
### Go get data from BLS.gov
################################################################################
emp.data<-fread("https://download.bls.gov/pub/time.series/sm/sm.data.54.TotalNonFarm.All")
## Warning in fread("https://download.bls.gov/pub/time.series/sm/sm.data.
## 54.TotalNonFarm.All"): Bumped column 4 to type character on data row
## 521667, field contains '-'. Coercing previously read values in this
## column from logical, integer or numeric back to character which may not
## be lossless; e.g., if '00' and '000' occurred before they will now be just
## '0', and there may be inconsistencies with treatment of ',,' and ',NA,' too
## (if they occurred in this column before the bump). If this matters please
## rerun and set 'colClasses' to 'character' for this column. Please note that
## column type detection uses a sample of 1,000 rows (100 rows at 10 points)
## so hopefully this message should be very rare. If reporting to datatable-
## help, please rerun and include the output from verbose=TRUE.
emp.series<-fread("https://download.bls.gov/pub/time.series/sm/sm.series")

emp.list<-emp.series[industry_code==0 # get all employment
& data_type_code==1 # get employment in thousands
& seasonal=="S",]  # get seasonally adjusted data]

col.names=c("area_code","area_name","drop"))[,c("area_code","area_name"),with=F]
## Warning in fread("https://download.bls.gov/pub/time.series/sm/sm.area", :
## Starting data input on line 2 and discarding line 1 because it has too few
## or too many items to be column names or data: area_code area_name
emp.st<-fread("https://download.bls.gov/pub/time.series/sm/sm.state",
col.names=c("state_code","state_name","drop"))[,c("state_code","state_name"),with=F]
## Warning in fread("https://download.bls.gov/pub/time.series/sm/sm.state", :
## Starting data input on line 2 and discarding line 1 because it has too few
## or too many items to be column names or data: state_code state_name
# merge data
emp.dt<-merge(emp.data,emp.list,by="series_id",all.y=T)

#create month variable
emp.dt=emp.dt[,month:=as.numeric(substr(emp.dt$period,2,3))] # (this assignment is to get around knitr/data table printing error) # see e.g. http://stackoverflow.com/questions/15267018/knitr-gets-tricked-by-data-table-assignment # M13 = Annual average, drop it: emp.dt<-emp.dt[month<13,] #create date variable emp.dt$date<- as.Date(ISOdate(emp.dt$year,emp.dt$month,1) )

# merge on area and state codes
emp.dt<-merge(emp.dt,emp.area,by="area_code")
emp.dt<-merge(emp.dt,emp.st,by="state_code")
emp.dt=emp.dt[,c("state_name","area_name","date","year","month","value"),with=F]
emp.dt=emp.dt[,emp:=as.numeric(value)] #convert value to numeric
# Compute year-over-year change in employment and year-over-year percent change
emp.dt=emp.dt[,emp.yoy:=emp-shift(emp,12,fill=NA),by=c("area_name","state_name")]

# Percent change by year:
emp.dt=emp.dt[,emp.pc:=(emp-shift(emp,12,fill=NA))/shift(emp,12,fill=NA),by=c("area_name","state_name")]

emp.dt=emp.dt[,type:=ifelse(area_name=="Statewide","State","Metro")]

# drop states in c("Puerto Rico","Virgin Islands")
emp.dt=emp.dt[!(state_name %in% c("Puerto Rico","Virgin Islands")),]

# only keep state data
emp.dt.state<-emp.dt[area_name=="Statewide"]

htmlTable::htmlTable(head(emp.dt.state))
state_name area_name date year month value emp emp.yoy emp.pc type
1 Alabama Statewide 1990-01-01 1990 1 1626.70 1626.7 State
2 Alabama Statewide 1990-02-01 1990 2 1625.30 1625.3 State
3 Alabama Statewide 1990-03-01 1990 3 1623.50 1623.5 State
4 Alabama Statewide 1990-04-01 1990 4 1635.90 1635.9 State
5 Alabama Statewide 1990-05-01 1990 5 1639.80 1639.8 State
6 Alabama Statewide 1990-06-01 1990 6 1639.20 1639.2 State

Great, looks good. Now that we have our data, let’s merge them together.

# Rename state_name as statename in emp.dt.state data
emp.dt.state<-rename(emp.dt.state,statename=state_name)
# merge on date & statename
dt<-merge(df,emp.dt.state,by=c("date","statename"))

The key variables in our data are called hpa12 which represents the 12-month percent change in house prices and emp.pc which represents the 12 month-percent change in employment.

## Looking to the horizon

Let’s build up a horizon chart. To do so, first let’s look at data from the state of Arizona.

# plot house price trens for Ohio:

ggplot(data=dt[state=="AZ"],aes(x=date,y=hpa12))+geom_line()+theme_minimal()+
labs(x="",y="",title="12-month percent change in Arizona house prices",
caption="@lenkiefer Source: Freddie Mac House Price Index")+
theme(plot.caption=element_text(hjust=0))+scale_y_continuous(labels=percent)

Okay, if we are interested in seeing how prices compare to zero we might try an area chart.

# plot house price trens for Arizona:

ggplot(data=dt[state=="AZ"],aes(x=date,y=hpa12))+geom_area(fill="blue",alpha=0.25)+theme_minimal()+
labs(x="",y="",title="12-month percent change in Arizona house prices",
caption="@lenkiefer Source: Freddie Mac House Price Index")+
theme(plot.caption=element_text(hjust=0))+scale_y_continuous(labels=percent)

It might be nice to have gradient shading according to whether or not price changes are positive or negative on a year-over-year basis. We cannot do this directly with ggplot’s geom_area, but we can make it happen with a little tweaking:

# tweak data:
dt2<-copy(dt)
dt2<-dt2[,":="(hpa.up=max(0,hpa12),
hpa.down=min(0,hpa12))
,by=c("state","date")]

ggplot(data=dt2[state=="AZ"],aes(x=date))+
geom_area(aes(y=hpa.up),fill="blue",alpha=0.25)+
geom_area(aes(y=hpa.down),fill="red",alpha=0.25)+
theme_minimal()+
labs(x="",y="",title="12-month percent change in Arizona house prices",
caption="@lenkiefer Source: Freddie Mac House Price Index")+
theme(plot.caption=element_text(hjust=0))+scale_y_continuous(labels=percent)

Okay, but sometimes prices are down a little, and other times down a lot. It would be nice to have shading vary by how much prices are up or down. We could take two approaches.

First, we could build a bar chart and have the fill vary according to house prices like so:

ggplot(data=dt[state=="AZ"],aes(x=date,y=hpa12,fill=hpa12))+
geom_col()+
theme_minimal()+
labs(x="",y="",title="12-month percent change in Arizona house prices",
caption="@lenkiefer Source: Freddie Mac House Price Index")+
theme(plot.caption=element_text(hjust=0))+scale_y_continuous(labels=percent)

Alternatively, we could keep subdividing the range of house prices and have shading vary by how much house prices have increased or decreased. Let’s try that with three break points on each side of zero.

df.az<-dt2[state %in% c("AZ")]  #subset data

df.az<-df.az[,c("date","state","hpa12"),with=F]  #only keep relevant columns
colnames(df.az) <- c("date","grouping","y")
origin<-0
# compute max deviation
max.y<-max(abs(df.az$y-origin)) nbands = 3 horizonscale<-max(abs(df.az$y-origin))/nbands
h1<-horizonscale
h2<-horizonscale*2
h3<-horizonscale*3
h1n<- -horizonscale
h2n<- -horizonscale*2
h3n<- -horizonscale*3

df.az <- df.az[ , ":="( ypos1  = ifelse(y>0,min(y,h1),0),
ypos2  = ifelse(y>h1,min(y,h2),0),
ypos3  = ifelse(y>h2,min(y,h3),0),
yneg1 = ifelse(y<0,max(y,h1n),0),
yneg2 = ifelse(y<h1n,max(y,h2n),0),
yneg3 = ifelse(y<h2n,max(y,h3n),0)) ,by=c("date","grouping")]
df.az<- df.az %>% select(-y) %>% gather(type, value, 3:8)
colnames(df.az) <- c("date","grouping","band","value")
df.lk<-data.frame(band=c("ypos1","ypos2","ypos3","yneg1","yneg2","yneg3"),
vmin=c(0,h1,h2,0,h1n,h2n))

df.az<-left_join(df.az,df.lk,by="band")
## Warning: Column band joining character vector and factor, coercing into
## character vector
df.az$v2<-ifelse(abs(df.az$value)<abs(df.az$vmin),df.az$vmin,df.az$value) require(RColorBrewer) ## Loading required package: RColorBrewer col.brew <- brewer.pal(name="RdBu",n=10) ggplot(data=arrange(df.az,value)) + geom_ribbon(aes(x = date,ymin=vmin, ymax = v2, fill=band,group=band),alpha=0.75)+ scale_fill_manual(values=c("ypos1"=col.brew[7], #assign the colors to each of the bands; colors get darker as values increase "ypos2"=col.brew[8], "ypos3"=col.brew[9], "yneg1"=col.brew[4], "yneg2"=col.brew[3], "yneg3"=col.brew[2]))+ labs(x="",y="",title="12-month percent change in Arizona house prices", caption="@lenkiefer Source: Freddie Mac House Price Index")+ theme_minimal()+ theme(plot.caption=element_text(hjust=0))+scale_y_continuous(labels=percent) Here we have sliced prices into 6 regions, three positive and three negative. The further away from 0, the darker the color. Now, if we just squish everything together, inverting the negative valuet to postiive values and overlaying each of the 6 colors, we’ve got a horizon plot: df.az<-dt2[state %in% c("AZ")] #subset data df.az<-df.az[,c("date","state","hpa12"),with=F] #only keep relevant columns colnames(df.az) <- c("date","grouping","y") df5 <- df.az[ , ":="( ypos1 = ifelse(y>0,min(y,h1),0), ypos2 = ifelse(y>h1,min(y,h2)-h1,0), ypos3 = ifelse(y>h2,min(y,h3)-h2,0), yneg1 = -ifelse(y<0,max(y,h1n),0), yneg2 = -ifelse(y<h1n,max(y,h2n)-h1n,0), yneg3 = -ifelse(y<h2n,max(y,h3n)-h2n,0)), by=c("date","grouping")] df6<- df5 %>% select(-y) %>% gather(type, value, 3:8) colnames(df6) <- c("date","grouping","band","value") #df6<-left_join(df6,df.lk,by="band") df6$vmin<-0
df6$v2<-ifelse(abs(df6$value)<abs(df6$vmin),df6$vmin,df6$value) ggplot(data=arrange(df6,value)) + theme_minimal()+ geom_ribbon(aes(x = date,ymin=vmin, ymax = v2, fill=band,group=band),alpha=0.75)+ scale_fill_manual(values=c("ypos1"=col.brew[7], #assign the colors to each of the bands; colors get darker as values increase "ypos2"=col.brew[8], "ypos3"=col.brew[9], "yneg1"=col.brew[4], "yneg2"=col.brew[3], "yneg3"=col.brew[2]))  Yeah, might be hard to see what’s going on here. How about an animated gif: What we have done is densify our data. By compressing the vertical area by a factor of 6 (3x >0, 3x <0), we can show the same data in a much smaller space. Of course we have to interpret it too. You know what’s cool? We can stick these things inside a data table widget! Adapting code from timelyportfolio, try this: ############# magic! ############################################################## library(htmltools) library(DT) library(d3horizonR) myf3<-function (s="Ohio"){ d.out<- filter(dt,statename==s)$emp.pc
return(d.out)
}

myf4<-function (s="Ohio"){
d.out<- filter(dt,statename==s)\$hpa12
return(d.out)
}

emp.dt3 <- dt %>% select(statename)
emp.dt3<-unique(emp.dt3)

emp.dt4 <- emp.dt3 %>%
#mutate(y = lapply(x, function(x) {cumprod(1 + runif(365, -0.05, 0.05))})) %>%
mutate(x = lapply(statename, myf3 ) )  %>%
mutate(x = lapply(x, function(dat) {
d3horizon_chr(
list(dat),
options = d3horizonOptions(height=20),
width = 400
)
}) )%>%
mutate(x2 = lapply(statename, myf4 ) )  %>%
mutate(x2 = lapply(x2, function(dat) {
d3horizon_chr(
list(dat),
options = d3horizonOptions(height=20),
width = 400
)
})
)

m<-
datatable(
emp.dt4,
caption = 'Annual growth in employment and house prices',
escape = FALSE,
colnames=c("State","12 month % change\n in employment ",
"12 month % change \n in house prices"),
options = list(
columnDefs = list(list(width="400px", targets = 2:3)),
fnDrawCallback = htmlwidgets::JS(
'
// not the best way but works fairly well
function(){
HTMLWidgets.staticRender();
}
'
)
)
) %>%
tagList(htmlwidgets::getDependency("d3horizon", "d3horizonR")) %>%
browsable()

Oh yeah! We’re going to find a lot of uses for this in near future.


text:
# Significance of including $S \to ε$ production rule in regular grammar?

Why a production rule $S\to ε$ has been included in the definition of regular grammar? In that case, why it is restricted for $S$ (start symbol) to be present on right hand side of any production rule?

• It corresponds to the start state of a DFA or NFA being an accepting state: the empty string $\varepsilon$ is a member of the language. – BrianO Nov 14 '15 at 21:43

• This grammar shows that it's better not to allow $S$ on the right side at all. – Yuval Filmus Nov 14 '15 at 20:37
• I'd hardly call it a hack. How else would you efficiently define a regular grammar for $(aa)^*$? – Rick Decker Nov 15 '15 at 21:50


text:
# Handling Imbalanced Datasets

I work in the medical domain, so class imbalance is the rule and not the exception. While I know Python has packages for class imbalance, I don't see an option in Orange for e.g. a SMOTE widget. I have read other threads in Stack Exchange regarding this, but I have not found an answer to how to tackle class imbalance in Orange without resorting to Python programming. Thanks

• Good news! Class imbalance is not a problem! stats.stackexchange.com/questions/357466/…
– Dave
Feb 22 at 1:20
• @Dave I would not recommend the linked answer to any beginner with regards to imbalanced datasets since the author reveals some prejudice against imbalanced data handling techniques in his comments. Accordingly, one should have some background knowledge to put his reasoning into perspective. Feb 22 at 12:19

You can add class_weights with dictionary containing class weights, e.g.:

class_weight = {0: 1., 1: 20.}

While SMOTE can be used to synthesize new examples for the minority class (the process is called oversampling) in order to get equal weights.

For Orange please check this link.


text:
# Let ${S_1} = 0$ and ${S_2} = 0$ be two circles intersecting at $P(6,4)$ and both are tangent to x-axis and line $y = mx$ (where $m > 0$ ). If the product of radii of the circles ${S_1} = 0$ and ${S_2} = 0$ is $\dfrac{{52}}{3},$ then find the value of m.

Verified
120.3k+ views
Hint: To solve this question we will assume the coordinates of the centre of the circle and the radius of the circle then will find the angle of the trigonometric function and then the slope of the equation.

Let the centre of the circle be $(h,r)$ as it touches the x-axis.
Therefore, the equation of circle is –
${(x - h)^2} + {(y - r)^2} = {r^2}$ .... (A)
The circle also touches at $y = mx$
Let m be the slope which can be expressed as –
$m = \tan \theta$ .... (B) (Where the angle of the function is made with x-axis)
$\therefore r = h\tan \left( {\dfrac{\theta }{2}} \right)$
Tangent is the inverse function of cot. So, place $\tan \left( {\dfrac{\theta }{2}} \right) = \dfrac{1}{{\cot \left( {\dfrac{\theta }{2}} \right)}}$ in the above equation.
$\therefore r = h\left( {\dfrac{1}{{\cot \left( {\dfrac{\theta }{2}} \right)}}} \right)$
Do cross multiplication, Where numerator of one side is multiplied with the denominator of the opposite side.
$\Rightarrow r.\cot \left( {\dfrac{\theta }{2}} \right) = h$
The above equation can be re-written as –
$\Rightarrow h = r.\cot \left( {\dfrac{\theta }{2}} \right)$ .... (C)
Place the above value in equation (A)
${(x - r.\cot \left( {\dfrac{\theta }{2}} \right))^2} + {(y - r)^2} = {r^2}$
Since both the circles passes through the points $(6,4)$
$\Rightarrow {(6 - r.\cot \left( {\dfrac{\theta }{2}} \right))^2} + {(4 - r)^2} = {r^2}$
Simplify the above equation using the identity ${(a - b)^2} = {a^2} - 2ab + {b^2}$
$\Rightarrow 36 - {r^2}.{\cot ^2}\left( {\dfrac{\theta }{2}} \right) - 12r.\cot \left( {\dfrac{\theta }{2}} \right) + 16{r^2} - 8r = {r^2}$
Simplify the above equation –
$\Rightarrow {r^2}.{\cot ^2}\left( {\dfrac{\theta }{2}} \right) + r\left( { - 12r.\cot \left( {\dfrac{\theta }{2}} \right) - 8} \right) + 52 = 0$
Product of roots is given by $\dfrac{{52}}{3}$
We know that in quadratic equation –
Product of roots is given by $\dfrac{c}{a}$
Now,
$\dfrac{c}{a} = \dfrac{{52}}{3}$
Here we have $a = {\cot ^2}\left( {\dfrac{\theta }{2}} \right)$ and $c = 52$ place values in the above equation –
$\Rightarrow \dfrac{{52}}{{{{\cot }^2}\left( {\dfrac{\theta }{2}} \right)}} = \dfrac{{52}}{3}$
Common multiples from both the sides of the equation cancel each other.
$\Rightarrow \dfrac{1}{{{{\cot }^2}\left( {\dfrac{\theta }{2}} \right)}} = \dfrac{1}{3}$
The above equation implies –
$\Rightarrow {\cot ^2}\left( {\dfrac{\theta }{2}} \right) = 3$
Cot is the inverse function of tangent –
$\Rightarrow \dfrac{1}{{{{\tan }^2}\left( {\dfrac{\theta }{2}} \right)}} = 3$
Cross-multiplication implies –
$\Rightarrow {\tan ^2}\left( {\dfrac{\theta }{2}} \right) = \dfrac{1}{3}$
Take square-root on both the side of the equation –
$\Rightarrow \tan \left( {\dfrac{\theta }{2}} \right) = \pm \dfrac{1}{{\sqrt 3 }}$
Since the circle is in the first quadrant, the tangent is positive.
$\Rightarrow \tan \left( {\dfrac{\theta }{2}} \right) = \dfrac{1}{{\sqrt 3 }}$
By referring to the trigonometric table for values –
$\Rightarrow \tan \left( {\dfrac{\theta }{2}} \right) = \tan \dfrac{\pi }{6}$
Tangent on both the sides of the equation cancels each other.
$\Rightarrow \left( {\dfrac{\theta }{2}} \right) = \dfrac{\pi }{6}$
Simplify the above equation-
$\Rightarrow \theta = \dfrac{{\pi \times 2}}{6}$
Common factors from the numerator and the denominator cancel each other.
$\Rightarrow \theta = \dfrac{\pi }{3}$
Place the above value in equation (B)
$\tan \theta = \sqrt 3 \\ \Rightarrow m = \sqrt 3 \;$
This is the required solution.
So, the correct answer is “ $m = \sqrt 3$ ”.

Note: Follow the All STC rule, and first check for which quadrant the point lies and then take positive or the negative signs for the trigonometric functions. It is most important to follow the correct sign convention.


text:
formal proof: Intersection of two function

Given are the following two functions: $g(x,\theta)=1-\frac{\left( 1-\theta\right) }{\theta}\left( \frac{(x-1)R} {(1-(1-\pi)i)R +\left( 1-\pi\right) i x}\right) \tag{NAG}$ and $f(x)=\frac{\pi xR}{\left[ \left( 1-i\right) R+ix\right] } \cdot\frac{(1-i)}{\left( 1-(1-\pi)(1-i)\right) } \tag{CMP}$

What I want to show is that the intersection point of $g(x,\theta)$ and $f(x)$ increases with $\theta$. I mean that an increase in $\theta$ leads to a new intersection which is characterized by both higher x and higher function value.

This can be shown graphically but what I need is a formal proof. The problem is that solving for the equilibrium is a solution of a complex (but just) quadratic equation.

Note that the CMP is no function of $\theta$ but an increasing function of x $\forall x \in \mathbb{R}_{\leq0}$, thus a change in $\theta$ moves the intersection along CMP. Additionally, NAC is a decreasing function of $x$ $(\frac{\partial g(x,\theta)}{\partial p_{n}}<0$) but the slope of the tangent increases with $\theta$ $(\frac{\partial^2 g(x,\theta)}{\partial p_{n} \partial \theta}>0$). Since the NAC passes independently of the parameter setting through $(1,1)$, an increase in $\theta$, from $\theta^{**}$ to $\theta^{*}$leads to a raise of the angel $\alpha$ moving a low intersection point $(x^{**},y^{**})$ to a higher $(x^{*},y^{*})$. To summarize, what I need is a formal proof that shows that the intersection point increases with an increase in $\theta$. I hope someone can help me to show this with a without the need of solving for the intersection point. (I actually do not know how to start). Thx for your help!!!

-
what is $i$ in your equation? Is it $\sqrt{-1}$? If so, what do you mean when you say the function increases when the function takes complex values? –  Willie Wong Feb 10 '12 at 23:27
sorry I forgot to say that the functions evolve form a theoretical model where $\pi$ and $i$ are only defined at the open interval $(0,1)$, R>=1, $x$>=0. –  Armin Feb 11 '12 at 9:06
I still don't get what are $\pi$ and $i$. Are they functions? What are they functions of? Do they depend on $\theta$ or $x$? For that matter, what is $R$? And please edit clarifications into the question, in addition to responding in the comments. –  Willie Wong Feb 11 '12 at 11:23
These are just constants, thus they do not depent on $\theta$ or $x$. To get an idea what the functions are good for. This is a micro economic model where $\pi$ denotes the fraction of naive households in the economy, $i$ is the fraction of early consuming households and R is the return on an asset. Finally, $\theta$ is a crisis probility. All of these constants are given exogeniously. Finally, the intersection of both functions leads to the the equilibrium price. Thus x is the price in the state without crisis and the function value is the price in the crisis. –  Armin Feb 11 '12 at 11:36
Moreover, what I want to show is that both prices increase with a higher crisis probilty $\theta$, i.e. an increase of $\theta$ leads to an increase of the intersection point and the value of the functions. I hope this answers your questions. –  Armin Feb 11 '12 at 11:39

Okay, you can do this in three steps (BTW, you need to assume also that $\theta\in (0,1)$; I take it that assumption is okay since you call $\theta$ a probability).

Step 1: As you noted, $f(x)$ is an increasing function of $x$ when $x > 0$. In fact, $f(x)$ is strictly increasing: its slope is always positive (using that $\pi,i\in (0,1)$ and $R \geq 1$ by assumption). This implies

If the intersection point increases in $x$, the intersection value $f(x)$ must also increases.

Step 2: As you also noted $g(x,\theta)$, for fixed value of $\theta$, is a decreasing function of $x$. In particular, it is monotonic. Which leads us to

$f(x)$ and $g(x,\theta)$ only intersect once. (Where $x\geq 0$.)

and hence

Consider $\theta_1$ and $\theta_2$. Let $x_1$ be the value such that $f(x_1) = g(x_1,\theta_1)$. Suppose that $g(x_1,\theta_2) > g(x_1,\theta_1)$, then necessarily the intersection point $x_2$ which solve $f(x_2) = g(x_2,\theta_2)$ must satisfy $x_2 > x_1$.

Proof: by monotonicity, for every $0 \leq y \leq x_1$ we have $f(y) \leq f(x_1)$. Similarly we also have $g(y,\theta_2) \geq g(x_1,\theta_2)$. So if $g(x_1,\theta_2) > f(x_1)$, it is impossible that $f(y) = g(y,\theta_2)$. Since the two curves must intersect, they have to intersect somewhere $y > x_1$. q.e.d.

Note that similarly if $g(x_1,\theta_2) < g(x_1,\theta_1)$, the intersection point $x_2$ must be less than $x_1$.

Step 3: So all you need to show now is that if $(x,\theta)$ is such that $f(x) = g(x,\theta)$, for any $\theta' > \theta$, you have that $g(x,\theta') > g(x,\theta)$. Looking at the equation for $g(x,\theta)$, you see that $g(x,\theta)$, for fixed $x > 1$, is an increasing function of $\theta$ (just compute $\partial g / \partial \theta$). So you'd be done if you can show that the intersection point of $f$ and $g$ cannot be a point where $x \leq 1$.

Using the monotonicity again, it suffices to compute $g(1,\theta)$ and $f(1)$. If $g(1,\theta)> f(1)$, then from the same argument as in step 2, we know that the intersection point must be $x > 1. You see immediately that$g(1,\theta) = 1$. On the other hand it is a simple algebraic computation to see that$f(1) < 1$: you just need to show that$\pi (1-i) R < [ (1-i)R + i ][ 1- (1-\pi)(1-i)]$. If you multiply out the right hand side, and subtract from it the left hand side, you get that you just need the inequality$0 < (1-\pi)(1-i)i R + (1- (1-\pi)(1-i))i$to hold, which follows from the assumed range of$\pi,i$and that$R$is positive. - Thx this really helped a lot. One more question: Do you think it is also possible to show the effect of a change in$i$on the intersection point. The problem I face is that both functions change with a varying$i$. Intuitively, what should happen with an increasing$i$is that the function value decreases while$x$increases at the new intersection point. I guess it will not be possible to show this with a similar proof. Nonetheless, thanks for your help and effort. – Armin Feb 12 '12 at 16:39 Initially I would guess that behaviour with regards to$i$would depend on whether$x \geq R$or the other way around. Note that when$x = R$,$g$is independent of$i$and$f$is monotonic in$i$. In each of the regimes$R > x$,$R = x$, and$R < x\$ it may be able to argue similarly, but I am not 100% sure: it requires computing more. –  Willie Wong Feb 13 '12 at 8:45


text:
#### Volume 7, issue 2 (2007)

 Recent Issues
 The Journal About the Journal Editorial Board Subscriptions Editorial Interests Editorial Procedure Submission Guidelines Submission Page Ethics Statement ISSN (electronic): 1472-2739 ISSN (print): 1472-2747 Author Index To Appear Other MSP Journals
Non-commutative multivariable Reidemester torsion and the Thurston norm

### Shelly Harvey and Stefan Friedl

Algebraic & Geometric Topology 7 (2007) 755–777
##### Abstract

Given a 3–manifold the second author defined functions ${\delta }_{n}:{H}^{1}\left(M;ℤ\right)\to ℕ$, generalizing McMullen’s Alexander norm, which give lower bounds on the Thurston norm. We reformulate these invariants in terms of Reidemeister torsion over a non-commutative multivariable Laurent polynomial ring. This allows us to show that these functions are semi-norms.

##### Keywords
Thurston norm, 3–manifolds, Alexander norm, Dieudonné determinant
Primary: 57M27
Secondary: 57N10


text:
# 1. Define the term, anorexia. 2. Define the cachexia. 3. Which pulmonary infections are associated with...

###### Question:

1. Define the term, anorexia. 2. Define the cachexia. 3. Which pulmonary infections are associated with cavitary lesions of the lungs? 4. Which mycobacterial species are included in the Mycobacterium tuberculosis Complex? List the 4 most common species. 5. Which organism in the M.tb Complex is often identified by the niacin test? 6. Define the following terms relative to mycobacteria: a. Photochromogen b. Scotochromogen c. Nonphotochromogen d. Rapid grower 7. List 2 AFB media which are egg-based. W 8. List 2 AFB media which are chemically defined agar based media.Hl 9. List 2 liquid media used to isolate AFB. 10. List 4 antibiotics which are recommended for the treatment of M. tuberculosis. 11. The organism isolated from this patient has the following biochemical characteristics: Nonphotochromogen Growth rate >7 days Niacin production negative Nitrate reductase negative Semi-quantitative catalase positive What is the identity of this AFB? Tween 80 hydrolysis negative Arylsulfatase production negative Urease production negative Tellurite reduction positive Pyrazinamidase production positive 12. What predisposing factors contributed to this patient's acquiring this mycobacterial infection?

#### Similar Solved Questions

##### Clarete The hearof combuslanthc folloxing reactor 2H2(2) 028) ZhzOMAHof ofH2 0xmcl AHolol0 Clmol AHol ol HZO - -89BLu4143 2Nniol~A1.8Hmol-285.0 Vmol5571 Ghmol
Clarete The hearof combuslan thc folloxing reactor 2H2(2) 028) ZhzOM AHof ofH2 0xmcl AHolol0 Clmol AHol ol HZO - -89BLu 4143 2Nniol ~A1.8Hmol -285.0 Vmol 5571 Ghmol...
##### Simple Harmonic motion; The position of a particle is given by the expression x = 2.00 cos...
The position of a particle is given by the expression x = 2.00 cos (2.00πt + 2π/5), where x is in meters and t is in seconds.a) Determine the frequencyb) determine the period of motionc) determine amplitude of motiond) determine phase constante) determine position of particle at t = 0.310...
##### Please show me all the steps two fair dice rolled find the probability that the number...
please show me all the steps two fair dice rolled find the probability that the number of that appears is: a) are both 2 b) have a total that is at most 10 c) are both factors of 70 whose product divides 70 d) add to a number that is divisible by 5...
##### 4.8 Ω 2. Assume that a battery with an emf of 9 V is connected between...
4.8 Ω 2. Assume that a battery with an emf of 9 V is connected between points AA 3.3 Ω and B in the figure to the right. A. What is the equivalent resistance? Show all of your work. B. What is the total current in the circuit? C. Is the potential difference across the 6.3Ω resistor...
##### The accompanying data show the number of pounds of bananas sold per week at a grocery...
The accompanying data show the number of pounds of bananas sold per week at a grocery store when the banana display was positioned in the produce, milk, and cereal sections of the store. Complete parts a and b. Click here to view the banana sales data, Click here to view a table of critical values f...
##### Finance problem
ABC AG and XYZ AG are identical firms in all respects except for their capital structure. ABC is all equity financed with NKr324,000 in equity shares. XYZ uses bothshares and perpetual debt; its equity is worth NKr162,000 and the interest rate on its debt is 9 per cent. Both firms expect EBIT to be ...
On 1/1/2013, Company A acquired 30% of the outstanding common stock of Company B, for $100,000 cash. Company A now has the ability to exercise significant influence with the 30% of ownership. On acquisition date, Company B reports Total Assets at$300,000 and Total Liabilities at $50,000. Any excess... 5 answers ##### The angle between the reflected ray and the normal to the mirror is the same as that between the the incoming ray and the normal to the mirror (usually stated as "the angle of reflection is equal to the angle of incidenceThe formula for the reflection of vectorplane with normal n is a - 2(n -a)n.The following questions will help guide FOu to finding an appropriate place for the mirror.1. Describe the coordlinate system that you will use_ Your coordinate system should be right-handed. Where the angle between the reflected ray and the normal to the mirror is the same as that between the the incoming ray and the normal to the mirror (usually stated as "the angle of reflection is equal to the angle of incidence The formula for the reflection of vector plane with normal n is a - 2(n -... 2 answers ##### Thank you very much for your cooperation Thank you very much for your cooperation. Can you please check some more sentences?1) His soul had gone mad as a result of his solitude in the wilderness. 2) He struggled against the madness of his soul that, however, recognized no limits and ad no faith in anything.3)However, the Russian warns Marl... 5 answers ##### Https Iwwwmedi_microbiology boo_what is basic cakcu emaining Time: 4 hours , 03 minutes_ 44 secondsQuestion Completion Status:How would you describe this molecule? CHzOH CHzOHOHHO OH CHzOH OH OH By NEUROtiker Own work Public Domain hips Icommon:WK3n: 2g_lnge 0 Hydrophobic due having many non-polar bonds lilke 0-H Hydrophobic due i0 naving many polar bonds Ilke C-H Aydrophilic due having many polar bonds Ilke O-H Hurtannme Ane In havinn many non-nnian Acnnn Mke C-H Click e @uo Submt ! 501"â‚ https Iwwwmedi_ microbiology boo_ what is basic cakcu emaining Time: 4 hours , 03 minutes_ 44 seconds Question Completion Status: How would you describe this molecule? CHzOH CHzOH OH HO OH CHzOH OH OH By NEUROtiker Own work Public Domain hips Icommon:WK3n: 2g_lnge 0 Hydrophobic due having many non-... 5 answers ##### "huttho ARennaamoduStaimarth Sicol Mumenth 45 o "huttho ARenna amodu Staimarth Sicol Mumenth 45 o... 1 answer ##### Find the present value of payments of$250 every six months starting immediately and continuing t...
Find the present value of payments of $250 every six months starting immediately and continuing through 6 years from the present, and$150 every six months thereafter through 15 years from the present. if i(2) = 5.5%....
##### [una Sann"crgolonioology com/common-assessmert dellvery/start/32023101957action-oniesumcBsubmissionld GouPS esdurces IgrADE reporuShow what you know: Nonlinear Systems by GraphingIndicato Ine ~xution t0 /he system 0/ noninear oquallons by Ivpirig vour solubon Imio Fao DtowdudsolutonEoluuon _Support]Schoology Bloglp'
[una Sann" crgoloni oology com/common-assessmert dellvery/start/32023101957action-oniesumcBsubmissionld GouPS esdurces IgrADE reporu Show what you know: Nonlinear Systems by Graphing Indicato Ine ~xution t0 /he system 0/ noninear oquallons by Ivpirig vour solubon Imio Fao Dtowdud soluton Eoluuo...
Question 14 Question 14 of 20 1 points Save As Been The-Bonnet Company purchased office supplies costing $8.000 and de l es for the on hand. The appropriateadusting journal entry to be made at the end of the period would be amount At the end of the accounting period i cal count of succ e d Debit Sup... 5 answers ##### (a) In the past the standard deviation of weights of certain32.0-oz packages filled by a machine was 0.25 oz. A random sampleof 24 packages showed a standard deviationof 0.34 oz. Is the apparent increase in variabilitysignificant at the 0.10 level of significance? Assume packageweight is normally distributed.H0: ðœŽ is less than isgreater than is equal to is not equalto 0.25Ha: ðœŽ is less than isgreater than is equal to is not equalto 0.25ðœ’2= 42.54(i) Find the p-value. (Give your answe (a) In the past the standard deviation of weights of certain 32.0-oz packages filled by a machine was 0.25 oz. A random sample of 24 packages showed a standard deviation of 0.34 oz. Is the apparent increase in variability significant at the 0.10 level of significance? Assume package weight is normal... 5 answers ##### Constants hospital needs 0.100 g of 53 Xe for lung-imaging test: it takes 10 days to receive the shipment; what is the minima amount mnxc of xenon that the hospital should order?The radioactive isotope 133Xe is used in pulmonary respiratory studies to image the blood flow and the air reaching the lungs The half-life of this isotope days_Express your answer numerically In gramsVlew Avallable HInt(s)AZdMnXe Constants hospital needs 0.100 g of 53 Xe for lung-imaging test: it takes 10 days to receive the shipment; what is the minima amount mnxc of xenon that the hospital should order? The radioactive isotope 133Xe is used in pulmonary respiratory studies to image the blood flow and the air reaching the l... 2 answers ##### (a) The Singapore Ministry of Transport is considering awarding a licence for another cargo handler at... (a) The Singapore Ministry of Transport is considering awarding a licence for another cargo handler at Changi International Airport. With reference to a ground handler of your choice that provides cargo handling at Changi International Airport, analyse the nature of operations and services provided ... 3 answers ##### L29Question HelpSkelch the graph 0l the tollowing function: List tre coordinates of where extrema or points of inilection occur State where the function increasing Or decreasing as well as where it IS concave up Or concave down I)= 27x Whal are the coordinales ol the relative extrema? Select the correct choice below and, if necessary: fll In (he answer box (0 complele your choke.The coordinates 0l Ihe relative extrema (Simplty your answer. Type an ordered pair Type an exaci answer using radikal L29 Question Help Skelch the graph 0l the tollowing function: List tre coordinates of where extrema or points of inilection occur State where the function increasing Or decreasing as well as where it IS concave up Or concave down I)= 27x Whal are the coordinales ol the relative extrema? Select the... 5 answers ##### Tempcrature uf U"( . (N Huu Huumaa UAuC 0 Is M( pressure r J5 H(mu inereuscu t0 242"F and the volune increused The tempcruture o the Fus (Wn) mL_ The final pressure of the guin Paiaelosesu4: None Iliate LFiE u' I 430' J)in.iu" tempcrature uf U"( . (N Huu Huumaa UAuC 0 Is M( pressure r J5 H(mu inereuscu t0 242"F and the volune increused The tempcruture o the Fus (Wn) mL_ The final pressure of the guin Paiaelosesu4: None Iliate LFiE u' I 430' J)in.iu"... 1 answer ##### How do you find the derivative of sin (cos (tanx) )? How do you find the derivative of sin (cos (tanx) )?... 1 answer ##### February 1, Jones repurchased 2,000 shares of treasury stock at a price of$18 per share. March...
February 1,   Jones repurchased 2,000 shares of treasury stock at a price of $18 per share. March 1, 800 shares of treasury stock repurchased above were reissued at$17 per share. March 18,     500 shares of treasury st...
##### Marks: 2.5 Due: Week 5 lab class Classes and Objects Create a PC class that contains...
Marks: 2.5 Due: Week 5 lab class Classes and Objects Create a PC class that contains the following members: A private data member to store the speed of the CPU - A private data member to store the capacity of the hard disk - A private data member to store the capacity of the RAM - A private data mem...
##### The accountant of Maypole plc has just completed the financial reports for the year ended 31st...
The accountant of Maypole plc has just completed the financial reports for the year ended 31st December 2017. The Financial Director has asked for a report to be prepared to enable the Board of Directors to get a clear picture of the performance and financial position of the company. The company pro...
##### 6.8. The heat treatments noted below are carried out in 1080 steel. In each case what phases will...
Phase, TTT, and CCT diagrams provided 6.8. The heat treatments noted below are carried out in 1080 steel. In each case what phases will be present at the end of the treatment? a. Austenitize at 750 deg C; quench to 0 deg C in 1s. b. Austenitize at 750 deg C; rapid quench to 650 deg C; isotherma...
##### Consider the function T: D3 Z/2 in Example 79.2 in the Skeleton Notes. By writing down the multiplication table for D3 and for Z/2, explain why T is a homomorphism _ Hint: You probably want to use color to show which elements get mapped to 0 and which elements get mapped to 1.
Consider the function T: D3 Z/2 in Example 79.2 in the Skeleton Notes. By writing down the multiplication table for D3 and for Z/2, explain why T is a homomorphism _ Hint: You probably want to use color to show which elements get mapped to 0 and which elements get mapped to 1....
##### Mobile phone users are changing their providers frequently: customer sur- vey in Connectiland gathered the following information about the three locab mobile phone providers CHATTERBOX HUGEDATA and STREAMKINGOf the customers of CIATTERBOX at given time, 70% are still with CHATTERBOX, 20% have moved to HUGEDATA and 10% are using STREAMKING two months later. Of the customers of HUGEDATA given time, 507 are still with HUGEDATA , 30% have changed to CIATTERBOX and 20% are using STREAMKING two months
Mobile phone users are changing their providers frequently: customer sur- vey in Connectiland gathered the following information about the three locab mobile phone providers CHATTERBOX HUGEDATA and STREAMKING Of the customers of CIATTERBOX at given time, 70% are still with CHATTERBOX, 20% have moved...

-- 0.023711--


text:
# C++

Welcome back to a new post at thoughts-on-cpp. This time I will write about something different, not quite technical and C++ related. Well, not exactly. It’s a post about team education, about how to evolve the C++ knowledge of a team which is, in my case, not build up with computer science experts, but purely with domain experts (in my development team we are all mechanical engineers or mathematicians). You may ask, why the hell are they doing software engineering only with domain experts? This will be for sure another blog post, I promise, to talk about this.

This time I would like to give a short introduction into a nice little library I just encountered. It’s called loguru and it’s a lightweight, Thread-Safe, logging library with an impressive good written documentation and human-readable output.

Welcome back to another exciting part of the n-body-problem post series. This time we are going to implement the Euler-Method to make the tests, we defined in the last post, pass. If you just dropped in or need to fresh up your memory see the links to the previous posts below. I also stumbled upon a very good presentation of the n-body-problem topic. Even if it’s quite mathy, it serves us as good background information.

Welcome back to the n-body-problem series. Last time we’ve been setting up our project structure and CMake setup. According to some helpful reddit comments, I adapted our CMake setup a bit, but I’m still not absolutely sure if the project structure, as it is now, will last to the end of the project. If you’ve missed any of the earlier posts, you can find them here:

Because we want to exercise TDD, we somehow need to define some test cases first before we can implement our solver library. A simple scenario would be two points with an equivalent mass $M$, a distance of $r$ and no initial velocity and acceleration. Clearly we could do hundreds of different complex tests with it. But i would like to start with two very simple and specific tests, point masses accelerating and moving only in x- and y-direction sole. This way we can check that, at least the basis, assumptions, formulas, and implementations are correct.


text:
Volume 273 - 16th International Conference on B-Physics at Frontier Machines (BEAUTY2016) - Semileptonic and rare decays
Semileptonic at B-factories (RD, RD*)
J. Hasenbusch
Full text: pdf
Published on: 2016 November 15
Abstract
Recently, the measurements of R(D) and R(D*) at the B-factories showed a significant tension with the SM. Here, a new analysis of R(D*) using a semileptonically tagged sample by the Belle collaboration is presented. The new result of $R(D^*) = 0.302 \pm 0.030{\rm (stat)} \pm 0.011{\rm(sys)}$ is compatible with the previous measurements by Belle, BaBar and LHCb and increases the tension with the SM to $4\sigma$. A study of $B \to D^(*)\pi\pi\ell\nu$ by BaBar is shown which allows for better constraints on the semileptonic B-meson background in R(D) and R(D*) analyses. They find a value of $\mathcal{B}(B \to D^(*)\pi\pi\ell\nu) = 0.51^{+0.30}_{-0.15}\%$. Furthermore, BaBar studied the decay $B \to D^*\pi\pi\pi$ which is an important background, too, especially when it comes to analyses with hadronic $\tau$ final states. Their analysis yields $\mathcal{B}(B \to D^(*)\pi\pi\pi = (7.37 \pm 0.11 \pm 0.31 ) \cdot 10^{-3}$.
DOI: https://doi.org/10.22323/1.273.0047
Open Access


text:
# The number $\pi$ in an unexpected context

[This is a follow-up question to this one: Figures and Numbers: Relating properties of geometric shapes and their Fourier series.]

Drawing shapes by some predefined Fourier series I found this square with rounded corners which is given by the Fourier series

$$a_k = \begin{cases} +\pi^{-k} & \text{ for } k \equiv 1 \pmod 4 \\ +\pi^{-k} & \text{ for } k \equiv 3 \pmod 4\\ 0 & \text{ otherwise } \end{cases}$$

$$b_k = \begin{cases} +\pi^{-k} & \text{ for } k \equiv 1 \pmod 4\\ -\pi^{-k} & \text{ for } k \equiv 3 \pmod 4\\ 0 & \text{ otherwise } \end{cases}$$

Compare this to the perfect square given by

$$a_k = \begin{cases} +k^{-2} & \text{ for } k \equiv 1 \pmod 4 \\ +k^{-2} & \text{ for } k \equiv 3 \pmod 4\\ 0 & \text{ otherwise } \end{cases}$$

$$b_k = \begin{cases} +k^{-2} & \text{ for } k \equiv 1 \pmod 4\\ -k^{-2} & \text{ for } k \equiv 3 \pmod 4\\ 0 & \text{ otherwise } \end{cases}$$

Note that for bases different from $$\pi$$ in the formulas for $$a_k$$ and $$b_k$$, the rounded square hasn't got so "straight" sides anymore, e.g. for base $$2.5$$ and $$4.5$$:

My question is:

Might it be true, that for base $$\pi$$ in the formulas for $$a_k$$, $$b_k$$ above, the resulting shape has "maximally straight" sides? And if so: How to prove it?

First, of course, one has to define what "maximally straight" means.

For the sake of comparison here is the unrounded square with exponents $$1.5$$ and $$2.5$$ instead of $$2$$ in the corresponding formulas. As in the case of the rounded square, $$2$$ (instead of $$\pi$$) yields the "maximally straight" sides.

• I guess maximally straight could mean that $\pi$ is the largest base such that the resulting shape is convex. Whether that's true I don't know – Bananach Apr 6 at 8:20
• @Banach: I guess you mean the smallest base such that the resulting shape is convex. – Hans-Peter Stricker Apr 6 at 8:22
• Yes, I do. And since we are only interested in the sign of the curvature, which is equal to that of $x'y''-x''y'$, this might actually be feasible – Bananach Apr 6 at 8:48
• @Banach: Do you plan to give it a try? – Hans-Peter Stricker Apr 6 at 8:50
• It looks like $\pi$ doesn't give a convex shape, one can visually check that the line $y=x+0.40065$ cuts the shape in four points, so the shape's "sides" bend inwards. Following Bananach's approach and setting the curvature $K(a,t)$ to zero at $t=\pi/4$, and if WolframAlpha is not mistaken, it seems that the minimum such number is actually $a=\sqrt{2+2\sqrt{3}+\sqrt{15+8\sqrt{3}}} = 3.291795...$, the greatest positive solution to $a^{10}-9a^8-22a^6+22a^4+9a^2-1=0$. – pregunton Apr 6 at 14:05


text:
# Algorithmic approach to finding two vectors that span a plane

I am working on an experiment where I need to align a magnetic field to be parallel to a nanoscale wire embedden in a microscale planar structure. My tools for doing so are two-fold: the planar structure produces a signal $S_P$ (a resonance frequency) that is maximal when the field is fully in plane and that drops off in a typical angle-dependence fashion when not in plane; this dependence smooth and monotonic and essentially noise free, but the visibility quickly reduces when out of plane as the frequency moves out of our measurement window. Similarly (but subject to more stringent conditions) I have a signal $S_W$ produced by the wire that is maximal when the field is in the plane of the planar structure and parallel to the wire; also a resonance frequency. It quickly goes down in an angular fashion both w.r.t. the in-plane angle and the out-of-plane angle. My task is then, with these tools in hand, to align the magnetic field parallel to the wire.

Given that the field is homogeneous over scales much larger than the structures, I believe one can reduce this problem to a more general problem of aligning a 3D vector with spherical coordinates $\vec{v} = (r, \phi, \theta)$ (red) to be parallel to a 1D line (blue) that lies in a 2D plane with unknown vector span (green), at some unknown angle $\xi$ w.r.t. that plane.

To do this alignment, I had the following idea. In spherical coordinates I can 'algorithmically' control $\phi$ and $\theta$ of the (red) magnetic field vector while monitoring $S_P$, to find two vectors that span the plane. I use these two vectors to set up a new polar coordinate system of that plane, in which I can then sweep the polar angle to find $\xi$ and maximize $S_W$. The second part should be trivial, but the first part is what my question is about. How do I find two vectors that span the plane, controlling $\phi$ and $\theta$ and monitoring $S_P$?

As it currently stands I can rather easily find a single vector that works by simply varying $\phi$ and $\theta$ until $S_P$ reaches a maximum in both parameters simultaneously, but how do I go from there to find a linearly independent vector that is also in the plane? How should I algorithmically 'walk' through $\phi,\theta$ space to find that other vector? I say walk because what I envision the method to be like is that I start from the local maximum, 'overrotate' in $\theta$, bring $S_P$ back up with $\phi$ and overrotate, that one a bit, and then go back to theta and repeat. That will walk me through the angle space, but how I use this to find the second vector I am not sure of.

Context

Since this is a place where we discuss physics, it might be interesting to give some context. We are working on a 'gatemon' type device (see https://arxiv.org/abs/1503.08339) which is essentially a transmon qubit with a semiconducting nanowire as the junction, and proximity-effect-induced superconducting islands made out of semiconductor segments with superconductor shells. It has a charging energy and a josephson energy and thus a resonance frequency $S_W$, and we couple it to a planar waveguide with resonance frequency $S_P$. We're interested in studying its properties in a magnetic field, but it needs to be in the plane of the waveguide to keep that superconducting, and parallel to the wire to keep that superconducting. So I'm working on a good way to get that alignment as precise as possible.

• You have the angles $\theta$ and $\phi$ of the red vector and are looking for spanning vectors of the perpendicular green plane? – Jasper Dec 29 '17 at 13:06
• That's an unintended feature of the figure, the green plane is not perpendicular, it is at an unknown angle with the red vector. I don't know the basis of the green plane. – user129412 Dec 29 '17 at 13:18
• Sweep theta with phi=0 until maximum for first vector of plane, then repeat with theta=90degrees and sweep phi for second vector. – Jasper Dec 29 '17 at 13:48
• I'm afraid that doesn't work, which I should have specified. If the field is too far out of plane $S_P$ will go down, which will be the case for theta = 90 degrees. That by itself is fine, as long as it'll come up again, but it won't. Having too large out of plane field will introduce vortices in the planar resonator (reducing its resonant frequency due to kinetic inductance) that won't come out unless you heat the entire system above T_c, and in that case we'd have to start from scratch. – user129412 Dec 29 '17 at 14:41
• Then your proposed solution is probably the best one. Start from your first maximum in both $\theta$ and $\phi$, change one of them by e.g. $\Delta\theta$ and change $\phi$ to find the maximum again. You can then repeat this until the new vector is (almost) perpendicular to the first one, this should result in the best condition for the second sweep. – Jasper Jan 5 '18 at 11:50

The line that you're searching is perpendicular to the vector $\vec v$. If $\pi$ is a plane normal to $\vec v$, this line, say $R$ is inside $\pi$. You know that this line is in another plane. So the straight line that you are searching is the intersection of this two planes.

The vectors in the plane normal to $\vec v$ follow the equation:

$$\vec x \cdot \vec v = 0$$

The vectors in the other plane follow the equation:

$$\vec x \cdot \vec n = 0$$

We can find the direction of the straight line performing the cross product of the two vectors:

$$\vec d = \vec { n } \times \vec { v }$$

Using a point $\vec a$ that lies in the two planes, the equation of your line is:

$$\bbox[5px,border:2px solid red] { \vec x = \vec a + t \vec d }$$

• I'm afraid that is an artifact of the drawing, the line does not have to be perpendicular to v, and most likely it is not. So I don't think that'll work then. Unless of course it has to be perpendicular to v and I am not seeing it, I could be mistaken. But something like this might work; I can find two vectors $\vec{v}$ that are in the plane ($S_P$ is maximal in phi and theta) and take their normal, and use that together with a point in the plane to construct it. Then use two basis vectors of that plane to try and do the polar sweep. – user129412 Dec 29 '17 at 14:45

Consider the following picture:

Green is an arbitrary plane through the origin (corresponding to the plane in the picture of the question), red the xz plane and blue the xy plane. Angles are also taken from there.

If you set $\phi=0$ and sweep $\theta$ clockwise, you'll get a maximum of $S_p$ if you reach the black arrow.

Likewise, for $\theta=90^\circ$, $S_p$ will be maximal if $\phi$ describes the yellow arrow.

Both arrows define the plane (except for corner cases when the green plane is one of the coordinate planes).

Why do you think this doesn't work?

• I see what you mean, it is a good idea. But say that the green plane is almost parallel to the z-axis in the picture. Setting theta to 90 will then lead to a large out-of-plane field, which causes problems by creating vortices I can no longer get out. So I can't go there in one step, I need a way to get from the black arrow to the yellow arrow, without getting too far out of plane. I'd need to somehow walk through phi, theta space, with that goal in mind. So that moves the question of finding the basis (which your vectors form) to how to map out that basis without going too far out of plane. – user129412 Dec 29 '17 at 15:55


text:
Label Class Conductor Discriminant Rank* Torsion $\textrm{End}^0(J_{\overline\Q})$ Equation
676.a.562432.1 676.a $$2^{2} \cdot 13^{2}$$ $$2^{8} \cdot 13^{3}$$ $0$ $\Z/21\Z$ $$\Q \times \Q$$ $y^2 + (x^3 + 1)y = 2x^5 + 2x^4 + 4x^3 + 2x^2 + 2x$


text:
SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 6
• 7
• 8
• 9
• 10

Cuchulainn
Posts: 59014
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: DL and PDEs

ISayMoo
You chose not  to answer the most important question

"But ... what's the problem, i.e. the question that is trying to get out?"

So, next time I will write

These questions are not even wrong. (JUST KIDDING)
But ... SERIOUSLY what's the problem, i.e. the question that is trying to get out?

Makes sure don't act the 6-year old.

Cuchulainn
Posts: 59014
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: DL and PDEs

Instead of applying NNs to ODEs, apply ODEs to NNs: https://arxiv.org/abs/1806.07366
Another thing: this is an article of 10 pages and > 100 references! Something really odd here. Maybe it's ML style?

ISayMoo
Posts: 1718
Joined: September 30th, 2015, 8:30 pm

### Re: DL and PDEs

I think it's nice when people are conscious about giving credit for previous work.

ISayMoo
Posts: 1718
Joined: September 30th, 2015, 8:30 pm

### Re: DL and PDEs

ISayMoo
You chose not  to answer the most important question

"But ... what's the problem, i.e. the question that is trying to get out?"

So, next time I will write

These questions are not even wrong. (JUST KIDDING)
But ... SERIOUSLY what's the problem, i.e. the question that is trying to get out?

Makes sure don't act the 6-year old.
Seriously: the first Section explains what their goal is.


text:
# Domain and range  (Page 4/4)

 Page 4 / 4

1. Total expression within the square root as a whole is non-negative number as square root of a negative number is not a real number.
2. For positive value of "y" in the numerator, the denominator is non-negative as square root of a negative number is not a real number.
3. The denominator does not evaluate to zero. The form “y/0” is undefined.

For the first requirement, the expression in the square root should be greater than or equal to zero i.e non-negative number.

$\frac{y}{1-y}\ge 0$

$⇒y\ge 0$

Further, denominator of the expression “1-y” is non-negative. Also, “1-y” is not equal to zero. Combining two requirements, the expression is a positive number :

$1-y>0$

$⇒y<1$

Combining two intervals i.e. intersection of two intervals, we have the range of the function as :

$⇒0\le y<1$

## Classification of functions

In mathematics, we deal with specific real functions, which are characterized by specific domain, range and rules. Some of the familiar functions are polynomial, rational, irrational, trigonometric, exponential, logarithmic functions and piece wise defined functions etc. These functions are further combined to form more complex function following certain definition or rule so that function is meaningful for real values.

There are varieties of functions. These functions are broadly classified under three headings :

• Algebraic functions : polynomial, rational and irrational functions
• Transcendental functions : trigonometric, inverse trigonometric, exponential and logarithmic functions
• Piece wise defined functions : modulus, greatest integer, least integer, fraction part functions and other specific piece wise definitions

Polynomial function is further classified based on (i) numbers of terms eg. monomial, binomial, trinomial etc. (ii) numbers of variables involved eg. function in one or two variables and (iii) degree of the polynomial eg. linear, quadratic, cubic, bi-quadratic etc.

Generally we deal with function expressions in one variable in which dependent variable (y) is explicitly related to independent variable (x). Such functions are called explicit function.

$y={x}^{2}-2x+1$

On the other hand, there are function rules in which “y” is not explicitly related to “x”. Such functions are called implicit functions.

$\mathrm{sin}\left({x}^{2}+xy+{y}^{2}\right)=xy$

Further, we also use properties of function like periodicity (repetition of function values at regular intervals of independent variable) and polarity (odd or even) to characterize a function. For this reason, we sometimes name a function like periodic, non-periodic, aperiodic, odd, even or equal function etc.

## Important concepts

In this section, we discuss few important concepts, which are frequently used in determining domain and range.

## Defined and undefined expressions

Defined expressions are meaningful and unambiguous. On the contrary, undefined expressions are not meaningful. Most of the undefined expressions results from combination of zeros and infinity in various ways. There is, however, no unanimity about “undefined” values among mathematicians. Hence, we shall present two lists – one list which is undefined in all contexts and another list which may be defined in certain context. We consider this later list as defined expressions, unless otherwise stated.

Undefined in all contexts

$\frac{x}{0},\phantom{\rule{1em}{0ex}}\infty -\infty ,\phantom{\rule{1em}{0ex}}{\left(-1\right)}^{\infty },\phantom{\rule{1em}{0ex}}\frac{\infty }{\infty },\phantom{\rule{1em}{0ex}}0X\left(-\infty \right)$

We should understand here that an expression is undefined when it can not be interpreted. The important point is that it has got nothing to do with the magnitude of quantity. Emphatically, infinity is not undefined. We shall discuss this aspect subsequently.

Note that " ${\left(-1\right)}^{\infty }$ " is undefined, because it is not certain whether the expression will evaluate to "-1" or "1". On the other hand, expression " ${\left(1\right)}^{\infty }$ " is defined because we are sure that the expression will evaluate to "1", however large is infinity.

Defined in some contexts

${0}^{0}=\text{undefined or 1}$

${\infty }^{0}=\text{undefined or 1}$

${1}^{\infty }=\text{undefined or 1}$

$0X\infty =\text{undefined or 0}$

For our purpose, unless otherwise stated, we shall consider later set as defined.

## Infinity

Infinity is not a member of real number set “R”. Strictly we can not write infinity like :

$x=\infty ,\phantom{\rule{1em}{0ex}}\text{where “x” is real.}$

For this reason, the interval of real number set is defined in terms of infinity without equality as :

$-\infty

We may emphasize that infinity by itself is “unbounded” – not undefined. What it means that we can interpret infinity – even though its value is not known. We can say it is very large number (either positive or negative as the case be), but we can not interpret undefined values at all.

It is easy to interpret operations with infinity. We need to only keep the meaning of infinity as a very large number in focus. Various operations, involving infinity are presented here :

1: The plus or minus infinity is not changed by adding or subtracting real number.

$\infty ±x=\infty$

$-\infty ±x=-\infty$

Above results are on expected line. Addition or subtraction of finite values will only yield a large number. It is so because infinity can be greater than a large value that we might conceive.

2: Addition of two infinities is infinity.

$\infty +\infty =\infty$

3: Difference of two infinities is undefined.

$\infty -\infty =\text{Undefined}$

Addition of two infinities is definitely a very large number. We are, however, not sure about their difference. The difference of two infinities can either be small or large. It depends on the relative "largeness" of two infinities. Hence, difference of two infinities is "undefined".

4: Product of two infinities are inferred as :

$\infty X\infty =\infty$

$-\infty X\infty =-\infty$

$-\infty X-\infty =\infty$

5: Product of infinity with a real number “x” is given as :

$xX\infty =\infty ,\phantom{\rule{1em}{0ex}}\text{if}\phantom{\rule{1em}{0ex}}x>0$

$xX\infty =-\infty ,\phantom{\rule{1em}{0ex}}\text{if}\phantom{\rule{1em}{0ex}}x<0$

$xX\infty =0,\phantom{\rule{1em}{0ex}}\text{if}\phantom{\rule{1em}{0ex}}x=0$

6: Division of infinity by infinity is not defined.

$\frac{\infty }{\infty }=\text{Undefined}$

7: A real number, “x”, raised to infinity

${x}^{\infty }=0,\phantom{\rule{1em}{0ex}}\text{if}\phantom{\rule{1em}{0ex}}0

${x}^{\infty }=0,\phantom{\rule{1em}{0ex}}\text{if}\phantom{\rule{1em}{0ex}}x=0$

${x}^{\infty }=\infty ,\phantom{\rule{1em}{0ex}}\text{if}\phantom{\rule{1em}{0ex}}x>1$

8: An infinity raised to infinity is defined.

${\infty }^{\infty }=\infty$

where we get a research paper on Nano chemistry....?
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
What is power set
Period of sin^6 3x+ cos^6 3x
Period of sin^6 3x+ cos^6 3x