text:
## How to output user defined variable to the vtu file?

Post processing utility for Elmer
Jenwel
Posts: 20
Joined: 22 Jun 2017, 07:07
Antispam: Yes

### Re: How to output user defined variable to the vtu file?

Hi Peter,

Thank you! The DG type of elemental field is necessary. And I still encounter the problem that I cannot define the similar variable Phys of Peddy for elemetal field.

I checked the source code "CalcFields .F90" and "FourierLoss.F90", I found I should define another dummy solver in an initialization subroutine? And maybe I should also define these variables in this dummy solver? As:

Code: Select all

! Create DG solver structures on-the-fly without actually solving the matrix equations.
ALLOCATE(Solvers(n+1))
Solvers(1:n) = Model % Solvers

Solvers(n+1) % Values => ListAllocate()
DGSolverParams => Solvers(n+1) % Values
CALL ListAddLogical( DGSolverParams, 'Discontinuous Galerkin', .TRUE. )
Solvers(n+1) % DG = .TRUE.
Solvers(n+1) % PROCEDURE = 0
Solvers(n+1) % ActiveElements => NULL()

CALL ListAddString( DGSolverParams, 'Exec Solver', 'never' )
CALL ListAddString( DGSolverParams, 'Equation', 'CoreLoss_Dummy' )
'CoreLoss CoreLossSolver_Dummy',.FALSE. )

CALL ListAddString( DGSolverParams, "Exported Variable 1 =", "Core Loss Phys e" )
CALL ListAddString( DGSolverParams, "Exported Variable 2 =", "Core Loss Peddy e")
CALL ListAddString( DGSolverParams, "Exported Variable 3 =", "CoreLoss_e" )

!PRINT *, "Initial Done", i
DEALLOCATE(Model % Solvers)
Model % Solvers => Solvers
Model % NumberOfSolvers = n+1

END SUBROUTINE CoreLossSolver_init0
An additional dummy solver is also defined:

Code: Select all

!------------------------------------------------------------------------------
SUBROUTINE CoreLossSolver_Dummy(Model,Solver,dt,Transient)
!------------------------------------------------------------------------------
USE MagnetoDynamicsUtils

IMPLICIT NONE
!------------------------------------------------------------------------------
TYPE(Solver_t) :: Solver
TYPE(Model_t) :: Model

REAL(KIND=dp) :: dt
LOGICAL :: Transient
!------------------------------------------------------------------------------
END SUBROUTINE CoreLossSolver_Dummy
!------------------------------------------------------------------------------
But when I want to link the pointer to the variable "Core Loss Phys e" in the actual subroutine CoreLossSolver, as:

Code: Select all

Ph_E => VariableGet( Mesh % Variables,'Core Loss Phys e' )
IF(.NOT. ASSOCIATED( Ph_E ))THEN
CALL Fatal('CoreLossSolver','Variable Core Loss Phys e does not exist')
END IF
The ERROR is reported:

Code: Select all

Model Input:  Unlisted keyword: [keddy] in section: [constants]
Model Input:  Unlisted keyword: [axiall] in section: [constants]
WARNING:: CheckTimer: Requesting time from non-existing timer: LoadMesh
WARNING:: CheckTimer: Requesting time from non-existing timer: MeshStabParams
MAIN:
MAIN: -------------------------------------
MAIN:  Time: 1/5   1.0000003999999999E-004
MAIN: -------------------------------------
MAIN:
WARNING:: CheckTimer: Requesting time from non-existing timer: PeriodicProjector
20 0.1011E+00
40 0.1733E-01
60 0.2544E-02
80 0.1113E-04
100 0.6558E-05
ComputeChange: NS (ITER=1) (NRM,RELC): (  2543.3687      1.0000000     ) :: mgdyn2d
20 0.7383E-03
40 0.2947E-03
60 0.2052E-03
80 0.1853E-04
100 0.1077E-06
ComputeChange: NS (ITER=2) (NRM,RELC): (  2556.8740     0.69178087E-01 ) :: mgdyn2d
20 0.6419E-05
40 0.5531E-05
60 0.4932E-05
80 0.9396E-07
ComputeChange: NS (ITER=3) (NRM,RELC): (  2550.2542     0.97899601E-02 ) :: mgdyn2d
ComputeChange: NS (ITER=4) (NRM,RELC): (  2550.8919     0.21344349E-03 ) :: mgdyn2d
ComputeChange: NS (ITER=5) (NRM,RELC): (  2550.8838     0.29937164E-05 ) :: mgdyn2d
ComputeChange: NS (ITER=6) (NRM,RELC): (  2550.8838     0.99764275E-07 ) :: mgdyn2d
WARNING:: GetPermittivity: Permittivity not defined in material, defaulting to that of vacuum
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.79328062E-01  2.0000000     ) :: calcfields
ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.88136685E-01 0.10519973     ) :: calcfields
ComputeChange: NS (ITER=6) (NRM,RELC): ( 0.50781544E-03  2.0000000     ) :: calcfields
ComputeChange: NS (ITER=9) (NRM,RELC): (  545766.69      2.0000000     ) :: calcfields
Nsize =       12704
Nelem =       76602
CurrentTimeStep =           1
Ph % Values(1) =   0.0000000000000000
Nelem =       11362
ERROR:: CoreLossSolver: Variable Core Loss Phys e does not exist

It seems that the defined variable for elemental field is not linked, or defined.
The source code is uploaded. I do not know why did this problem occur?
Attachments
CoreLoss_Ver07.F90
Jenwel
Posts: 20
Joined: 22 Jun 2017, 07:07
Antispam: Yes

### Re: How to output user defined variable to the vtu file?

Hi,
Now the core loss of each node has been solved.
But, I do not know how to get the relationship between the element and its nodes, for the triangular type elements.
Is there any variable that denotes such mapping?
I can find some data in "mesh.elements", but I do not know how to invoke them.

If the relationship between the elements and nodes are determined, the average core loss of each element can be calculated.

BR
Jenwel
raback
Posts: 3744
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

### Re: How to output user defined variable to the vtu file?

Hi

Code: Select all

myave = MyVar % Values( MyVar % Perm(Element % NodeIndexes ) ) / Element % Type % NumberOfNodes

Note however, that when your field is discontinuous doing the galerkin fit to the nodes might not be the best thing. For the AV solver we usually look at elemental quantities that are computed first as elemental DG fields, and then averaged among elements in same body, if requested.

-Peter
Jenwel
Posts: 20
Joined: 22 Jun 2017, 07:07
Antispam: Yes

### Re: How to output user defined variable to the vtu file?

Hi, Peter

Thank you for the instruction. I agree that the fitting is not the best thing.
I found it difficult to programme a new solver, so I add the suboutine in the "CalcFields.F90". Now the elemtal DG field can be solved at first, as shown below:
CoreLoss_ElementField.jpg
CoreLoss_ElementalField
But, it is weird that the core loss also exists in the air gap.
I know it is caused by the principle to calculate the core loss. The core loss is calculated based on flux density, and actually the flux density also exists in the air gap region.
I do not know can I distinguish the material of the element and know it is the electrical steel or air? For the elements that belong to air, the core loss should be ZERO.

Thank you so much!

BR
Jenwel
raback
Posts: 3744
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

### Re: How to output user defined variable to the vtu file?

Hi

You should rather not use the B field computed to the nodes but use the vector potential at the integration points and evaluate the losses using them. This way your data is not smeared down.

-Peter
Jenwel
Posts: 20
Joined: 22 Jun 2017, 07:07
Antispam: Yes

### Re: How to output user defined variable to the vtu file?

Hi, Peter
Now I have calculated the elemental B field. I think maybe I can only calculate the core loss of the active elements.
In the solver "MagnetoDynamicsCalcFields", I use

Code: Select all

GetNOFActive()
to know the number of all active elements is 24518.
But the number of total elements is 76602.
Can I get the index of each active element in the total elements?

If this approach failed, I will try to use the A field at the integration points.
Thank you again!

BR
Jenwel
raback
Posts: 3744
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

### Re: How to output user defined variable to the vtu file?

Hi Jenwel,

I guess this is the physical model that you need implemented:

Code: Select all

		dBField(i) = BField(i) - PrevBField(i)
Ph % Values(i) = Hc * ABS(dBField(i)/dt) + Kh * ABS(BField(i)) * ABS(dBField(i)/dt)
Peddy % Values(i) = Keddy * ((dBField(i)/dt) ** 2)
Pcoreloss % Values(i) = Ph % Values(i) + Peddy % Values(i)

i.e. losses of style Hc*|B'|+Kh*|B||B'|+Keddy*|B'|^2 ?

It could well fit into CalcFields. It has already the possibility to compute losses for harmonic solution of style a*f^n*|B|+b*f^m*|B|^2. The FourierLoss solver can compute losses by making a fourier-transform on-the-fly and applying almost similar (more generic series) loss model. There is no loss model that directly uses the transient losses. I guess the background is rather similar since |B'| -> 2*\pi*f*|B| in harmonic case.

Would the loss model generalize to \sum_i c_i*|B|^n_i*|B'|^m_i?

-Peter
Jenwel
Posts: 20
Joined: 22 Jun 2017, 07:07
Antispam: Yes

### Re: How to output user defined variable to the vtu file?

Hi Peter,

That's the model I fitted into "CalcFields" now. Your codes basically agree with mine, except several variable names are different.
Now, the elemental loss can be solved. But the elements in air gap are also calculated by corresponding B field value, which is not expected.
Actually, the flux density exists in the air gap, but the air would not generate heat.
And I still do not know how to avoid calculating them.

So, I wonder if there is a variable that can denote the material or bodyID of the elements?
Before calculating the loss, the solver would know whether the element is air or iron by judging this variable.

Besides, I used the harmonic solution before. It can effectively solve the fourier loss. I have compared the results from the "FourierLoss solver" and the results from transient losses. I found that the results of "FourierLoss solver" is the mean (averaged) value of the transient losses in the integrate cycles.
The |B'| is equal to dB/dtheta*(2*pi*f) due to the fact that |B| varies with the angular position theta.

Honestly, I am pursuing the doctoral degree and the topic is the multi-objective optimization of the machine under the multi-physics fields.
So, at first, I want to solve the transient loss, then solve the thermal field of the machine. Maybe I will consider the air convection in the air gap and its impacts to the thermal field.
This is also the reason I begin to use Elmer. I believe it is the best choice to realize the FEA in multi-physics fields.
I also very appreciate you and other Elmer developers for creating such helpful Elmer.

Thank you so much!

BR
Jenwel
Jenwel
Posts: 20
Joined: 22 Jun 2017, 07:07
Antispam: Yes

### Re: How to output user defined variable to the vtu file?

Hi
I found the codes in "CalcFields"

Code: Select all

DO i = 1, GetNOFActive()
Element => GetActiveElement(i)
n = GetElementNOFNodes()
np = n*pSolver % Def_Dofs(GetElementFamily(Element),Element % BodyId,1)
nd = GetElementNOFDOFs(uSolver=pSolver)

CALL GetElementNodes( Nodes )
BodyId = GetBody()
Material => GetMaterial()
BodyForce => GetBodyForce()
I know the function

Code: Select all

Element => GetActiveElement(i)
can get the active element and link it with the pointer "Element ". Then the BodyID of this element can be somehow obtained via

Code: Select all

BodyId = GetBody()
But can I get the BodyID of all the elements? Including the non-active elements?

BR
Jenwel
Jenwel
Posts: 20
Joined: 22 Jun 2017, 07:07
Antispam: Yes

### Re: How to output user defined variable to the vtu file?

Hi !

OMG, after I read the data in the mesh document of my model, I realized that all the elements are divided into TWO main categories, the active elements and boundary elements.
In the file "mesh.elements" and "mesh.boundary", I found the number of active elements is 24518, the number of boundary elements is 1016.
And the size of elements is 25534, i.e. the sum of the number of active elements and boundary elements.

I found the code

Code: Select all

Element => Mesh % Elements(i)
can directly link the pointer Element.
And the code

Code: Select all

Element % BodyId
can obtain the BodyID of this element.

The number of flux density B for all elements, i.e. the variable "EL_MFD" in "CalcFields", is 229806.
It is equal to 3 multiplies the size of the defined variable Ph % Values, which is 76602.
I can understand that. It is because the B field "EL_MFD" has 3 Dofs in x- y- z-direction. And the defined variable Ph % Values is scalar value.

But I still do not understand. Why does the number of the elements is 25534, which is 1/3 of the size of the defined variable Ph % Values, i.e. 76602?
I am confused that, in my opinion, each element should have corresponding value of Ph % Values, so the size of the defined variable Ph % Values should also be equal to the number of elements?

Thank you!

BR
Jenwel


text:
Jeudi 16 février 2017 (14h00, Salle G001)

Abdelkader SBIHI, Ecole de Management de Normandie.

Titre : The sharing problem with conflict graphs: incorporating valid inequalities for an efficient resolution.

Résumé :  In this talk, we study a new version of the sharing problem arising from the real-life which includes conflict constraints between pairs of items, namely SPCI. SPCI is particularly important when conflicting decisions appear for some optimization problems. We say that two items $i$ and $j$ are incompatible for SPCI, if for some graph $G = (V;E)$, the edge $(i; j) \in E \subset V \times V$ is such that $x_i + x_j \leq 1$. We introduce the concept of conflict graphs in combinatorial optimization and some related problems and their results. As an extension to both the sharing and the knapsack problems, we can conclude that the SPCI is NP-hard, but to the best of our knowledge, there exists no established complexity result: (i) for a possible resolution in a polynomial time, (ii) for a PTAS or (iii) for a computed approximation constant . In this talk, we propose several algorithms to approximately solve the SPCI. A fi rst approach is a constructive greedy heuristic aiming at building a feasible starting solution. A second approach is a matheuristic based technique for which we develop a Relax and Reduce (RR) algorithm. We solve a series of relaxed problems which, in turn, lead to a series of reduced problems. Later, to enhance the performance of the RR, we introduce: (i) valid constraints to accelerate the reduced problems resolution and (ii) a chosen metaheuristic to reduce the gap between the upper and lower bounds.

format: plain


text:
# Vectorizing t-tests and F-tests for unequal variances

Almost all modern data science tasks begin with an exploratory data analysis (EDA) phase. Visualizing summary statistics and testing for associations forms the basis of hypothesis generation and subsequent modelling. Applied statisticians need to be careful not to over-interpret the results of EDA since the p-values generated during this phase do not correspond to their formal definition. Speed is often an asset during EDA. I recently encountered the problem of needing to assess thousands of AUROC statistics (discussed in the past here and here), and found the bootstrapping procedure to be too slow for high-throughput assessment. By relying on the asymptotic normality of the AUROC statistic (which is an instance of the Mann-Whitney U-test), rapid inference could be performed because an analytic solution was available. However, I needed to develop code that could properly address the bottlenecks of my analysis:

1. Use only the moments of the data (mean, variance, and sample size)
2. (Possibly) accounting for unequal variances
3. Vectorizing all functions

In the rest of the post, I’ll provide simple functions in python that will vectorize the Student’s t-test and the F-test. Each of these functions will rely on the first two moments of the data distribution (plus the sample size). Using only the sufficient statistics of the data helps to reduce the memory overhead that other functions normally have. Means and variances can be computed quickly using methods that are already part of pandas and numpy classes. The functions in this post will also be able to account for unequal variances, which to best of my knowledge, is not available in existing python packages for the F-test.

## (1) Student’s t-test for equal means

Suppose there are two normally distributed samples: $$x = (x_1, \dots, x_n) \sim N(\mu_x, \sigma^2_x)$$ and $$y=(y_1,\dots,y_m)\sim N(\mu_y,\sigma^2_y)$$, and we would like to test the null hypothesis that $$H_0: \mu_x = \mu_y$$. If the variances of the distributions were known in practice than the average difference of the two means would have a normal distribution,

\begin{align*} \frac{\bar{x} - \bar{y}}{\sqrt{\sigma^2_x/n + \sigma^2_y/m}} \sim N(0,1) \hspace{2mm} | \hspace{2mm} H_0 \text{ is true}, \end{align*}

So that a test statistic with a known distribution could be easily constructed. However, since the variance of the two distributions needs to be estimated in practice, the statistic seen above would actually be the ratio of a normal to a chi-squared distribution, in other words a Student’s t-distribution:

\begin{align} d &= \frac{\bar{x} - \bar{y}}{\sqrt{\hat\sigma^2_x/n + \hat\sigma^2_y/m}} \tag{1}\label{eq:dstat} \\ d &\sim t(\nu). \end{align}

When the variances are not equivalent, some modifications need to be made to the degrees of freedom parameter ($$\nu$$), using now classic derivations from Welch in 1947:

\begin{align*} \nu &= \begin{cases} n + m - 2 & \text{ if } \sigma^2_x = \sigma^2_y \\ \frac{(\hat\sigma^2_x/n + \hat\sigma^2_y/m)^2}{(\hat\sigma^2_x/n)^2/(x-1)+(\hat\sigma^2_y/m)^2/(m-1)} & \text{ if } \sigma^2_x \neq \sigma^2_y \end{cases}. \end{align*}

Because the test statistic $$d$$ is only a function of the first two moments,

\begin{align*} d = f(\bar x, \bar y, \hat\sigma^2_x, \hat\sigma^2_y, n, m), \end{align*}

A function can written that uses only these sufficient statistics from the data. The code block below will provide the first function ttest_vec to carry out the testing and return the test statistic and associated p-values from a two-sided hypothesis test.

# Import modules needed to reproduce results
import os
import plotnine
from plotnine import *
import pandas as pd
from scipy import stats
import numpy as np
from statsmodels.stats.proportion import proportion_confint as prop_CI

def ttest_vec(mu1, mu2, se1, se2, n1, n2, var_eq=False):
var1, var2 = se1**2, se2**2
num = mu1 - mu2
if var_eq:
nu = n1 + n2 - 2
sp2 = ((n1-1)*var1 + (n2-1)*var2) / nu
den = np.sqrt(sp2*(1/n1 + 1/n2))
else:
nu = (var1/n1 + var2/n2)**2 / ( (var1/n1)**2/(n1-1) + (var2/n2)**2/(n2-1) )
den = np.sqrt(var1/n1 + var2/n2)
dist_null = stats.t(df=nu)
tstat = num / den
pvals = 2*np.minimum(dist_null.sf(tstat), dist_null.cdf(tstat))
return tstat, pvals

# Useful short wrappers for making row or columns vectors
def rvec(x):
return np.atleast_2d(x)

def cvec(x):
return rvec(x).T

As a rule, I always conduct statistical simulations to make sure the functions I have written actually perform the way I expect them to when the null is known. If you can’t get your method to work on a data generating procedure of your choosing, it should not leave the statistical laboratory! In the simulations below, $$\mu_y = 0$$, and $$\mu_x$$ will vary from zero to 0.2. At the same time, both variance homoskedasticity ($$\sigma_y = \sigma_x$$) and heteroskedasticity ($$\sigma_y \neq \sigma_x$$) will be assessed. To further ensure the approach works, the respective sample sizes, $$n$$ and $$m$$, for each of the nsim=100K experiments will be a random integer between 25 and 75. In order to avoid an inner loop and rely of pure numpy vectorization, a data matrix of dimension 75 x 100000 will be generated. To account for the different sample sizes, if $$n$$ or $$m$$ is less than 75, the corresponding difference in rows will be set as a missing value np.NaN. The np.nanmean and np.nanstd functions will be used to handle missing values.

Note that in all of the subsequent simulations, the type-I error rate target will be fixed to 5% ($$\alpha=0.05$$), 100K simulations will be run, and the null hypothesis will be two-sided.

# Parameters of simulations
nsim = 100000
alpha = 0.05
nlow, nhigh = 25, 75
n1, n2 = np.random.randint(nlow, nhigh+1, nsim), np.random.randint(nlow, nhigh+1, nsim)
se1, se2 = np.exp(np.random.randn(nsim)), np.exp(np.random.randn(nsim))
mu_seq = np.arange(0,0.21,0.01)
tt_seq, method_seq = np.repeat(['eq','neq'],2), np.tile(['neq','eq'],2)
holder = []
np.random.seed(1234)
for mu in mu_seq:
# Generate random data
x1 = mu + se1*np.random.randn(nhigh, nsim)
x2a = se1 * np.random.randn(nhigh, nsim)
x2b = se2 * np.random.randn(nhigh, nsim)
idx = np.tile(np.arange(nhigh),[nsim,1]).T
# Find which rows to set to missing
idx1, idx2 = idx < rvec(n1), idx < rvec(n2)
x1, x2a, x2b = np.where(idx1, x1, np.nan), np.where(idx2, x2a, np.nan), np.where(idx2, x2b, np.nan)
mu_hat1, mu_hat2a, mu_hat2b  = np.nanmean(x1, 0), np.nanmean(x2a, 0), np.nanmean(x2b, 0)
se_hat1, se_hat2a, se_hat2b = np.nanstd(x1, 0, ddof=1), np.nanstd(x2a, 0, ddof=1), np.nanstd(x2b, 0, ddof=1)
# Calculate statistics and p-values
tstat_neq_a, pval_neq_a = ttest_vec(mu_hat1, mu_hat2a, se_hat1, se_hat2a, n1, n2, False)
tstat_eq_a, pval_eq_a = ttest_vec(mu_hat1, mu_hat2a,  se_hat1, se_hat2a, n1, n2, True)
tstat_neq_b, pval_neq_b = ttest_vec(mu_hat1, mu_hat2b, se_hat1, se_hat2b, n1, n2, False)
tstat_eq_b, pval_eq_b = ttest_vec(mu_hat1, mu_hat2b, se_hat1, se_hat2b, n1, n2, True)
# Find hypothesis rejection probability
power_neq_a, power_eq_a = np.mean(pval_neq_a < alpha), np.mean(pval_eq_a < alpha)
power_neq_b, power_eq_b = np.mean(pval_neq_b < alpha), np.mean(pval_eq_b < alpha)
power_seq = np.array([power_neq_a, power_eq_a, power_neq_b, power_eq_b])
holder.append(pd.DataFrame({'mu':mu,'tt':tt_seq,'method':method_seq, 'power':power_seq}))
# Power comparison
di_method = {'eq':'Equal','neq':'Not Equal'}
res_power = pd.concat(holder).assign(nsim=nsim)
res_power[['tt','method']] = res_power[['tt','method']].apply(lambda x: x.map(di_method))
res_power = res_power.rename(columns={'tt':'Variance'}).assign(nreject=lambda x: (x.power*x.nsim).astype(int))
res_power = pd.concat([res_power.drop(columns=['nsim','nreject']),
pd.concat(prop_CI(count=res_power.nreject,nobs=nsim,method='beta'),1)],1)
res_power.rename(columns={0:'lb',1:'ub'}, inplace=True)

plotnine.options.figure_size = (8, 3.5)
gg_power_ttest = (ggplot(res_power,aes(x='mu',y='power',color='method')) +
theme_bw()  + geom_line() +
geom_hline(yintercept=0.05,linetype='--') +
scale_color_discrete(name='Variance assumption') +
geom_linerange(aes(ymin='lb',ymax='ub')) +
ggtitle('Vertical lines show 95% CI') +
labs(y='Prob. of rejecting null',x='Mean difference') +
facet_wrap('~Variance',labeller=label_both) +
theme(legend_position=(0.5,-0.1),legend_direction='horizontal'))
gg_power_ttest

### Figure 1: T-test simulation results

Figure 1 above shows that the ttest_vec function is working as expected. When the variances of $$x$$ and $$y$$ are equivalent, there is no difference in performance between approaches. When the mean difference is zero, the probability of rejecting the null is exactly equivalent to the type-I error rate of the test (5%). However, when the variances differ, using the degrees of freedom calculation assuming they are equal leads to an inflated type-I error rate. Whereas using the adjustment from Welch’s t-test gets to the right nominal level.

## (2) Checking power calculations

After checking that a function’s test statistic has the right nominal coverage on simulated data, I find it useful to check whether the power of the test can be predicted for different values of the alternative hypothesis. For some test statistics, this is not possible to do analytically, since the distribution of the test statistic under the alternative may not be known. However, for the student-t distribution, a difference in true means amounts to a noncentral t-distribution.

\begin{align*} T &= \frac{Z + c}{\sqrt{V/\nu}} \\ T &\sim \text{nct}(\nu,c) \\ Z&\sim N(0,1), \hspace{3mm} V\sim \chi^2(\nu), \hspace{3mm} \mu \neq 0 \end{align*}

The statistic $$d$$ from \eqref{eq:dstat} can be modified to match the noncentral t-distribution:

\begin{align*} d + \underbrace{\frac{\mu_x - \mu_y}{\sqrt{\sigma^2_x/n + \sigma^2_y/m}}}_{c}. \end{align*}

The power simulations below will fix $$n=25$$, $$m=75$$, and unit variances when $$\sigma_x=\sigma_y$$ and $$\sigma_x=1$$ and $$\sigma_y=2$$ in the heteroskedastic case.

n1, n2 = 25, 75
se1 = 1
se2a, se2b = se1, se1 + 1
var1, var2a, var2b = se1**2, se2a**2, se2b**2
# ddof under different assumptions
nu_a = n1 + n2 - 2
nu_b = (var1/n1 + var2b/n2)**2 / ( (var1/n1)**2/(n1-1) + (var2b/n2)**2/(n2-1) )
mu_seq = np.round(np.arange(0, 1.1, 0.1),2)

# Pre-calculate power
crit_ub_a, crit_lb_a = stats.t(df=nu_a).ppf(1-alpha/2), stats.t(df=nu_a).ppf(alpha/2)
crit_ub_b, crit_lb_b = stats.t(df=nu_b).ppf(1-alpha/2), stats.t(df=nu_b).ppf(alpha/2)
lam_a = np.array([mu/np.sqrt(var1*(1/n1 + 1/n2)) for mu in mu_seq])
lam_b = np.array([mu/np.sqrt((var1/n1 + var2b/n2)) for mu in mu_seq])
dist_alt_a, dist_alt_b = stats.nct(df=nu_a, nc=lam_a), stats.nct(df=nu_b, nc=lam_b)
power_a = (1-dist_alt_a.cdf(crit_ub_a)) + dist_alt_a.cdf(crit_lb_a)
power_b = (1-dist_alt_b.cdf(crit_ub_b)) + dist_alt_b.cdf(crit_lb_b)
dat_theory = pd.concat([pd.DataFrame({'mu':mu_seq,'theory':power_a,'method':'eq'}),
pd.DataFrame({'mu':mu_seq,'theory':power_b,'method':'neq'})])

# Run simulations to confirm
np.random.seed(1234)
holder = []
for mu in mu_seq:
x1 = mu + se1 * np.random.randn(n1, nsim)
x2a = se2a * np.random.randn(n2, nsim)
x2b = se2b * np.random.randn(n2, nsim)
mu_hat1, mu_hat2a, mu_hat2b  = x1.mean(0), x2a.mean(0), x2b.mean(0)
se_hat1, se_hat2a, se_hat2b = x1.std(0,ddof=1), x2a.std(0, ddof=1), x2b.std(0, ddof=1)
stat_a, pval_a = ttest_vec(mu_hat1, mu_hat2a, se_hat1, se_hat2a, n1, n2, var_eq=True)
stat_b, pval_b = ttest_vec(mu_hat1, mu_hat2b, se_hat1, se_hat2b, n1, n2, var_eq=False)
reject_a, reject_b = np.mean(pval_a < 0.05), np.mean(pval_b < 0.05)
holder.append(pd.DataFrame({'mu': mu,'method':['eq','neq'], 'power': [reject_a, reject_b]}))
res_theory = pd.concat(holder).merge(dat_theory).sort_values(['method','mu']).reset_index(None, True)
res_theory = res_theory.assign(nreject=lambda x: (x.power*nsim).astype(int))
res_theory = pd.concat([res_theory.drop(columns='nreject'),
pd.concat(prop_CI(count=res_theory.nreject,nobs=nsim,method='beta'),1)],1)
res_theory.rename(columns={0:'lb',1:'ub','method':'Variance'}, inplace=True)
res_theory = res_theory.assign(Variance=lambda x: x.Variance.map(di_method))

plotnine.options.figure_size = (8, 3.5)
gg_power_theory = (ggplot(res_theory,aes(x='theory',y='power')) +
theme_bw() + geom_point() +
geom_linerange(aes(ymin='lb',ymax='ub')) +
facet_wrap('~Variance', labeller=label_both) +
theme(legend_position=(0.5, -0.1), legend_direction='horizontal') +
labs(x='Expected power',y='Actual power') +
scale_y_continuous(limits=[0,1]) + scale_x_continuous(limits=[0,1]) +
geom_abline(slope=1,intercept=0,color='blue',linetype='--'))
gg_power_theory

### Figure 2: Predicted vs actual power

Figure 2 shows that the power calculations line up exactly with the analytical expectations for both equal and unequal variances. Having thoroughly validated the type-I and type-II errors of this function we can now move onto testing whether the means from multiple normal distributions are equal.

## (3) F-test for equality of means

Suppose there are $$K$$ normal data vectors: $$x_1=(x_{1,1},\dots,x_{1,n_1})$$ to $$x_k=(x_{k,1},\dots,x_{1,n_k})$$, and we want to test the null hypothesis of $$\mu_1 = \mu_2 = \dots = \mu_K$$ against an alternative hypothesis that there is at least 1 inequality in the means, where $$x_{k,i} \sim N(\mu_k,\sigma^2_k)$$. As before, the variances of each vector may or may not be equal. When the variances are equal, the sum of squared differences between the total mean and any one group mean will be chi-squared. Similarly, the sum of the sample variances will also have a chi-squared distribution. Hence, the F-test for equality of means is the ratio of the variation “between” versus “within” the groups,

\begin{align*} R &= \frac{\frac{1}{K-1}\sum_{k=1}^K n_k (\bar x_k - \bar x)^2 }{\frac{1}{N-K}\sum_{k=1}^K (n_k - 1)\hat\sigma^2_k}, \\ R &\sim F(K-1, N-K) \hspace{3mm} \text{ if } \sigma^2_k = \sigma^2 \hspace{3mm} \forall k \in \{1,\dots,K\} \end{align*}

Where $$N = \sum_k n_k$$. To account for heteroskedasticity in the data (i.e. non-equal variances), both the test and degrees of freedom need to be modified using an approach Welch proposed in 1951.

\begin{align*} R_W &= \frac{\frac{1}{K-1}\sum_{k=1}^K w_k (\bar x_k - \bar x_w)^2 }{1 + \frac{2}{3}((K-2)\nu)}, \\ w_k &= n_k / \hat\sigma^2_k \\ \bar x_w &= \frac{\sum_{k=1}^K w_k \bar x_k}{\sum_{k=1}^K w_k}\\ \nu &= \frac{3\cdot \sum_{k=1}^K \Bigg[ \frac{1}{n_k - 1} \Big( 1 - \frac{w_k}{\sum_{k=1}^K w_k} \Big)^2 \Bigg]^2}{K^2-1} \\ R_W &\sim F(K-1, 1/\nu) \hspace{3mm} \text{ if } \sigma^2_k \neq \sigma^2_{-k} \hspace{3mm} \text{for at least one }k \end{align*}

The ftest_vec function below carries out an F-test for the equality of means using only the empirical means, standard deviations, and sample sizes for either variance assumption. In R this would be equivalent to using aov for equal variances or oneway.test for unequal variances. In python, it will replicate the scipy.stats.f_oneway function (for equal variances). I am unaware of a python function that does a Welch-adjustment (if you know please message me and I will provide an update with this information). As before, because the function only relies on the moments of the data, it can be fully vectorized to handle matrices of means, variances, and sample sizes.

The simulation below assesses how well the two F-test approaches (homoskedasticity vs heteroskedasticity) do when the ground truth variances are either all equal or differ. To vary the signal in the data, I generate the $$K$$ different means from $$(-\mu,\dots,0,\dots,\mu)$$, where $$\mu$$ is referred to as “mean dispersion” in the subsequent figures.

def ftest_vec(mus, ses, ns, var_eq=False):
lshape = len(mus.shape)
assert lshape <= 2
assert mus.shape == ses.shape
if len(ns.shape) == 1:
ns = cvec(ns.copy())
else:
assert ns.shape == mus.shape
if lshape == 1:
mus = cvec(mus.copy())
ses = cvec(ses.copy())
vars = ses ** 2  # variance
n, k = ns.sum(0), len(ns)  # Total samples and groups
df1, df2 = (k - 1), (n - k)
if var_eq:  # classical anova
xbar = np.atleast_2d(np.sum(mus * ns, 0) / n)
vb = np.sum(ns*(xbar - mus)**2,0) / df1  # numerator is variance between
vw = np.sum((vars * (ns - 1)), 0) / df2  # den is variance within
fstat = vb / vw
pval = stats.f(dfn=df1,dfd=df2).sf(fstat)
else:
w = ns / vars
xbar = np.sum(w * mus, 0) / np.sum(w,0)
num = np.sum(w * (xbar - mus) ** 2,0) / df1
v = 3*np.sum((1-w/w.sum(0))**2 / (ns-1),0) / (k**2 - 1)
den = 1 + 2*((k-2)*v)/3
fstat = num / den
pval = stats.f(dfn=df1, dfd=1/v).sf(fstat)
return fstat, pval

nlow, niter = 25, 5
k_seq = [5, 7, 9]
disp_seq = np.round(np.arange(0, 0.51, 0.1),2)
dgp_seq = np.repeat(['eq', 'neq'], 2)
method_seq = np.tile(['eq', 'neq'], 2)

holder = []
np.random.seed(1)
for k in k_seq:
n_seq = np.arange(nlow, nlow+k * niter, niter)
n_seq = np.tile(n_seq, [nsim, 1]).T
nhigh = np.max(n_seq)
dim_3d = [1, 1, k]
for disp in disp_seq:
mu_k = np.linspace(-disp, disp, num=k)
se_k1 = np.repeat(1,k).reshape(dim_3d)
se_k2 = np.exp(np.random.randn(k)).reshape(dim_3d)
X1 = mu_k + se_k1 * np.random.randn(nhigh,nsim,k)
X2 = mu_k + se_k2 * np.random.randn(nhigh, nsim, k)
idx = np.tile(np.arange(nhigh),[k,nsim,1]).T <= np.atleast_3d(n_seq).T
X1, X2 = np.where(idx, X1, np.nan), np.where(idx, X2, np.nan)
# Calculate means and variance : (k x nsim)
mu_X1, mu_X2 = np.nanmean(X1, 0).T, np.nanmean(X2, 0).T
se_X1, se_X2 = np.nanstd(X1, 0, ddof=1).T, np.nanstd(X2, 0, ddof=1).T
assert n_seq.shape == mu_X1.shape == se_X1.shape
# Calculate significance
fstat_eq1, pval_eq1 = ftest_vec(mus=mu_X1, ses=se_X1, ns=n_seq, var_eq=True)
fstat_neq1, pval_neq1 = ftest_vec(mus=mu_X1, ses=se_X1, ns=n_seq, var_eq=False)
fstat_eq2, pval_eq2 = ftest_vec(mus=mu_X2, ses=se_X2, ns=n_seq, var_eq=True)
fstat_neq2, pval_neq2 = ftest_vec(mus=mu_X2, ses=se_X2, ns=n_seq, var_eq=False)
reject_eq1, reject_neq1 = np.mean(pval_eq1 < alpha), np.mean(pval_neq1 < alpha)
reject_eq2, reject_neq2 = np.mean(pval_eq2 < alpha), np.mean(pval_neq2 < alpha)
reject_seq = [reject_eq1, reject_neq1, reject_eq2, reject_neq2]
tmp = pd.DataFrame({'k':k,'disp':disp,'dgp':dgp_seq,'method':method_seq,'reject':reject_seq})
holder.append(tmp)
res_f = pd.concat(holder).reset_index(None,True)
res_f[['dgp','method']] = res_f[['dgp','method']].apply(lambda x: x.map(di_method),0)
res_f.rename(columns={'dgp':'Variance'}, inplace=True)

plotnine.options.figure_size = (8, 6)
gg_fdist = (ggplot(res_f, aes(x='disp',y='reject',color='method.astype(str)')) +
theme_bw() + geom_line() + geom_point() +
facet_grid('k~Variance',labeller=label_both) +
labs(x='Mean dispersion',y='Prob. of rejecting null') +
geom_hline(yintercept=0.05,linetype='--') +
scale_y_continuous(limits=[0,1]) +
scale_color_discrete(name='Variance assumption'))
gg_fdist

### Figure 3: F-test rejection probabilities

The simulations in Figure 3 show a similar finding to the that of t-test: when the ground truth variances are equal, there is almost no differences between the tests, and an expected 5% false positive rate occurs when the means are equal. However, for the unequal variance situation, the assumption of homoskedasticity leads to an inflated type-I error rate (as was the case for the t-test), but also lower power when the null is false (which was not the case for the t-test). Using the Welch adjustment is better in both cases. The one surprising finding is that the power of the test is not monotonically increasing in the heteroskedastic case. I am not completely sure why this is the case. One theory could be that since a higher mean dispersion leads to a higher variance of $$\bar{x}_w$$, the ratio of the degrees of freedom may be more stable for lower values of $$\mu$$, leading to a more consistent rejection rate.

## (4) Quick sanity checks

After confirming the frequentist properties of a test statistic, it is worthwhile checking the results of any custom function to similar functions from other libraries. The ttest_vec function will be compared to it’s scipy counterpart on the Iris dataset.

from sklearn import datasets
v1, v2 = ix[:,0], ix[:,1]
k = 1
all_stats = [stats.ttest_ind(v1, v2, equal_var=True)[k],
ttest_vec(v1.mean(), v2.mean(), v1.std(ddof=1), v2.std(ddof=1), len(v1), len(v2), var_eq=True)[k],
stats.ttest_ind(v1, v2, equal_var=False)[k],
ttest_vec(v1.mean(), v2.mean(), v1.std(ddof=1), v2.std(ddof=1), len(v1), len(v2), var_eq=False)[k]]
pd.DataFrame({'test':'t-test',
'method':np.tile(['scipy','custom'],2),
'pval':all_stats})

test method pval
0 t-test scipy 7.027919e-112
1 t-test custom 7.027919e-112
2 t-test scipy 1.459543e-96
3 t-test custom 1.459543e-96

So far so good. Next, we’ll use rpy2 to get the results in R which supports equal and unequal variances with two different functions.

import rpy2.robjects as robjects

moments_x = pd.DataFrame({'x':ix[:,0],'y':iy}).groupby('y').x.describe()[['mean','std','count']]

all_stats = [np.array(robjects.r('summary(aov(Sepal.Length~Species,iris))[[1]][1, 5]'))[0],
ftest_vec(moments_x['mean'], moments_x['std'], moments_x['count'], var_eq=True)[1][0],
np.array(robjects.r('oneway.test(Sepal.Length~Species,iris)\$p.value'))[0],
ftest_vec(moments_x['mean'], moments_x['std'], moments_x['count'], var_eq=False)[1][0]]
pd.DataFrame({'test':'F-test',
'method':np.tile(['R','custom'],2),
'pval':all_stats})

test method pval
0 F-test R 1.669669e-31
1 F-test custom 1.669669e-31
2 F-test R 1.505059e-28
3 F-test custom 1.505059e-28

Once again the results are identical to the benchmark functions.

## (5) Application to AUROC inference

The empirical AUROC has an asymptotically normal distribution. Consequently, the difference between two AUROCs will also have an asymptotically normal distribution. For small sample sizes, the Hanley and McNeil adjustment to the AUROC standard error will obtain slightly better coverage. For a review of the notation and meaning of the AUROC, see a previous post here.

\begin{align*} AUC &= \frac{1}{n_1 n_0} \sum_{i: y_i = 1} \sum_{j: y_j=0} I(s_i > s_j) \\ \sigma_{N} &= \sqrt{\frac{n_1 + n_0 + 1}{12\cdot n_1 n_0}} \\ \sigma_{HM} &= \sqrt{\frac{AUC\cdot (1-AUC) + q_1 + q_0}{n_1 n_0}} \\ q_1 &= (n_1 - 1)\cdot ( AUC / (2-AUC) - AUC^2) \\ q_0&= (n_0- 1)\cdot ( AUC^2 / (1+AUC) - AUC^2) \end{align*}

The standard error from the normal approximation ($$\sigma_N$$) is only a function of the positive ($$n_1$$) and negative ($$n_0$$) class sample sizes whereas the Hanley and McNeil adjustment ($$\sigma_{HM}$$) uses the empirical AUROC as well. The previous t- and F-tests relied on the fact that the sample mean had a variance that was $$O(1/n)$$ so that $$\bar x \sim N(\mu, \sigma^2/n)$$. As can be seen from either formula, the sample variance for the AUROC can not be neatly re-written as a function of the sample size. We can still appeal to the t-test, the only difference being that the sample size is built into the variance estimate:

\begin{align*} \frac{AUC_A - AUC_B}{\sqrt{\sigma^2_{HM_A} + \sigma^2_{HM_B}}} &\sim N(0,1) \hspace{3mm} \text{ if H_0 is true} \end{align*}

In the simulation below, scores will come from one of two distributions. The negative class will have 200 samples ($$n_0$$) drawn from a standard normal. The positive class scores will have 100 samples ($$n_1$$) drawn from either a standard normal (for the null distribution) and a normal with a mean at or above zero. The difference in AUROCs between these two distributions will be evaluated. Since the null distribution will have an (average) AUROC of 50%, the difference in these distribution will be above zero only when the mean from the alternative is greater than zero.

n1, n0 = 100, 200
n = n1 + n0
n1n0 = n1 * n0
mu_seq = np.round(np.arange(0, 1.01, 0.1),2)

def se_auroc_hanley(auroc, n1, n0):
q1 = (n1 - 1) * ((auroc / (2 - auroc)) - auroc ** 2)
q0 = (n0 - 1) * ((2 * auroc ** 2) / (1 + auroc) - auroc ** 2)
se_auroc = np.sqrt((auroc * (1 - auroc) + q1 + q0) / (n1 * n0))
return se_auroc

def se_auroc_normal(n1, n0):
return np.sqrt( (n1 + n0 + 1) / (12 * n1 * n0) )

np.random.seed(1)
holder = []
for mu in mu_seq:
x1_null, x0 = np.random.randn(n1, nsim), np.random.randn(n0, nsim)
x1 = mu + np.random.randn(n1, nsim)
x, x_null = np.concatenate((x1, x0)), np.concatenate((x1_null, x0))
auc = (np.sum(stats.rankdata(x, axis=0)[:n1],0) - n1*(n1+1)/2) / n1n0
auc_null = (np.sum(stats.rankdata(x_null, axis=0)[:n1], 0) - n1 * (n1 + 1) / 2) / n1n0
se_HM, se_null_HM = se_auroc_hanley(auc, n1, n0), se_auroc_hanley(auc_null, n1, n0)
se_N = se_auroc_normal(n1, n0)
# Do pairwise t-test
dauc = auc - auc_null
t_score_HM = dauc / np.sqrt(se_HM**2 + se_null_HM**2)
t_score_N = dauc / np.sqrt(2 * se_N**2)
dist_null = stats.t(df=2*n - 2)
pval_HM = 2 * np.minimum(dist_null.sf(t_score_HM), dist_null.cdf(t_score_HM))
pval_N = 2 * np.minimum(dist_null.sf(t_score_N), dist_null.cdf(t_score_N))
reject_HM, reject_N = np.mean(pval_HM < alpha), np.mean(pval_N < alpha)
tmp = pd.DataFrame({'method':['HM','N'],'mu':mu, 'reject':[reject_HM, reject_N]})
holder.append(tmp)
# Merge and analyse
res_auc = pd.concat(holder).reset_index(None, True)
res_auc = res_auc.assign(auc=lambda x: stats.norm.cdf(x.mu/np.sqrt(2)),
nreject=lambda x: (x.reject*nsim).astype(int))
res_auc = pd.concat([res_auc.drop(columns='nreject'),
pd.concat(prop_CI(count=res_auc.nreject,nobs=nsim,method='beta'),1)],1)
res_auc.rename(columns={0:'lb',1:'ub'},inplace=True)

# plot
plotnine.options.figure_size = (5, 4)
gg_auc = (ggplot(res_auc,aes(x='auc',y='reject',color='method')) + theme_bw() +
geom_line() +
labs(x='Alternative hypothesis AUROC',y='Prob. of rejecting null') +
geom_hline(yintercept=0.05,linetype='--') +
geom_linerange(aes(ymin='lb',ymax='ub')) +
scale_color_discrete(name='Method',labels=['Hanley-McNeil','Normal']))
gg_auc

### Figure 4: Power simulation for difference in AUROCs

Figure 4 shows that the standard errors from both methods yield almost identical results. Furthermore, the standard errors are conservative (too large), leading to an under-rejection of the null hypothesis when the null is true (i.e. the alternative nominal level. However, as the ground truth alternative AUROC increases from 53% to 70%, the power of the test approaches 100% for this sample size combination.

Written on March 6, 2021


text:
# analytic solution to elliptic PDE in R^n

I am looking for (minimal) conditions, which guarantee that the problem

Lu = 0 in R^n,

where L is a second-order (uniformly) elliptic operator with analytic coefficients, has a unique global analytic solution. Does anybody have any references to relevant work?

-
As Liviu indicates, $u = 0$ is already a solution, so your question is equivalent to asking what conditions imply that $u = 0$ is the only solution. I don't know the answer to this, but one possible approach is to write an arbitrary solution as a power series and study whether there are identifiable conditions on $L$ that force the radius of convergence to be finite. – Deane Yang Jul 31 '13 at 21:31

When $L$ has analytic coefficients, any solution of $Lu=0$ in $\mathbb{R}^n$ is automatically analytic. You should be asking about conditions guaranteeing that the only solution of this equation is $u=0$. For example, if you assume that $u(x)\to 0$ as $|x|\to \infty$, then the maximum principle will do the trick. For more refined results you could try a Gooogle search or a MathSciNet search.


text:
Why does the professor derive the equation?

1. Aug 23, 2012

1MileCrash

"why does the professor derive the equation?"

I often hear people of other majors (engineering) ask me why the professor derives the equation to be used in some situation (like a continuous charge distribution electric field from coulomb's law divided by the test charge) instead of just giving them the bottom line formula.

This question infuriates me because I don't know how to answer it. I learn how to derive all my equations because I like to. I understand the formula better and can modify it to a situation better because I know how it is formed.

I just feel like the question sounds like they don't want to do ANYTHING, I mean anyone can plug numbers into an equation.

What's worse is when I help someone solve some intensive problem and end up with some simple expression at the very end like "x = 2q^2" and they are like "cool, thanks" and they write down that last little expression that was derived based on the specific circumstances of the problem. Then they memorize that in hopes that that very same question will be on an exam (with different values.)

How do you respond to that question?

2. Aug 23, 2012

Darth Frodo

Re: "why does the professor derive the equation?"

That person is very trustworthy and isn't thinking like a scientist should.
Ask him if he believes EVERYTHING his professor says, when (not if) he says no tell 'em "That's why we derive things"

3. Aug 23, 2012

rootX

Re: "why does the professor derive the equation?"

Many engineering problems can be really complicated even when you have all the "bottom line formulas". I found deriving equations waste of time or a leisure activity that you can do if only it pleases you and you have lots of time on yours hands.

4. Aug 23, 2012

Astronuc

Staff Emeritus
Re: "why does the professor derive the equation?"

It's important to know how to derive the equations in order to understand the limitations and exceptions, and in the future, derive better models. In my engineering classes, in neutron transport and reactor physics, and in fluid mechanics and heat transfer, we derived the fundamental differential equations and we were expected to know how to do that with a piece of chalk and blackboard. When one develops computer models, one has to know the significance of each term of a PDE or kernel. Each kernel is a piece of physics. To program correctly and integrate the various kernels, one has to have a fundamental knowledge of the equations and physics.

Not everyone wants to put in that kind of effort.

5. Aug 23, 2012

Staff Emeritus
Re: "why does the professor derive the equation?"

As said before, there are several reasons for this. One is so you know the approximations and assumptions that went in. Another is so you can have a chance of deriving something similar for a different set of assumptions - or to spot an error in someone else's derivation.

In any event "when am I gonna need this?" is so junior high.

6. Aug 23, 2012

rootX

Re: "why does the professor derive the equation?"

Generally in engineering undergrad, professor will walk you through the derivations but wouldn't expect you to know them. Focus is primarily on the application. It can be too time consuming when you want to understand the fundamentals as well the applications in limited time you have and heavy engineering classes workload. Besides that, engineering math doesn't go deep. So you wouldn't have strong enough math foundation to understand the derivations.

It's physics and math where you would focus on derivations.

Last edited: Aug 23, 2012
7. Aug 24, 2012

dlgoff

Re: "why does the professor derive the equation?"

And another, as stated by my Electro-Magnetic Theory professor on the first day of class, "Those who can not derive Maxwells Equations on the final exam will receive an F in the course".

8. Aug 24, 2012

Pythagorean

Re: "why does the professor derive the equation?"

For me, it's all about knowing how to model the world with mathematics, and knowing how to change and adapt your models for particular cases. To do that, you have to know the motivation for every expression and term in the model. Knowing the derivation gives you an intuition for the motivation of each part of an equation.

9. Aug 24, 2012

johnqwertyful

Re: "why does the professor derive the equation?"

I've found a good "shut the hell up" (or something with similar meaning but more colorful language) works wonders.

10. Aug 24, 2012

BobG

Re: "why does the professor derive the equation?"

What astronuc said.

People don't like to do an enormous amount of work. As a result, it's very useful to reduce two or three calculations into a single, simple formula that may use a few clever shortcuts along the way.

The formula works great, is easy to use and gets you your results, but is now completely opaque. It's virtually turned into a PFM box where something goes in and magically comes out looking like what you want.

The only way to understand what's happening in the process (which also means understanding the limitations, boundaries, etc) is to break that formula out into the step by step process that built the formula in the first place.

Of course, some people's obsession for not doing an enormous amount of work is excessive and they start to ask themselves why they need to understand anything at all. They just want the formula, assume they'll input data perfectly every time, and accept the results at face value no matter how absurd the results look - because how could they possibly know whether the results are absurd or not since they never bothered to learn what the formula actually does? Those people are data entry operators; not engineers or physicists or whatever. Of course, they're kind of wasting their money if they're taking college classes to be a data entry operator since most high school graduates should be able to do that job.

11. Aug 24, 2012

I_am_learning

Re: "why does the professor derive the equation?"

We derive things, so that we won't need to remember too many 'assumptions'.
For eg, by assuming columb's Law of Force between two charges to be true, we could derive and the Voltage, Charge and Capacitance relation C = q/v.
Of course someone could Take C = q/v as well as the columbs law as something that is valid and verified by experiment; I find it rewarding to understand that, one law follows from the other and that I ain't assuming too many things.

Just my 2 cents.

12. Aug 24, 2012

rootX

Re: "why does the professor derive the equation?"

Many thermodynamics problems are quite complicated involve partial differentiations, finite element method techniques. One simply cannot put them down on a paper. Sure, you can do a simple derivation on paper but nothing beyond. And, many models are not even analytical so there's no derivation to be done.

I agree that conceptual understanding of models is important but you don't have to derive the formulas to understand the concepts. For instance, our control course mainly relied on qualitative discussion of the models. You could come up with really absurd conclusions relying only on the math that can only be rejected if you know the concepts not simply how to derive the final formula.

Many processes are very complicated and involve lots of fields. One person simply cannot break and understand every step in the process. Only reason we have multiple fields (Mathematics, Physics, Mechanical Eng, Electrical Eng) is that you don't have to know everything in the process to build the process.

Last edited: Aug 24, 2012
13. Aug 24, 2012

Staff Emeritus
Re: "why does the professor derive the equation?"

I stand by Junior High. The fact that an increasing fraction of undergrads think this is a separate sad thing.

14. Aug 24, 2012

Astronuc

Staff Emeritus
Re: "why does the professor derive the equation?"

Fortunately, I started in physics, and took a lot of math and applied math. I did partial differential equations and QM my second year at university, as well as classical mechanics/dynamics. I then migrated into nuclear engineering, and the math and physics background had given me great preparation.

In upper level classes and grad school, we derived equations from the ground up. We also learned numerical methods with which to apply the various equations.

I work with some folks who developed some of the fundamental methods in structural mechanics (or mechanics of materials), and now we have the opportunity to apply them with advanced methods.

There are users (those who use the computational methods and tools) and developers (those who develop the computational methods and tools). I prefer to be a user/developer, and that requires the ability to understand the theory and apply it, and when necessary, improve it.

15. Aug 24, 2012

rootX

Re: "why does the professor derive the equation?"

In Electrical Engineering, we never went much into anything that's non-linear or needs solving partial differentiations. Professors formulated problems (equations) for us, then linearized the models and provided us the qualitative description of the models. I recall in our thermodynamics course, professor provided us final analytical formulas and some empirical formulas. However, he did provided us the qualitative description and formulated problems for us so that those who know the math can go ahead can solve the equations as a leisure activity. And in our power systems course, the professor didn't want to go into teaching us all the optimization so provided us final formulas. As for our control course, it was completely qualitative and relied on matlab or other lab software to carry out the assignments. We never had to solve more than a linear system equation and interpreting graphs by hands.

Our courses were mostly focused on learning how to use the software rather than implementing models. Many of my friends got jobs just for knowing how to use few softwares. And people like me who are going to graduate schools are taking more math courses. My supervisor recommended me to take few courses on non-linear/optimization/numerical methods etc.

Future students might even learn less math in their undergraduate education than us. Right now, high schools here are watering down the math they teach. I recall needing three math courses to get into universities but now you only need to take two.

16. Aug 25, 2012

Pythagorean

Until they utilize the material to out-earn you in the financial sector while you're busy intellectually wanking yourself. ;)

17. Aug 25, 2012

Hurkyl

Staff Emeritus
Re: "why does the professor derive the equation?"

Frequently in mathematics classes -- and I assume this is true in engineering classes -- a derivation of a formula or a proof of the theorem is an example: a demonstration of the knowledge and expertise you're supposed to be learning, and how to apply that knowledge and expertise to a situation of interest.

The hard part is to get them to realize they're supposed to be learning, e.g., kinematics and not merely $x = (1/2)at^2 + vt + x_0$.

18. Aug 25, 2012

PAllen

Re: "why does the professor derive the equation?"

"why does the professor derive the equation?"

to get to the other side of the blackboard.

19. Aug 26, 2012

Astronuc

Staff Emeritus
Re: "why does the professor derive the equation?"

I've heard concerns regarding that. Most engineering and technology companies want problem solvers, not just data entry technicians.

That's rather disturbing.

20. Aug 26, 2012

Staff: Mentor

Re: "why does the professor derive the equation?"

Why do I have a feeling you have answered your own question? :tongue:


text:
# A latex bibliography style I like (Nature style in biblatex)

Contents

This isn’t really a specific question, but I needed to make a bibliography in latex with the following requirements:

• The citations take up as little space as possible, so should probably be superscript
• The citations should be correctly grouped (i.e. 1-3, 6 not 6, 2, 3, 1)
• The bibliography can take up any amount of space
• The citations should be linked to their bibliography entry (i.e. hyperref compatible)
• bib entries contain unicode characters
• I want the entries to look like the Elsevier standard, though Nature is also fine
• I want DOIs, properly displayed and hyperlinked, not monospaced

The style=nature option supplied to biblatex in the preamble (see http://ctan.org/pkg/biblatex-nature) achieves most of this but you don’t get DOIs, there seemed to be some problems with unicode characters (particularly Polish names, see http://www.terminally-incoherent.com/blog/reference/latex-reference/) and there were some problems displaying URLs well

Rather than trying to hack together a biblatex.cfg based on the nature style which I didn’t understand/couldn’t be bothered to read through I instead was able to use a standard biblatex style with some options when loading the package:

\usepackage[style=numeric-comp,
maxcitenames=2,
maxnames = 5,
firstinits=true,
uniquename=init,
sorting=none,
url=false,
isbn=false,
eprint=false,
texencoding=utf8,
bibencoding=utf8,
autocite=superscript,
backend=biber
]{biblatex}

This gets pretty close, but I also needed to use the following biblatex.cfg (create this file in the same directory as the .tex file):

% Number in parenthesis
\renewbibmacro\*{volume+number+eid}{%
\printfield{volume}%
\iffieldundef{number}
{}
{\bibopenparen
\printfield{number}%
\bibcloseparen}
\printfield{eid}}

% Field formats for the bibliography environment (get rid of square brackets)

%Get rid of in:
\renewbibmacro{in:}{}

%Get rid of pp.
\DeclareFieldFormat[article,inproceedings,incollection]{pages}{#1}

%Make volume number emboldened
\DeclareFieldFormat[article,inproceedings,incollection]{volume}{\textbf{#1}}

%Journal name in non-italics
%\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{journaltitle}{#1}

%No quotes around article name
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{#1\isdot}

%Bibliography in smaller font size, and unjustified
\renewcommand{\bibfont}{\normalfont\small\raggedright}

%Hyperlinks in serif font
\def\UrlFont{\normalfont}

%DOI lower case, normal font
\renewcommand\*{\mkbibacro}[1]{%
\ifcsundef{\f@encoding/\f@family/\f@series/sc}
{#1}
{\MakeLowercase{#1}}}

%Colon after author names


text:
# Growth rate of a divisor function

https://en.wikipedia.org/wiki/Divisor_function#CITEREFHardyWright2008

I was wondering about a formula which appear under the Growth rate section :

for all $$\varepsilon>0$$, $$d(n)=\mathcal{O}(n^\epsilon)$$ where $$d(n)$$ stands for number divisors $$n$$ has.

I would like to know why this is true?

• The wikipedia article uses o, little o, not O, big O. Both are true. – Ross Millikan Dec 16 '18 at 21:41
• @WesleyStrik sorry I eddited it..I would like to know why this is true? – נירייב שמואל Dec 16 '18 at 21:42
• @RossMillikan I would like to know why this is true? I edited the page sorry. – נירייב שמואל Dec 16 '18 at 21:43
• Basically to get lots of divisors you either need lots of prime factors and the primes get bigger or you need lots of factors of a small prime, but the number of divisors grows very slowly (logarithmically) with the number of factors. Either way you need an enormous number to have lots of factors. – Ross Millikan Dec 16 '18 at 21:44
• The formulas quoted in Will Jagy's answer show that $d(n)\lt n^\epsilon$ for $n$ large enough and any given $\epsilon \gt 0$ – Ross Millikan Dec 16 '18 at 21:52

It's true. There are many interesting inequalities involving $$d(n)$$
I will start off with the simplest type, $$d(n) \leq \sqrt{3 n}$$ and $$d(n) \leq 48 \left(\frac{n}{2520}\right)^{1/3}$$ and $$d(n) \leq 576 \left(\frac{n}{21621600}\right)^{1/4}.$$ The first one has equality only at $$n = 12,$$ second only at $$n =2520,$$ third only at $$n= 21621600.$$ Instead of continuing with fractional powers $$1/k$$ the better results switch to logarithms. Reference is a 1988 paper by J. L. Nicolas in a book called Ramanujan Revisited.
With equality at $$n = 6983776800 = 2^5 \cdot 3^3 \cdot 5^2 \cdot 7 \cdot 11 \cdot 13 \cdot 17 \cdot 19$$ and $$d(n) = 2304,$$ $$d(n) \leq n^{ \left( \frac{\log 2}{\log \log n} \right) \left( 1.5379398606751... \right)} = n^{ \left( \frac{1.0660186782977...}{\log \log n} \right) }.$$ Full details of the proof appear in J.-L. Nicolas et G. Robin. Majorations explicites pour le nombre de diviseurs de n, Canad. Math. Bull., 26, 1983, 485--492. The next two appear in the dissertation of Robin, are repeated in the 1988 Nicolas survey article indicated.
With equality at a number $$n$$ near $$6.929 \cdot 10^{40},$$ $$d(n) \leq n^{ \left( \frac{\log 2}{\log \log n} \right) \left( 1 + \frac{1.934850967971...}{\log \log n} \right)}.$$ Compare this one with Theorem 317 in Hardy and Wright, attributed to Wigert (1907), $$\limsup \frac{\log d(n) \log \log n}{\log n} = \log 2.$$
With equality at a number $$n$$ near $$3.309 \cdot 10^{135},$$ $$d(n) \leq n^{ \left( \frac{\log 2}{\log \log n} \right) \left( 1 + \frac{1}{\log \log n} + \frac{4.762350121177...}{\left(\log \log n \right)^2} \right)}$$
• no, the more specific $$d(n) \leq n^{ \left( \frac{1.0660186782977...}{\log \log n} \right) }.$$ – Will Jagy Dec 16 '18 at 21:46


text:
# Difference between Renewable And Non-Renewable Fuels Renewable Fuels Renewable fuels are the fuels that have been produced from the resources that.

## Presentation on theme: "Difference between Renewable And Non-Renewable Fuels Renewable Fuels Renewable fuels are the fuels that have been produced from the resources that."— Presentation transcript:

Difference between Renewable And Non-Renewable Fuels Renewable Fuels Renewable fuels are the fuels that have been produced from the resources that are renewable Some of the examples include; ethanol, biofuels, methanol and the biodiesel. Non-Renewable Fuels A non renewable fuel refers to the fuel which cannot be regenerated or reused on the levels that can sustain its consumption rate. Examples of non renewable fuel are oil and natural gas or fossil fuels.

Petroleum Petroleum is crude oil, a naturally occurring liquid that can be refined to make gasoline (or petrol), diesel fuel, jet fuel, home heating oil, lubricating oil, wax, asphalt, and many other valuable products.

Diesel Diesel oil or diesel fuel is a type of fuel for cars. It is also an oil used for an energy source. It is made from petroleum and from various other sources It is named after Rudolf Diesel who in 1892 invented the diesel engine

CNG CNG refers to compressed natural gas. It is usually stored in a high-pressure container. The gas is primarily used as an alternative fuel for internal combustion of motor engines.

Download ppt "Difference between Renewable And Non-Renewable Fuels Renewable Fuels Renewable fuels are the fuels that have been produced from the resources that."

Similar presentations


text:
# integral basis

Let $K$ be a number field. A set of algebraic integers $\{\alpha_{1},\ldots,\alpha_{s}\}$ is said to be an integral basis for $K$ if every $\gamma$ in $\mathcal{O}_{K}$ can be represented uniquely as an integer linear combination of $\{\alpha_{1},\ldots,\alpha_{s}\}$ (i.e. one can write $\gamma=m_{1}\alpha_{1}+\cdots+m_{s}\alpha_{s}$ with $m_{1},\ldots,m_{s}$ (rational) integers).

If $I$ is an ideal of $\mathcal{O}_{K}$, then $\{\alpha_{1},\ldots,\alpha_{s}\}\in I$ is said to be an integral basis for $I$ if every element of $I$ can be represented uniquely as an integer linear combination of $\{\alpha_{1},\ldots,\alpha_{s}\}$.

(In the above, $\mathcal{O}_{K}$ denotes the ring of algebraic integers of $K$.)

An integral basis for $K$ over $\mathbb{Q}$ is a basis for $K$ over $\mathbb{Q}$.

 Title integral basis Canonical name IntegralBasis Date of creation 2013-03-22 12:36:03 Last modified on 2013-03-22 12:36:03 Owner rspuzio (6075) Last modified by rspuzio (6075) Numerical id 12 Author rspuzio (6075) Entry type Definition Classification msc 11R04 Synonym minimal basis Synonym minimal bases Related topic AlgebraicInteger Related topic Integral Related topic Basis Related topic DiscriminantOfANumberField Related topic ConditionForPowerBasis Related topic BasisOfIdealInAlgebraicNumberField Related topic CanonicalFormOfElementOfNumberField Defines integral bases


text:
Questions & Answers
Question
Answers

Write the successor of 2345670.

Answer Verified
Hint: Successor of a number ‘N’ is a number which immediately comes after ‘N’.

The number which comes immediately after a particular number is called its successor.
$\therefore$ The successor of the given 2345670 will be equal to 2345670+1=2345671

Note: Here the term successor refers to the number that directly comes after the given number. To find the successor of a given whole number we add 1 to the given number. And predecessor is a term used to refer to the number which just comes before the given number. To find the predecessor of a given whole number we subtract 1 from the given number.
Bookmark added to your notes.
View Notes


text:
# Tag Info

1

Perhaps. You indicate this is from an embedded device. This strongly implies everything the device needs to decrypt it is already present in the firmware of the machine, including both the algorithm and the key. Here is a blog post on how a talented engineer accomplished a similar feat through reverse engineering. Note that this was not a cryptographic ...

3

As long as the IV is chosen correctly, every individual block of the encrypted output will be uniformly random over the set of all bit-patterns of the given size. Each block is independent from the clear text, but they are not independent from each other. The first block contains the IV itself, which by construction is uniformly random and independent from ...

7

In the first block, the IV provides the "randomness", and in subsequent blocks you just use the previous block of ciphertext instead. Based on the assumption, that the cipher is not weak and behaves like a pseudorandom permutation, this is basically the same: You XOR something unpredictable on the plaintext, and then encrypt. As long as the IV is chosen ...

1

This is why we use random initialization vectors (IVs) for all such algorithms.

4

All modern block ciphers are supposed to be pseudorandom permutations, meaning that they cannot be efficiently distinguished from a truly random permutation without knowledge of the key. (If a practical distinguisher were to be found for a particular cipher, that cipher would be considered broken by modern standards.) This also implies that no two secure ...

2

Yes there is a significant difference concerning brute-force. ECB suffers from multi target attacks whenever you encrypt the same message block. This is always possible in a chosen-plaintext attack and often possible in practice with a known-plaintext attack. With CBC the IV means that the plaintexts passed to the blockcipher are almost certainly unique ...

2

As Maarten Bodewes already wrote in a comment, if you ignore the computational overhead of XOR, then there is essentially no difference in CBC and ECB for a bruteforce attack. However, the question is actually mixing oranges and apples (and it is not obvious), because the security weakness of modes of operation has nothing to do with the underlying ...

2

In short, yes. The complementation property of DES states that if $DES_K(P) = C$, then $DES_{\overline{K}}(\overline{P}) = \overline{C}$, where $\overline{X}$ is the complement of a string $X$. ECB with DES takes a message $M_1M_2\cdots M_\ell$ and computes $C_1C_2\cdots C_\ell$, where $C_i = DES_K(M_i)$, for $1\le i\le\ell$. Therefore, if you encrypt ...

Top 50 recent answers are included


text:
, 03.07.2019 17:00 towlesam

# What is the structure of the poem allow yourself to fight?

### Another question on English

English, 22.06.2019 02:30
This series of works has captured the imaginations of people all over the world. a. incarcerated c. jailed b. seized d. arrested
English, 22.06.2019 05:00
"introduction to oedipus the king": what is most likely the author's intent in writing about the difference(s) between sophocles's play and the original myth on which it's based?
English, 22.06.2019 05:40
Read the sentence. thomas jefferson himself worked on a draft of the document. what kind of pronoun is himself?
English, 22.06.2019 06:30
According to the article "clemente's impact wanes in puerto rico 40 years after his death," what happens in puerto rico in 2012 to celebrate the anniversary of clemente's 3000th hit?
What is the structure of the poem allow yourself to fight?...
Questions
Mathematics, 07.12.2020 17:00
Timothy is filling fish bowls with pebbles at his fish store. He wants to have $\frac{1}{6}$ of a pound of pebbles in each fish bowl. There is a total...
English, 07.12.2020 17:00
f c k y o u p e o p l e t h i s i s D U M B b e c a u s e i w a n t t o g e t b a n n e d a n d t h e y w o n t b a n M E E E E ! ! ! !! ! ! ! ! ! !!...
Engineering, 07.12.2020 17:00
An F-18 pilot is flying 1,538 km/h at 2,734 m. He hits a turbulent air pocket and needs to increase the lift of his plane to stabilize the flight....
Mathematics, 07.12.2020 17:00
Solve this question for me. Atrader paid 15 GH for 6 drinking cups. One of the cups got broken, He sold the remaining 5, making profit of 10 percent....
History, 07.12.2020 17:00
Soviet propaganda compared and contrasted with U. S propaganda...
Mathematics, 07.12.2020 17:00
Mathematics, 07.12.2020 17:00
A rock is thrown upward from the surface of Mars with an initial velocity of 50 feet per second. The height of a rock can be modeled by the: h(t)=-6.5...
Social Studies, 07.12.2020 17:00
A central part of all the Jewish religious services is...
English, 07.12.2020 17:00
A student selected a book with a lot of information about the traditions, foods, and cultures of students around the world. What was most likely her p...
History, 07.12.2020 17:00
What does it mean when a country specializes in producing a certain good or service? How might the country benefit from their specialization?...
Engineering, 07.12.2020 17:00
A 100-ampere resistor bank is connected to a controller with conductor insulation rated 75°C. The resistors are not used in conjunction with the start...
Mathematics, 07.12.2020 17:00
A refrigeration unit requires 4.6 pounds of refrigerant. Using a metric scale, you determine that there are 2.3 kilograms of refrigerant remaining in...
Mathematics, 07.12.2020 17:00
When registering their cars, owners must identify the color that covers the largest portion of the vehicle. In one region, the probability that car wa...
Health, 07.12.2020 17:00
C. Ipaliwanag mo: Panuto: Sa iyong palagay, nasasalamin ba sa pabulang "Ang Hatol ng Kuneho"ang pag-uugali nating mga Pilipino?sagutang p...
Mathematics, 07.12.2020 17:00
-3( x + 2 ) =5(x+1) solve for x...
History, 07.12.2020 17:00
Ano ang Tradisyong tampok ng Kwentong bayan na pinamagatang Si Mariang Mapangarapin?...
Mathematics, 07.12.2020 17:00
I’m not the smartest person and I need this rounded to the nearest tenth
History, 07.12.2020 17:00
Ｈｏｔ!ｔｉｅ ｈａｎ!ｇｏｕｔ ｐｉｃｓ ｗｉｔｈ ｎｕ!ｄｅ ｂａｂｅｓ Ｗａｉ!ｔｉｎｇ ｆｏｒ ｙｏｕ: ｂｒａｉｎｌｙ.ｔｏｄａｙ
English, 07.12.2020 17:00
You have been asked to write an informational article explaining the most important advancements in American agriculture. Your article must be...
Mathematics, 07.12.2020 17:00
A light bulb manufacturer wants to determine how long its light bulbs will burn. They decide to test every 50th light bulb produced. What type...
Questions on the website: 14429055


text:
# On low rank graph isomorphism

Is there a $c>1$ (maybe $c=2$) such that every lower than rank $n^{1/c}$ graphs on $n$ vertices can be tested to be in polynomial time?

• By "rank of a graph" do you mean the rank of the adjacency matrix over $\mathbb{R}$? $\mathbb{F}_2$? Something else? – Joshua Grochow Dec 14 '15 at 0:16
• @JoshuaGrochow over $\Bbb R$? – 1.. Dec 14 '15 at 1:26
• @JoshuaGrochow do you also know if GI is random self reducible in some sense like Discrete Log cstheory.stackexchange.com/questions/33274/…? the issue is GI seems easy on most graph classes unlike dlog and so can that post be salvaged? – 1.. Dec 14 '15 at 2:02


text:
# well posed learning problem examples

The mathematical term well-posed problem stems from a definition given by 20th-century French mathematician Jacques Hadamard. 1 and integrate in space over the given interval. | x u | One simple example of an ill-posed problem is given by the equation y’ = (3/2)y1/3 with y(0) = 0. | Some of them don’t even own computers and seek help in Learning Resource Centers for technical assistance. t α x The kind of problem posed. ML algorithms can pinpoint the specific biases which can cause problems for a business. ( Image from “ImageNet classiﬁcation with deep CNNs”, Krizhevsky et al. At the end of the lesson, there is a role play activity in which the language from the lesson is put into practice. Training a computer program to detect whether an image of a tumour is malignant or benign: • T? However, so much flexibility often results in inaction. The first step in any project is defining your problem. 1 Students then listen to several dialogues and study the expressions used by the speakers to declare and diagnose a problem as well as make suggestions and take action. 2 For example, a teacher might need to figure out how to improve student performance on a writing proficiency test. The solutions of the function are y = C/x + 2, where C is a constant. | That includes problems like: f( x ) = x 2 + x, f( x )= 3 x / … x Browse our catalogue of tasks and access state-of-the-art solutions. Typically, regularization refers to a process wherein an ill-posed problem is replaced by a well-posed problem. Mathematical tasks or activities come in a variety of guises: investigations, projects, traditional story sums, real-life problems, abstract problems, puzzles, etc. Definition and Examples of Ill Posed and Inverse Problems Some ﬁrst results in ill-posed problems theory. For more ways to test for continuity, see: How to Check the Continuity of a Function. 5. For example, a teacher might need to figure out how to improve student performance on a writing proficiency test. Notre technologie de traduction inégalée se base sur les réseaux neuronaux de DeepL. Supervised learning as we know from last story machine learning takes data as input. It is well-known that any parameter estimation problem requires a well-posed forward problem, i.e., a problem whose output is continuous with respect to its input. u 0 3.The solution's behaviour changes continuously with the initial conditions. Reinforcement learning is really powerful and complex to apply for problems. 2.The solution is unique. How to Design Learning Systems; Well-Posed Learning Problems. x = = Deﬁnition (Well-posed problems (Hadamard)) A problem is well-posed if the following three properties hold. Examples of Ill-Posed Problems Michael Moeller Ill-Posedness Differentiation Inverse Diffusion Image Deblurring updated 11.10.2014 What are ill-posed problems? Well Posed and Stable Problems u Jacques-Salomon Hadamard, the French mathematician who described the three Hadamard criteria in 1923, believed that any useful mathematical model of any physical problem must satisfy these criteria. ∫ , ) ( Typically this involves including additional assumptions, such as smoothness of solution. Noting that problem-based learning has many possible definitions and permutations, Gijbels nonetheless stressed the importance of identifying a core set of principles that characterize this type of learning. The e-learning format offers students great flexibility: they can take the courses when and where they like, at their own pace and with no physical limitations. This ERIC Digest discusses many aspects of PBL including a brief history. 2 Tikhonov regularization is one of the most commonly used for regularization of linear ill-posed problems. (p-norm). − An example of this problem can occur when a car insurance company tries to predict which client has a high rate of getting into a car accident and tries to strip out the gender preference given that the law does not allow such discrimination. Many inverse problems are ill-posed because either they don’t have a solution everywhere, their solution is not unique, or their solution is not stable (continuous). With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. Well-posed learning problem is defined as follows. The mathematical term well-posed problem stems from a definition given by 20th-century French mathematician Jacques Hadamard. For example, the inverse heat equation, deducing a previous distribution of temperature from final data, is not well-posed in that the solution is highly sensitive to changes in the final data. For example, as well as being one of the most useful and flexible devices, the personal computer is also one of the most problematic, with technical problems, continual upgrades, problematic interfaces, and demands on time and money to name a few. If the problem is well-posed, then it stands a good chance of solution on a computer using a stable algorithm. An exciting real-world example of supervised learning is a study from Stanford University that used a model to detect skin cancer in images. , 1. u If, in order to solve the problem, they are required to have knowledge, understandings and skills, that they don't currently have, they are likely to be motivated to gain them. ( t How Problem-Solving Skills Work . Still,  the differentiation between them and more stable problems remains useful. Since the solution is y(t) = ± t3/2, the solution is not unique (it could be plus t3/2 or it could be minus t3/2). ML algorithms can pinpoint the specific biases which can cause problems for a business. 2. you want to predict students' marks in the final exam of COMP9417 given their marks from the other assessable components in the course - you may assume that the corresponding data from previous years is available Pick one of the tasks and state how you would define it as a well-posed machine learning problem in terms of the above requirements. dry, fruity, light, etc.) In the definition of a well-posed problem it states that a problem is well posed if: 1.A solution exists. Supervised learning: decision trees, … The only solution to this problem is knowing exactly what kind of technological support they will need for a certain course before enrolling in it, as well as properly equipping themselves for the course’s successful completion. ) A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E. Phillips ; the expression "Tikhonov well-posed" is not widely used in the West.. Other problems that lead to ill-posed problems in the sense described above are the Dirichlet problem for the wave equation, the non-characteristic Cauchy problem for the heat equation, the initial boundary value problem for the … For every a. While solutions may be continuous with respect to the initial conditions, they may suffer from numerical instability when solved with finite precision, or with errors in the data. 5. ( 2 An ill posed problem will often need to be regularized or re-formulated before one can give it a full numerical analysis using computer algorithms or other computational methods. ( How Problem-Solving Skills Work . These might be regarded as 'natural' problems in that there are physical processes modelled by these problems. Well posed learning problem: "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E." The checkers example, E = 10000s games; T is playing checkers; P if you win or notSeveral types of learning algorithms 1 • Issue the query against index of recent newswire articles. 4. Keywords: mathematics education, teacher training, content knowledge, problem posing INTRODUCTORY REMARKS: MATHEMATISATION OF THE SOCIETY AND MATHEMATICAL LITERACY On many different occasions we come across the … | Since there are an infinite number of possible values of C, there are an infinite number of solutions, and the second Hadamard criteria is not met. ≤ ) Problems in nonlinear complex systems (so-called chaotic systems) provide well-known examples of instability. http://bayes.wustl.edu/etj/articles/well.pdf 2. In this case, the training set contained images of … u Example: Let 0 <ε˝ 1, and kk be the maximum norm on C(R). Some of them don’t even own computers and seek help in Learning Resource Centers for technical assistance. A method to determine the well-posedness of a problem is the energy method. How to Design Learning Systems; Well-Posed Learning Problems. 0 A classic example is the inverse heat problem, where the distribution of surface temperature of solid is deduced from information on the inner surface area. = ( Well-Posed Learning Problems Alessandro Betti and Marco Gori Abstract Machine Learning algorithms are typically regarded as appropriate opti-mization schemes for minimizing risk functions that are constructedon the training set, which conveys statistical ﬂavor to the corresponding learning problem. The Hadamard criteria was proposed by Jacques-Salomon Hadamard, a French mathematician, in 1923. ⇒ You can check continuity of many functions by graphing; if you don’t have to take your pencil off the paper at any point or leave any ‘ empty holes’ in your lines, the function is continuous. The majority of problems we work with in calculus, engineering, and math are well-posed. ∂ + > Deﬁnition (Well-posed problems (Hadamard)) A problem is well-posed if the following three properties hold. α Examples of inverse and ill-posed problems. The e-learning format offers students great flexibility: they can take the courses when and where they like, at their own pace and with no physical limitations. A Case for Problem-Based Learning Suppose you are a high school social studies teacher who works in a culturally diverse school somewhere in Texas. Noting that problem-based learning has many possible definitions and permutations, Gijbels nonetheless stressed the importance of identifying a core set of principles that characterize this type of learning. 2 Uniqueness: For all suitable data, the solution is unique. {\displaystyle \partial _{t}\int _{0}^{1}{\frac {u^{2}}{2}}dx=-\alpha \int _{0}^{1}uu_{x}dx\Rightarrow {\frac {1}{2}}\partial _{t}||u||_{2}^{2}=-\alpha {\frac {u^{2}}{2}}{\Big |}_{0}^{1}=0}, Then one would integrate in time and one would obtain the energy estimate, | | Term regarding the properties that mathematical models of physical phenomena should have, https://en.wikipedia.org/w/index.php?title=Well-posed_problem&oldid=993335674, Short description is different from Wikidata, Creative Commons Attribution-ShareAlike License, the solution's behaviour changes continuously with the, This page was last edited on 10 December 2020, at 02:12. Your email address will not be published. Some ﬁrst results in ill-posed problems theory. Machine Learning provides businesses with the knowledge to make more informed, data-driven decisions that are faster than traditional approaches. α The main subject is often introduced by heuristics, particular cases and examples. Nev-ertheless by now there was no formal evidence neither that learning from examples could be seen as an inverse problem nor that theoretical results in learning theory could be independently derived using tools from reg-ularization theory. An ill-conditioned problem is indicated by a large condition number. Continuum models must often be discretized in order to obtain a numerical solution. Required fields are marked *. < An ill posed problem is one which doesn’t meet the three Hadamard criteria for being well-posed. Supervised learning : When an algorithm learns from example data and associated target responses that can consist of numeric values or string labels, such as classes or tags, in order to later predict the correct response when posed with new examples comes under the category of Supervised learning. Examples of Well Posedness. Having a core definition enables researchers to compare problem-based learning with other types of learning environments. Examples of inverse and ill-posed problems. He believed that mathematical models of physical phenomena should have the properties that: Examples of archetypal well-posed problems include the Dirichlet problem for Laplace's equation, and the heat equation with specified initial conditions. On the parameters or input data problems usually met in mathematical modeling Chegg well posed learning problem examples... The definition of a well-posed problem by another well-posed problem stems from a definition given 20th-century... X is also real and is well posed if: 1.A solution exists than traditional approaches most and! And inverse problems are typically ill-posed, as opposed to the well-posed problems usually in. That is  easier '' to solve inverse problems are ill posed this approach is indeed similar human... Inverse reinforcement learning is really powerful and shiniest algorithms available, but since nobody listens we have to keep back... In that there are physical processes modelled by these problems for continuity, see: how to Design learning ;... Writing, as opposed to the well-posed problems usually met in mathematical modeling the! = C/x + 2, where C is a recently developed machine-learning framework that can solve the problem... And math are well-posed pairs or small groups trying to find solutions to 5 different problems the subject... More experienced employees the properties that: Srihari Query the end of the Hadamard criteria was proposed by Hadamard. Works in a culturally diverse school somewhere in Texas discretized in order to obtain a numerical.... Still, the solution is unique ways to test for continuity, see: to. Economics ( in optimal control theory, among other fields ) in inaction result of,! Is free given by 20th-century French mathematician Jacques Hadamard the main subject is often introduced heuristics! The most powerful and complex to apply for problems discretized in order to obtain a numerical solution Ill-Posedness Differentiation Diffusion. A French mathematician Jacques Hadamard problem-solving skills by familiarizing yourself with common issues in your industry and learning more. Regularization denotes a technique to replace one well-posed problem by another well-posed problem another! Considered ill posed and stable problems definition and examples of inverse and ill-posed problems this post you will learn process. Against noisy or slightly shifted input images proficiency test to your questions from an expert the! To mathematical analysis Krizhevsky et al termed ill-posed robust against noisy or shifted. Norm on C ( R ) the supervision of a Function speaking activity is practice! “ data ” or “ past experience ” tutor is free groups, levels and. And beginning all over again to machine learning takes data as input problems and which... Among other fields ) Srihari Query with in calculus, engineering, and kk be the maximum norm C. With a Chegg tutor is free if the problem is well-posed Systems ; well-posed learning problem to skin! De DeepL models of physical phenomena should have the properties that: Srihari Query for numerical treatment stable! Expressing themselves orally and in economics ( in optimal control theory, among other fields.... High school social studies teacher who works in a culturally diverse school somewhere in Texas listens we to. Beginning all over again then it stands a good chance of solution it stands a good of... With the knowledge to make more informed, data-driven decisions that are not,... Tasks and access state-of-the-art solutions traduction inégalée se base sur les réseaux neuronaux de DeepL the of... For conversation classes, bigger and smaller groups, levels intermediate and above a part of the lesson put.: Take f ( x ) = x 2 + x is also real and is well posed:... Bigger and smaller groups, levels intermediate and above use the most commonly used for regularization linear! Large differences in calculated interior heat distribution to figure out how to Check the continuity of a well-posed problem. Of ill posed introduction Everything has been said before, but since nobody listens we have to keep back... For learning through solving problems, or were some more suitable than others lends to... Problems understanding space problem-solving in English and brainstorm solutions to 5 different problems can cause problems for a business re-formulated. Are: a problem lends itself to mathematical analysis to solve orally in. Difficulty writing, as a part of the Hadamard criteria was proposed by Jacques-Salomon Hadamard, a French mathematician Hadamard. Result of dyslexia, poor motor coordination or problems understanding space including additional assumptions, such smoothness... Is to practice problem-solving in English and brainstorm solutions to 5 different.!, see: how to Design learning Systems ; well-posed learning problem R ) the end of the are! With the knowledge to make more informed, data-driven decisions that are than... High school social studies teacher who works in a culturally diverse school somewhere Texas... Define a well-posed problem it states that a problem is well posed if 1.A. To solve not well-posed, then it stands a good chance of solution be re-formulated numerical... Teacher might need to be robust against noisy or slightly shifted input.! Problems are ill posed image Deblurring updated 11.10.2014 What are ill-posed problems problem states. A French mathematician, in 1923 very live branch of applied mathematics Check. Mathematician, in 1923 ( so-called chaotic Systems ) provide well-known examples of ill-posed problems Michael Moeller Differentiation! ” or “ past experience ” a stable algorithm by these problems from. Supervision of a teacher might need to figure out how to improve student performance a. Yourself with common issues in your industry and learning from more experienced employees activity which! More ways to test for continuity, see: how to improve student performance on a proficiency... Make more informed, data-driven decisions that are not well-posed is considered posed... Is based upon deriving an energy estimate one can conclude that the problem ill! Teacher who works in a culturally diverse school somewhere in Texas a French mathematician Jacques Hadamard statement an... Ill-Posedness Differentiation inverse Diffusion image Deblurring updated 11.10.2014 What are ill-posed problems learning the. As comprehending spoken language and expressing themselves orally and in economics ( in optimal control theory, among other )... Image from “ ImageNet classiﬁcation with deep CNNs ”, Krizhevsky et.... •Ability of computers to “ learn ” from “ ImageNet classiﬁcation with deep CNNs,... Particular cases and examples ill-posed problems well, such as smoothness of solution as a result dyslexia... A result of dyslexia, poor motor coordination or problems understanding space as a result of dyslexia, motor. Search engine understanding space smallest changes in surface temperature data can lead arbitrarily... Well-Posed problems ( Hadamard ) ) a problem is well-posed, it 's not the mythical, magical many.: decision trees, … examples of ill-posed problems is a recently developed well posed learning problem examples framework that can solve inverse!: 1.A solution exists writing, as a part of the lesson, there is a study Stanford! States that a problem is well-posed if the problem is well defined aspect applying... Data-Driven decisions that are not well-posed, then it stands a good chance of solution of the lesson put! Many first order differential equations and inverse problems are typically ill-posed, as opposed to the well-posed problems ( )... To define a well-posed problem it states that a problem is well posed and stable problems remains useful on... For a business problem which is not well-posed in the definition of a well-posed by... Side of these topics are presented a ) What is required to a. Method is based upon deriving an energy estimate one can conclude that the problem well-posed. Ill-Posed problem is well-posed or benign: • t is unarguably the most important aspect of applying example... Learning Systems ; well-posed learning problem learning Suppose you are solving the wrong.! Continuity of a well-posed problem by another well-posed problem stems from a definition given by 20th-century mathematician. School somewhere in Texas data by optimizing a model 1 Cheating Statistics Handbook ’ m a writer and concerned... Suitable data, the problem and narrow it down brainstorm solutions to different. Knowledge to make more informed, data-driven decisions that are not well-posed, it needs to be against. In images is  easier '' to solve the pure and applied side of these topics are presented to... Problems like: Take f ( x ) = x 2 + x is also and. Index of recent interest in Statistics and machine learning problems as 'natural ' in! A Case for problem-based learning with other types of learning environments this violates rule 2 the! Common issues in your industry and learning from more experienced employees to arbitrarily large in! To define a well-posed problem it states that a problem is indicated by well-posed. To a search engine mathematical analysis to apply for problems provides businesses with the knowledge to make informed. Experienced employees this post you will learn the process for thinking deeply about your problem before you started. For thinking deeply about your problem with common issues in your industry and learning from more experienced.... Slightly shifted input images physical phenomena should have the properties that: Srihari Query then stands... Training a computer using a stable algorithm, particular cases and examples of ill-posed?... And expressing themselves orally and in writing without gender as a result of dyslexia, poor motor coordination or understanding., particular cases and examples of ill posed: make intelligent predictions or decisions on! A culturally diverse school somewhere in Texas somewhere in Texas a part of the lesson, there is very... ( a ) What is required to define a well-posed problem stems from a definition given by 20th-century mathematician. Of partial diﬀerential equations go naturally with certain side conditions keep going back and beginning over. A definition given by 20th-century French mathematician, in 1923 motor coordination or problems understanding space “ past ”! Us how well a problem lends itself to mathematical analysis Pose difficulties well!


text:
# Reasons behind assuming the existence of Siegel zeros can be used to prove something stronger than assuming GRH?

There are few results that I am aware of where one can prove something stronger by assuming the existence of Siegel zeros than by assuming the GRH. For example Heath-Brown proved the existence of Siegel zeros imply the twin prime conjecture while it is unknown under GRH. Also there is: Let $P(a,q)$ be the least prime $\equiv a \pmod q$. Then assuming GRH we have $P(a,q) \ll q^L$ where $L < 2 + \varepsilon$, but assuming the existence of the Sigel zeros we have $L < 2$. (This I just took from Good uses of Siegel zeros?)

I was interested in this phenomenon. I would greatly appreciate if anyone could explain why or give some ideas on why this is the case?

Also this is a question with subjective answer, but when there is a result of this type (where by assuming Siegel zeros one gets even stronger results than assuming GRH), do we generally expect it to be the truth? Thank you. Any comments are appreciated.

• Your question is interesting but I think you should modify a bit your title, as it sounds as if assuming the existence of a Siegel zero would be stronger than GRH, which seems to mean GRH would be a consequence thereof, which is wrong. Jan 21, 2018 at 10:54
• @SylvainJULIEN true. it is fixed now. thanks. Jan 21, 2018 at 11:37

Roughly speaking, GRH asserts that the Möbius function $\mu$ is "orthogonal" to all Dirichlet characters $\chi$, in the sense that correlations such as $\sum_{n \leq x} \mu(n) \overline{\chi(n)}$ are very small. This is the expected behaviour of the Möbius function, and through various standard analytic number theory manipulations one can also use GRH to control correlations between the von Mangoldt function $\Lambda(n)$ (which basically encodes primes) and various other functions, e.g. linear phases $e(\alpha n)$. On the other hand, GRH struggles to control self-correlations such as $\sum_{n \leq x} \mu(n) \mu(n+2)$ or $\sum_{n \leq x} \Lambda(n) \Lambda(n+2)$ (the latter being used to count twin primes). For instance, in the function field case GRH is a known theorem, but we are still unable to obtain an asymptotic (or even a lower bound of the right order of magnitude) for twin primes, though it is possible to establish the infinitude of twin primes in this case by more algebraic means.

In contrast, the existence of a Siegel zero means that there is a quadratic Dirichlet character $\chi$ with which $\mu$ has very high correlation (this can be quantified precisely using the "pretentious" approach to analytic number theory developed by Granville and Soundararajan). This would be very unusual behavior for $\mu$, and as such is actually a rather powerful piece of information. As a crude first approximation, a Siegel zero allows one to replace $\mu$ with $\chi$ with acceptable error (in practice one has to be more careful at small primes, though, for instance by imposing a suitable preliminary sieve). Thus for instance one could hope to approximate $\sum_{n \leq x} \mu(n) \mu(n+2)$ by something resembling $\sum_{n \leq x} \chi(n) \chi(n+2)$, which is relatively easy to bound nontrivially. Very roughly speaking, Heath-Brown's arguments proceed by similarly replacing the von Mangoldt function $\Lambda(n) = \sum_{d|n} \mu(d) \log \frac{n}{d}$ with the variant $f(n) := \sum_{d|n} \chi(d) \log \frac{n}{d}$, which is roughly of the same order of complexity as the divisor function; in particular sums such as $\sum_{n \leq x} f(n) f(n+2)$ are tractable enough by known methods (e.g. Kloosterman sum bounds) that they are a useful approximant to the otherwise intractable $\sum_{n \leq x} \Lambda(n) \Lambda(n+2)$.

• This is a great explanation of how to do interesting things with Siegel zeros, but it would also be helpful (to me) to hear more about the last part of the original question: "when there is a result of this type (where by assuming Siegel zeros one gets even stronger results than assuming GRH), do we generally expect it to be the truth?" Jul 15, 2021 at 10:51


text:
### Home > A2C > Chapter 10 > Lesson 10.1.2 > Problem10-50

10-50.

Use your answer from the previous problem to solve $x^{3} − 2x^{2} + 25x − 50 = 0$.

$\left(x − 2\right)\left(x^{2} + 25\right) = 0$