text:
### Archive

Archive for the ‘Statistics’ Category

## Understanding omitted confounders, endogeneity, omitted variable bias, and related concepts

Initial thoughts

Estimating causal relationships from data is one of the fundamental endeavors of researchers. Ideally, we could conduct a controlled experiment to estimate causal relations. However, conducting a controlled experiment may be infeasible. For example, education researchers cannot randomize education attainment and they must learn from observational data.

In the absence of experimental data, we construct models to capture the relevant features of the causal relationship we have an interest in, using observational data. Models are successful if the features we did not include can be ignored without affecting our ability to ascertain the causal relationship we are interested in. Sometimes, however, ignoring some features of reality results in models that yield relationships that cannot be interpreted causally. In a regression framework, depending on our discipline or our research question, we give a different name to this phenomenon: endogeneity, omitted confounders, omitted variable bias, simultaneity bias, selection bias, etc.

Below I show how we can understand many of these problems in a unified regression framework and use simulated data to illustrate how they affect estimation and inference. Read more…

Categories: Statistics Tags:

## ARMA processes with nonnormal disturbances

Autoregressive (AR) and moving-average (MA) models are combined to obtain ARMA models. The parameters of an ARMA model are typically estimated by maximizing a likelihood function assuming independently and identically distributed Gaussian errors. This is a rather strict assumption. If the underlying distribution of the error is nonnormal, does maximum likelihood estimation still work? The short answer is yes under certain regularity conditions and the estimator is known as the quasi-maximum likelihood estimator (QMLE) (White 1982).

In this post, I use Monte Carlo Simulations (MCS) to verify that the QMLE of a stationary and invertible ARMA model is consistent and asymptotically normal. See Yao and Brockwell (2006) for a formal proof. For an overview of performing MCS in Stata, refer to Monte Carlo simulations using Stata. Also see A simulation-based explanation of consistency and asymptotic normality for a discussion of performing such an exercise in Stata.

Simulation

## A simulation-based explanation of consistency and asymptotic normality

Overview

In the frequentist approach to statistics, estimators are random variables because they are functions of random data. The finite-sample distributions of most of the estimators used in applied work are not known, because the estimators are complicated nonlinear functions of random data. These estimators have large-sample convergence properties that we use to approximate their behavior in finite samples.

Two key convergence properties are consistency and asymptotic normality. A consistent estimator gets arbitrarily close in probability to the true value. The distribution of an asymptotically normal estimator gets arbitrarily close to a normal distribution as the sample size increases. We use a recentered and rescaled version of this normal distribution to approximate the finite-sample distribution of our estimators.

I illustrate the meaning of consistency and asymptotic normality by Monte Carlo simulation (MCS). I use some of the Stata mechanics I discussed in Monte Carlo simulations using Stata.

Consistent estimator

A consistent estimator gets arbitrarily close in Read more…

Categories: Statistics Tags:

## Fitting distributions using bayesmh

This post was written jointly with Yulia Marchenko, Executive Director of Statistics, StataCorp.

As of update 03 Mar 2016, bayesmh provides a more convenient way of fitting distributions to the outcome variable. By design, bayesmh is a regression command, which models the mean of the outcome distribution as a function of predictors. There are cases when we do not have any predictors and want to model the outcome distribution directly. For example, we may want to fit a Poisson distribution or a binomial distribution to our outcome. This can now be done by specifying one of the four new distributions supported by bayesmh in the likelihood() option: dexponential(), dbernoulli(), dbinomial(), or dpoisson(). Previously, the suboption noglmtransform of bayesmh‘s option likelihood() was used to fit the exponential, binomial, and Poisson distributions to the outcome variable. This suboption continues to work but is now undocumented.

For examples, see Beta-binomial model, Bayesian analysis of change-point problem, and Item response theory under Remarks and examples in [BAYES] bayesmh.

We have also updated our earlier “Bayesian binary item response theory models using bayesmh” blog entry to use the new dbernoulli() specification when fitting 3PL, 4PL, and 5PL IRT models.

Categories: Statistics Tags:

## How to generate random numbers in Stata

Overview

I describe how to generate random numbers and discuss some features added in Stata 14. In particular, Stata 14 includes a new default random-number generator (RNG) called the Mersenne Twister (Matsumoto and Nishimura 1998), a new function that generates random integers, the ability to generate random numbers from an interval, and several new functions that generate random variates from nonuniform distributions.

Random numbers from the uniform distribution

In the example below, we use runiform() to create Read more…

Categories: Statistics Tags:

## Vector autoregression—simulation, estimation, and inference in Stata

Simulation

Let’s begin by simulating a bivariate VAR(2) process using the following specification,

$\begin{bmatrix} y_{1,t}\\ y_{2,t} \end{bmatrix} = \mub + {\bf A}_1 \begin{bmatrix} y_{1,t-1}\\ y_{2,t-1} \end{bmatrix} + {\bf A}_2 \begin{bmatrix} y_{1,t-2}\\ y_{2,t-2} \end{bmatrix} + \epsb_t$

where $$y_{1,t}$$ and $$y_{2,t}$$ are the observed series at time $$t$$, $$\mub$$ is a $$2 \times 1$$ vector of intercepts, $${\bf A}_1$$ and $${\bf A}_2$$ are $$2\times 2$$ parameter matrices, and $$\epsb_t$$ is a $$2\times 1$$ vector of innovations that is uncorrelated over time. I assume a $$N({\bf 0},\Sigmab)$$ distribution for the innovations $$\epsb_t$$, where $$\Sigmab$$ is a $$2\times 2$$ covariance matrix.

I set my sample size to 1,100 and Read more…

## Testing model specification and using the program version of gmm

This post was written jointly with Joerg Luedicke, Senior Social Scientist and Statistician, StataCorp.

The command gmm is used to estimate the parameters of a model using the generalized method of moments (GMM). GMM can be used to estimate the parameters of models that have more identification conditions than parameters, overidentified models. The specification of these models can be evaluated using Hansen’s J statistic (Hansen, 1982).

We use gmm to estimate the parameters of a Poisson model with an endogenous regressor. More instruments than regressors are available, so the model is overidentified. We then use estat overid to calculate Hansen’s J statistic and test the validity of the overidentification restrictions.

## Bayesian binary item response theory models using bayesmh

This post was written jointly with Yulia Marchenko, Executive Director of Statistics, StataCorp.

Overview

Item response theory (IRT) is used for modeling the relationship between the latent abilities of a group of subjects and the examination items used for measuring their abilities. Stata 14 introduced a suite of commands for fitting IRT models using maximum likelihood; see, for example, the blog post Spotlight on irt by Rafal Raciborski and the [IRT] Item Response Theory manual for more details. In this post, we demonstrate how to fit Bayesian binary IRT models by using the redefine() option introduced for the bayesmh command in Stata 14.1. We also use the likelihood option dbernoulli() available as of the update on 03 Mar 2016 for fitting Bernoulli distribution. If you are not familiar with the concepts and jargon of Bayesian statistics, you may want to watch the introductory videos on the Stata Youtube channel before proceeding.

We use the abridged version of the mathematics and science data from DeBoeck and Wilson (2004), masc1. The dataset includes 800 student responses to 9 test questions intended to measure mathematical ability.

The irt suite fits IRT models using data in the wide form – one observation per subject with items recorded in separate variables. To fit IRT models using bayesmh, we need data in the long form, where items are recorded as multiple observations per subject. We thus reshape the dataset in a long form: we have a single binary response variable, y, and two index variables, item and id, which identify the items and subjects, respectively. This allows us to Read more…

Categories: Statistics Tags:

## regress, probit, or logit?

In a previous post I illustrated that the probit model and the logit model produce statistically equivalent estimates of marginal effects. In this post, I compare the marginal effect estimates from a linear probability model (linear regression) with marginal effect estimates from probit and logit models.

My simulations show that when the true model is a probit or a logit, using a linear probability model can produce inconsistent estimates of the marginal effects of interest to researchers. The conclusions hinge on the probit or logit model being the true model.

Simulation results

For all simulations below, I use a sample size of 10,000 and 5,000 replications. The true data-generating processes (DGPs) are constructed using Read more…

Categories: Statistics Tags:

We often use probit and logit models to analyze binary outcomes. A case can be made that the logit model is easier to interpret than the probit model, but Stata’s margins command makes any estimator easy to interpret. Ultimately, estimates from both models produce similar results, and using one or the other is a matter of habit or preference.

I show that the estimates from a probit and logit model are similar for the computation of a set of effects that are of interest to researchers. I focus on the effects of changes in the covariates on the probability of a positive outcome for continuous and discrete covariates. I evaluate these effects on average and at the mean value of the covariates. In other words, I study the average marginal effects (AME), the average treatment effects (ATE), the marginal effects at the mean values of the covariates (MEM), and the treatment effects at the mean values of the covariates (TEM).

First, I present the results. Second, I discuss the code used for the simulations.

Results

In Table 1, I present the results of a simulation with 4,000 replications when the true data generating process (DGP) satisfies the assumptions of a probit model. I show the Read more…

Categories: Statistics Tags:


text:
+0

# inequality problem

0
67
1

What is the solution to (x + 2)(x - 3)^2 > 0?

Sep 7, 2020

We can set it equal to zero. $$(x+2)(x-3)^2=0\rightarrow x=-2,3$$. Now we can try a value that is greater than 3 to eliminate the bottom choice. Lets do 4. Note that (4+2)(4-3)^2 is greater than 0, so it is not choice 3. Now to eliminate choice 1, we try a number less than -2, say -4. (-4+2)(-4-3)^2=(-2)49=-98, not greater than 0. So the answer is choice 2.

format: plain


text:
1. ## Integration

Integrate (3+x)/(x^2 -9)^0.5

For now, i would just like to know if i am supposed to use the by parts forumla?

2. Originally Posted by Erghhh
Integrate (3+x)/(x^2 -9)^0.5

For now, i would just like to know if i am supposed to use the by parts forumla?
$\int \frac{x}{\sqrt{x^2-9}} \, dx + \int \frac{3}{\sqrt{x^2-9}} \, dx$

straight up substitution for the first integral , $u = x^2 - 9$

trig sub for the second, $x = 3\sec{t}$

3. Hello, Erghhh!

I'd use a trig substitution . . .

$\int \frac{x+3}{\sqrt{x^2-9}}\,dx$
Let: . $x \:=\:3\sec\theta \quad\Rightarrow\quad dx \:=\:3\sec\theta\tan\theta\,d\theta$
and: . $\sqrt{x^2-9} \:=\:3\tan\theta$

Substitute: . $\int \frac{3\sec\theta + 3}{3\tan\theta}(3\sec\theta\tan\theta\,d\theta) \;=\;3\int(\sec\theta + 1)(\sec\theta\,d\theta)$

. . $=\;3\int(\sec^2\!\theta + \sec\theta)\,d\theta \;=\;3\bigg[\tan\theta + \ln|\sec\theta + \tan\theta| \bigg] + C$

Back-substitute: . $\sec\theta \:=\:\frac{x}{3} \:=\:\frac{hyp}{adj}$
. . Then: . $opp = \sqrt{x^2-9} \quad\Rightarrow\quad \tan\theta \:=\:\frac{\sqrt{x^2-9}}{3}$

We have: . $3\left[\frac{\sqrt{x^2-9}}{3} + \ln\left|\frac{x}{3} + \frac{\sqrt{x^2-9}}{3}\right|\,\right] + C$

. . . . . . . $= \;\sqrt{x^2-9} + 3\ln\left|\frac{x+\sqrt{x^2-9}}{3}\right| + C$

. . . . . . . $= \;\sqrt{x^2-9} + 3\ln\left|x + \sqrt{x^2-9}\right| + C$ .**

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

** .What happened to the denominator, you ask?
. . . . Watch this!

$\sqrt{x^2-9} \:+\: 3\ln\left|\frac{x + \sqrt{x^2-9}}{3}\right| \:+\: C$

. . $= \;\;\sqrt{x^2-9} \:+\: 3\bigg[\ln\left|x + \sqrt{x^2-9}\right| - \ln 3\bigg] \:+\: C$

. . $= \;\;\sqrt{x^2-9} \:+\: 3\ln\left|x + \sqrt{x^2-9}\right| \:-\: \underbrace{3\ln 3 \:+\: C}_{\text{a constant!}}$

. . $= \;\;\sqrt{x^2-9} \:+\:3\ln\left|x + \sqrt{x^2-9}\right| + C$

Textbooks love to pull this on us . . . You've been warned!


text:
# Hello World in Multiple Languages

## 16 languages, 1363 bytes

 #define ip"MemuL tulaS",,,,,,,,,,"!",@++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>[email protected],kc"Kaixo Mundua!"v#!
#define print(A,B,C)main(){printf("Helo Byd!");}//ss                                                                          ;ooooooooooooooooooo"Moni Dziko Lapansi!"<
#ifdef __cplusplus//p                                                                                ;;];;
#include<cstdio>//ffffffffff?
#define print(A,B,C)int main(){printf("Halo Dunya!");}//ssp
#endif//;  [;;;;;;;;;     "!etejivs vardzoP"]
#ifdef __OBJC__//;;;;;
#define print(A,B,C)main(){printf("Hallo Welt!");}//ss
#endif//\
"""echo" "Salom Dunyo!";"exit";puts"Moien Welt!";\
__END__
#define B//\
"""#;;;;;
print(["Hai dunia!","Hej Verden!","Halo Dunia!"][(int(1>0)is 1)+~int(-1/2)*2])
#define s eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeejeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeejiiiiiiiijeeeeeeeeeeeeeejiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeejeejijiiiiiiiiiijeeeeeeeeeeejiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiij
#define U   !"!dlereW ollaH"<           ;
#define [email protected],kc"Sannu Duniya!?%?"

Try it online!

(use "switch languages" to change language)

• Python 3 = Halo Dunia! (Indonesian)

• Python 2 = Hej Verden! (Danish)

• Python 1 = Hai dunia! (Malay)

• C (gcc) = Helo Byd! (Welsh)

• C++ (gcc) = Halo Dunya! (Sundanese)

• Objective C (clang) = Hallo Welt! (German)

• Brainfuck = Hello World! (English, obviously)

• Befunge-93 = Salut Lume! (Romanian)

• Ruby = Moien Welt! (Luxemburgish)

• Bash = Salom Dunyo! (Uzbek)

• Befunge-98 (PyFunge) = Kaixo Mundua! (Basque)

• Unefunge-98 (PyFunge) = Sannu Duniya! (Hausa)

• Cardinal = Hallo Wereld! (Dutch)

• Alphuck = Ciao mondo! (Italian)

• ><> = Moni Dziko Lapansi! (Chichewa)

• Fission = Pozdrav svijete! (Croatian)

Any golfing tips are welcome (especially on the Brainfuck)!!

Thanks to @JonathanFrech for -1 byte! Also, thanks to @ovs for -40 bytes!

### How (general ideas, I actually forgot specifics)??

The languages can be put into four groups:

• Macro: C, C++, Objective C
• Comment: Python3, Python2, Python1, Ruby, Bash
• Dimensional: Befunge-93, Befunge-98, Unefunge-98, Cardinal, ><>, Fission
• Vulgar: Brainfuck, Alphuck

The Macro languages see # as the start of a preprocessor directive. These are used for three reasons: to house code for other groups, to distinguish among Macro languages, and to actually define a macro. All three use // as comment, so after that we store code for the other groups. Also, the backslash continues the comment in these languages.

The Comment languages see # as the start of a comment. The quirk here is the triple quotes, which distinguish the Pythons from Ruby from Bash. And to distinguish Python 1 from 2 from 3, we use a distinguishing feature in all three, along with an array of outputs. Oh yeah, there's also that __END__. This is used to end the code for some (can't remember exactly which ones) of the Comment languages.

The Dimensional languages are distinguished in a way that is hard to explain. One has to know the specifics of each language to figure it out. For example, # is only a skip in the fungeoids, while it does various different things in the other languages. The code is strewn about everywhere for these languages.

And finally, we arrive at the Vulgar languages. These two ignore everything that isn't in their set of valid characters. A balancing act has to be played with these languages and the others, as the code already contains characters in the character sets.

## 15 languages, 532 bytes

# ;"!audnuM oxiaK">:#,[email protected]"Hej Verden!";;@,kb"Tere maailm!";# w"!amliaam ieH"ck,@oooooooooo"Hai dunia!"
true #{puts'Hola món!'} \
__END__
"Hola Mundo!" puts
case ps -p$$-oargs= in \ b*)echo Hallo Welt!;;k*)echo Ndewo Ụwa!;;d*)echo Ciao mondo!;;z*)echo Moien Welt!;;a*)echo Hei Verden!;;esac true; #xx #x%"Olá Mundo!"x #xx+++[++[<+++>->+++<]>+++++++]<<<--.<.<--..<<---.<+++.<+.>>.>+.>.>-.<<<<+.  Try it online! 1. Kaixo Mundua! in Befunge-93 2. Hej Verden! in Fission 3. Tere maailm! in Unefunge-98 4. Hei maailma!! in Befunge-98 5. Hai dunia! in ><> 6. Hola món! in Ruby 7. Hola Mundo! in GolfScript 8. Hallo Welt! in bash 9. Ndewo Ụwa! in ksh 10. Ciao mondo! in dash 11. Moien Welt! in zsh 12. Hei Verden! in ash 13. Olá Mundo! in Cardinal 14. Hello World! in brainfuck, courtesy of primo. 15. Helo Byd! in Whitespace ## Explanation Line 1 distinguishes between five 2D esolangs: 1. ><> reads # as a mirror, wraps around to the left, prints "Hai dunia!" and crashes (@). All the Funges read it as a trampoline and go right. 2. Befunge-93 ignores ;, prints Kaixo Mundua! and exits (@). 3. The ’98 Funges jump from the first ; to the second, then from the third ; to the fourth. w is a NOP for Befunge-98, printing Hei maailma!. 4. But w reflects the instruction pointer in Unefunge-98, printing Tere maailm!. 5. Fission doesn’t start in the top-left corner at all. R"Hej Verden!"; is executed. (Another instruction pointer starts from the D in __END__, but it does nothing then dies to the ; in true;.) Ruby sees true #{puts'Hola món!'}, then __END__. GolfScript sees , then true (NOP), then a comment; then __END__ (NOP); then "Hola Mundo!" puts (this is executed); then case (NOP), then  (crashes on empty stack). The shells see a comment, then an invocation to true (NOP), then invocations to unknown commands __END__ and "Hola Mundo!" (which error to STDERR but execution continues), then the case statement which distinguishes based on the first letter of the name of the current process. Cardinal is another 2D esolang which starts at the %, sending 4 IPs up, down, left, and right. They're all killed by the surrounding x commands, but one prints "Olá Mundo!" before dying. The brainfuck code is primo’s, prefixed with ++ to counteract the dashes in ps -p$$ -oargs=.

The whitespace in my code is executed as the Whitespace program

 push 0
push 0
label_0:
push 0
push 0
drop
drop
push 72; printc
push 101; printc
push 108; printc
push 111; printc
push 32; printc
push 66; printc
push 121; printc
push 100; printc
push 33; printc

which prints Helo Byd!

EDIT: I forgot that adding UDLR characters breaks the Fission program, so I’ve changed the strings up to avoid these.

### 23 Befunges, 713 bytes

The only language I really know is Befunge, so instead of multiple languages, I've just gone with multiple implementations of Befunge. I believe this is still valid under PPCG rules, which consider the language to be defined by its implementation.

8023/# !-1401p680p88+79*6+1p238*7+0pg90p$#v0';1';+>9%80p"ph~s"+3vv vv_2#!>#-/\#21#:+#:>#\<0/-2*30:-/2g01g00p>#< 2#0 ^#1/4*:*9"9"p00***<< >>$:2%3*-4/3g68*-70p1-002-3/-03-2%1+2/-70g+80g65+70g7++3g68*-70g9*v
0168:0>0133?45130120340200v00:<+8*+76%4p00+5/4:+-*86g3++98/2%+98g09+<<
@>gg#^:#+,#\$"!"-#[email protected]
!Helo Byd!!!!!Hai dunia!!!!Ciao mondo!!!Hallo Wereld!!!!
!Hallo Welt!!!Halo Dunia!!!Halo Dunya!!!Bonjour monde!!!
!Hei Verden!!!Hej Verden!!!Moien Welt!!!Labas pasauli!!!
!Molo Lizwe!!!Salut Lume!!!Hei maailma!!Sveika pasaule!!
!Hello World!!Salom Dunyo!!Tere maailm!!Sawubona Mhlaba!
!Kaixo Mundua!Salamu Dunia!Sannu Duniya!!!!!!!!!!!!!!!!!

The frustrating thing about Befunge, is that although there is an open source reference implementation, and the language itself is dead simple, there isn't a single third-party interpreter (that I'm aware of) that exactly matches the reference behaviour. Every implementation fails in a different way.

On the plus side, this gives us the opportunity to develop a single piece of code that will produce a different result in almost every interpreter. And that's what I'm attempting in the program above.

If anyone is interested in verifying the results, I've tried to group the various implementations into categories based on how easy they are to get up and running (e.g. some people may not be able to run Windows binaries, or may not be willing to build from source, but everyone should be able to test the online interpreters).

### Online Interpreters

No installation required. It's usually just a matter of pasting in the code and clicking a button or two. But note that some of these are quite slow, so may need some time to finish executing.

Alexios' Befunge Playground - Salamu Dunia!

Click the Clear... button and paste the code into the input field. Toggle the Edit switch to activate the interpreter, and then click the Run button to begin executing.
Note that this site probably won't work in Browser's other than Chrome.

Befungius - Molo Lizwe!

Paste the code into the input field, making sure to overwrite the existing code. Then click the Run button to execute.

David Klick's Befunge 93 Interpreter - Sannu Duniya!

Paste the code into the Playfield input field, and then click the Run button to begin executing.

Ian Osgood's Befunge-93 Interpreter - Salut Lume!

Paste the code into the input field under the Show button, making sure to overwrite the @ that is already there. Click the Show button to import the code, then click the Run button to begin executing.

jsFunge IDE - Hej Verden!

First close the Help dialog, then click the Open/Import toolbar button (second from left), paste in the code, and click OK. To execute, click the Run Mode button (fourth from left), and then Start (fifth from left).

Also note that a few of the console-based interpreters are actually available on TIO, so while they aren't technically online interpreters, they can be tested online. For those that are supported (currently BEF, FBBI, MTFI and PyFunge), I've included a Try It Online! link next to their entry.

### Java IDEs

You'll need to have the Java run-time installed for these, but they should theoretically work on any platform. Only tested on Windows though.

Ashley Mills' Visual Befunge Applet - Moien Welt!

This was initially an online applet which is unfortunately no longer available, but you can still download the jar and run it locally as a desktop application. You'll need to paste the code into the Program Editor window, then click the Convert button, followed by the Run button.

WASABI: Wasabi's A Superbly Asinine Befunge Interpreter - Hallo Welt!

To paste in the code, right click in the top left corner of the editor window (it must be the very top left) and select the Paste menu item. Then enable the Full Speed check box (otherwise it'll take forever), and click the Run! button to begin executing.

YABI93: Yet Another Befunge93 Interpreter - Halo Dunia!

Press Ctrl+A, Ctrl+V to paste the code into the editor window, being sure to overwrite the default source. Then click the Start button to begin executing.

### Windows IDEs

You'll typically need Windows for these, although in some cases there may be binaries available for other operating systems. I can't promise the code will work on other platforms though.

BefunExec - Hello World!

You can't paste the code into the editor, so you'll first need to save it to disk somewhere. Then from the IDE, use the File > Open menu to load the code from disk, and select the Simulation > Run/Pause menu to run it.

BeQunge - Labas pasauli!

Press Ctrl+V to paste in the code, and then click the Debug toolbar button (the blue cog) to begin executing. Once the Debugger panel appears, you'll want to set the Speed to maximum - the button to the right of the slider - otherwise it'll take forever to finish.

Fungus - Tere maailm!

Press Ctrl+V to paste in the code, and then press F5 to run it.

Visbef: Visual Befunge '93 for Windows - Hallo Wereld!

You can't paste the code into the editor, so you'll first need to save it to disk somewhere. Then from the IDE, press Ctrl+O to open the file browser and load the code from disk, and press F5 to run it.

### Windows Console Apps

Again these typically require Windows, although other platforms may be available, but not guaranteed to work.

In all cases the code will need to be saved to a file on disk and the filename passed to the interpreter as a command line parameter (source.bf in the example command lines given below). Also note that some of these are technically Befunge-98 interpreters, and must be run with a particular command-line option to force a Befunge-93 compatibility mode. If you don't do that, you won't get the correct results.

BEFI: Rugxulo's Befunge-93 Interpreter - Hei Verden!

Command line: bef93w32 -q source.bf

CCBI: Conforming Concurrent Befunge-98 Interpreter - Sveika pasaule!

Comand line: ccbi --befunge93 source.bf

MTFI: Magus Technica Funge Interpreter - Hai dunia!

Command line: mtfi -3 source.bf (Try it online!)

### Python and PHP Console Apps

These require the appropriate scripting language installed - either Python or PHP.

Befungee - Helo Byd!

Command line: befungee.py source.bf

PyFunge - Halo Dunya!

Command line: pyfunge -v 93 source.bf (Try it online!)

Bephunge - Bonjour monde!

Command line: php bephunge.phps source.bf

### Source-only Console Apps

These will need to be built from source, and that's usually easiest with a *nix-like environment. On Windows I use the Windows Subsystem for Linux.

BEF: Befunge-93 Reference Distribution - Ciao mondo!

Command line: bef -q source.bf (Try it online!)

cfunge - Sawubona Mhlaba!

Command line: cfunge -s 93 source.bf

FBBI: Flaming Bovine Befunge-98 Intepreter - Hei maailma!

Command line: fbbi -93 source.bf (Try it online!)

Fungi - Kaixo Mundua!

Command line: fungi source.bf

Rc/Funge-98 - Salom Dunyo!

Command line: rcfunge -93 source.bf

### How it works

The challenge with this was finding the fewest number of tests that provided the most differentiation between interpreters. In the end it came down to four main test sequences:

1. The first is an out-of-bounds memory read from offset -1,1. In theory this should always return 32 (ASCII space), but there were actually 10 variations in practice. This test is complicated by the fact that two of the interpreters crash on an out-of-bounds read, so a couple of special-case tests (division rounding and space bridging) were required to force those two back into bounds.

2. The second sequence is a test of Befunge-98 functionality - specifically the instructions ; and '. Almost all of the interpreters are Befunge-93, or are run in Befunge-93 compatibility mode, so they should just ignore those instructions. In practice there were 6 different ways in which this sequence was interpreted.

3. The third test checks the range of memory cells. In the reference interpreter, memory cells are signed 8-bit, but other implementations vary in range from 8-bit to unbounded, some signed and some unsigned. However, for the purposes of this test, we only had to distinguish between 5 of those variants.

4. The fourth and final sequence is a combination of underflow and negative division tests. There are a number of ways in which interpreters get underflow wrong, and there are at least 3 different ways in which the division and modulo instructions are implemented, but there were only 3 combinations we cared about here.

Each of these sequences returned a single number, and those four numbers were combined (via some basic arithmetic and translation tables) to produce a final value in the range 0 to 22. That value could then be used as an index to lookup the actual message to display.


text:
NEW
New Website Launch
Experience the best way to solve previous year questions with mock tests (very detailed analysis), bookmark your favourite questions, practice etc...

## Solid State & Surface Chemistry

### Chemistry

#### Previous Years Questions

More
Atom $\mathrm{X}$ occupies the fcc lattice sites as well as alternate tetrahedral voids of the same lattice. The packing...
JEE Advanced 2022 Paper 2 Online
For the given close packed structure of a salt made of cation X and anion Y shown below (ions of only one face are shown...
JEE Advanced 2021 Paper 1 Online
The arrangement of X$$-$$ ions around A+ ion in solid AX is given in the figure (not drawn to scale). If the radius of X...
JEE Advanced 2013 Paper 1 Offline
Methylene blue, from its aqueous solution, is adsorbed on activated charcoal at 25oC. For this process, the correct stat...
JEE Advanced 2013 Paper 1 Offline
A compound MpXq has cubic close packing (ccp) arrangement of X. Its unit cell structure is shown below. The empirical fo...
IIT-JEE 2012 Paper 1 Offline

## MCQ (More than One Correct Answer)

More
The correct option(s) related to adsorption processes is(are)
JEE Advanced 2022 Paper 1 Online
The correct statement(s) related to colloids is (are)
JEE Advanced 2021 Paper 1 Online
The cubic unit cell structure of a compound containing cation M and anion X is shown below. When compared to the anion, ...
JEE Advanced 2020 Paper 1 Offline
The correct statement(s) about surface properties is (are)
JEE Advanced 2017 Paper 2 Offline
The CORRECT statement(s) for cubic close packed (ccp) three dimensional structure is (are) :
JEE Advanced 2016 Paper 2 Offline
If the unit cell of a mineral has cubic close packed (ccp) array of oxygen atoms with m fraction of octahedral holes occ...
JEE Advanced 2015 Paper 1 Offline
The given graphs/data I, II, III and IV represent general trends observed for different physisorption and chemisorption ...
IIT-JEE 2012 Paper 2 Offline
Choose the correct reason for the stability of the Iyophobic colloidal particles
IIT-JEE 2012 Paper 1 Offline
The correct statement(s) pertaining to the adsorption of a gas on a solid surface is (are)
IIT-JEE 2011 Paper 1 Offline

## Numerical

More
Consider an ionic solid $$MX$$ with $$NaCl$$ structure. Construct a new structure $$(Z)$$ whose unit cell is constructed...
JEE Advanced 2018 Paper 1 Offline
A crystalline solid of a pure substance has a face-centered cubic structure with a cell edge of $$400$$ $$pm.$$ If the d...
JEE Advanced 2017 Paper 1 Offline
The number of hexagonal face that present in a truncated octahedron is
IIT-JEE 2011 Paper 2 Offline

## Subjective

More
A compound AB has rock salt type structure. The formula weight of AB is 6.023 Y amu, and the closest A - B distance is Y...
IIT-JEE 2004
1 gm of charcoal adsorbs 100 ml 0.5 M CH3COOH to form a monolayer, and thereby the molarity of CH3COOH reduces to 0.49. ...
IIT-JEE 2003

### Joint Entrance Examination

JEE Main JEE Advanced WB JEE

### Graduate Aptitude Test in Engineering

GATE CSE GATE ECE GATE EE GATE ME GATE CE GATE PI GATE IN

NEET

Class 12


text:
Numerical experiments, Tips, Tricks and Gotchas

## Parametrized MonteCarlo method

### 1. Introduction

The Monte Carlo method [ 1 ], in its original formulation, converges very slowly, but the convergence rate is almost independent of the dimension of the problem. The latter makes Monte Carlo a valuable tool for modeling complex systems. The drawback is that due to the stochastic nature of the method, the dependence on parameters is not smooth.

### 2. Integration example

In particular, the Monte Carlo method is applied for numerical calculation of definite integrals [ 2 ]. In a one dimensional case it reduces to the following formula $$I(p)=\intop_{a}^{b}f(x;\, p)dx\approx I_{MC}(p)=\frac{b-a}{N}\sum_{i=1}^{N}f(x_{i};\, p)\label{eq:MC}$$ Here $x_{i}$ are the random numbers and $p$ is a parameter. As an example let's consider $$I(p)=\intop_{0}^{\pi}cos(px)\, sin(x)\, dx=\frac{1+cos(\pi p)}{1-p^{2}}\label{eq:exact}$$ The integral (\ref{eq:MC}) with $N=500$ uniformly distributed random numbers and the exact dependence (\ref{eq:exact}) are presented in Fig 1.

Fig. 1. Monte Carlo integration.

### 3. Smoothing trick

The errors are relatively small and alternate around the exact function. The noise can be effectively eliminated using conventional smoothing techniques [ 3 ]. However, there is an old trick used to make a Parametrized Monte-Carlo method smooth. In the above experiment for each new value of the parameter $p$ a new series of random numbers was generated. If the same random series was used for each $p$ then the resulting dependence is smooth (see Fig 2)

Fig. 2. Monte Carlo integration with seed reset.

This can be done by resetting the pseudo random number generation to the same seed. Note that now the error is systematic: it is biased to negative values for smaller $p$ and to positive values for larger $p$.


text:
# matrix is found singular over CC, nonsingular over CDF

I am trying to take the inverse of complex valued matrix where every entry is either +/-1,+/-i,or 0. The matrices are quite large and I am getting substantial rounding errors when I construct the matrix using "matrix(CDF,array)" and then take the inverse, but I still get an output.

When I construct the matrix using the same array but using "matrix(CC,array)" and then take the inverse I get this error: ZeroDivisionError: input matrix must be nonsingular

I am confused because the array when I use "matrix(CC,array)" is exactly the same as the array when I use CDF, however "matrix(CDF,array)" is nonsingular and the function inverse works. Why is this happening and is there another way I can avoid large rounding errors when taking the inverse?

I hope this is enough detail. I'm not really sure how to provide an example of this error occurring since the smallest example of the array I am working with is still quite large (52x52) and I haven't been able to get this error to occur with smaller simpler arrays.

edit retag close merge delete

Sort by » oldest newest most voted

### Dealing with rounding errors

Why is this happening and is there another way I can avoid large rounding errors when taking the inverse?

This is happening because CC and CDF use floating-point numbers, and computations are thus inexact and subject to rounding errors.

Instead of working with CC or CDF, one could

• use matrices over GaussianIntegers() or ZZ[i] or QQ[i] or QQbar for exact computations

• use matrices over CBF ("complex ball field") for floating-point computations with rigorous error bounds

### Providing a large example

I'm not really sure how to provide an example of this error occurring since the smallest example of the array I am working with is (52x52).

Communicating a 52 x 52 matrix with entries in {0, 1, -1, i, -i} is doable.

You can encode the matrix and provide decoding instructions rather than the matrix itself.

One possible encoding, since the entries can only take 5 values, take them as 5-ary digits; then each row can be thought of as the 5-ary expansion of a number. If we agree on the digits and communicate the numbers, we're good.

Here is a random matrix a with entries in {0, 1, -1, i, -i}:

sage: G = GaussianIntegers()
sage: U = [0, 1, -1, i, -i]

sage: a = matrix(G, 52, lambda i, j: U[randint(0, 4)])

Encoded matrix:

sage: b = [Integer(tuple(U.index(e) for e in row), 5) for row in a]

sage: print(b)
[1986835196674783292709127771671427698, 372532889760445898415871372893604877,
29903254311383361818758881193795318, 1358695302115484662298806740046547384,
1537321601024823802437657316988965568, 807200500103255107975400681439180354,
567350510853383980331713019521919561, 1502850803304703506587108729499355006,
846884730762028905888265726139310683, 137381915837271267181515478275643286,
522105367460276163750943030646864364, 1062521690576328608603843582516522599,
899547582492594668160772320652245190, 767732247768012897653127687752209191,
629354811960707798077793065391805161, 922202162939977177914455168534168765,
1729869497057901779087386639626774141, 1868018985439944039499425518652161649,
1296299082686624643142119402841062894, 1064799841987832209268578137251968874,
2155066789175869415783929309121456698, 267366791364966820259349410583047599,
1632002494019334195780113340724191796, 2192661273536615612340019587291366905,
1762917404578120599684457836032844498, 228986171419406644876547615831863389,
2101920423365829833128536344495944345, 660985714605962040665526677335410210,
873334831095240711598788236281716427, 1744121894438415469560277438117935725,
2210059965689974187926035573546483126, 1594508474721458635473949546648185838,
518211385383214049244941993118895991, 231206763245123017363282654207827645,
1748059359372987512622900717899928645, 259988738192311572545249238464600548,
2007721547194093983826996655201647232, 1240843285105582949996674635390136465,
1736982326629685244276013105887136315, 435682393610221223713098672542297123,
66566788503415822985489945441756435, 1141561970732274264554486688206105649,
2044822779971527183978088623745613537, 17299608296692077102235770236630252,
780853597789891512314851615527578148, 427428566224687826328803693567479441,
1922351158930802787176924223394683886, 2104373328835002410314401979576425296,
1317300586469460326137557530572476230, 1736284365530465805899187629996562866,
2132757211837100962505268985637520292, 147031314086172436786678135727403627]

To decode:

sage: aa = matrix(G, 52, [[U[d] for d in r.digits(5, padto=52)] for r in b])
sage: aa == a
True

Here is a function that takes a matrix as an argument, and returns "short enough code" to recreate that matrix.

def matrix_code(a):
r"""
Return code for a matrix with entries in {0, 1, -1, i, -i}.

EXAMPLE::

sage: G = GaussianIntegers()
sage: U = [0, 1, -1, i, -i]
sage: a = matrix(G, 52, lambda i, j: U[randint(0, 4)])
sage: matrix_code(a)
...
"""
G = GaussianIntegers()
U = [0, 1, -1, i, -i]
m = a.nrows()
n = a.ncols()
b = [Integer(tuple(U.index(e) for e in row), 5) for row in a]
print(f"""
G = GaussianIntegers()
U = [0, 1, -1, i, -i]
b = {b}
a = matrix(G, {m}, {n}, [[U[d] for d in r.digits(5, padto={n})] for r in b])
""")

Run it on your matrix. Edit your question, pasting the output. Then we can all play with the same matrix.

more


text:
# From Bayesian Networks to Neural Networks: how multivariate regression can be transposed to a multi-output network

I'm dealing with a Bayesian Hierarchical Linear Model, here the network describing it.

$Y$ represents daily sales of a product in a supermarket(observed).

$X$ is a known matrix of regressors, including prices, promotions, day of the week, weather, holidays.

$S$ is the unknown latent inventory level of each product, which causes the most problems and which I consider a vector of binary variables, one for each product with $1$ indicating stockout and so the unavailability of the product. Even if in theory unknown I estimated it through a HMM for each product, so it is to be considered as known as X. I just decided to unshade it for proper formalism.

$\eta$ is a mixed effect parameter for any single product where the mixed effects considered are the product price, promotions and stockout.

$\beta$ is the vector of fixed regression coefficients, while $b_1$ and $b_2$ are the vectors of mixed effects coefficient. One group indicates brand and the other indicates flavour (this is an example, in reality I have many groups, but I here report just 2 for clarity).

$\Sigma_{\eta}$ , $\Sigma_{b_1}$ and $\Sigma_{b_2}$ are hyperparameters over the mixed effects.

Since i have count data let's say that I treat each product sales as Poisson distributed conditional on the Regressors (even if for some products the Linear approximation holds and for others a zero inflated model is better). In such a case I would have for a product $Y$ (this is just for who's interested in the bayesian model itself, skip to the question if you find it uninteresting or non trivial :)):

$\Sigma_{\eta} \sim IW(\alpha_0,\gamma_0)$

$\Sigma_{b_1} \sim IW(\alpha_1,\gamma_1)$

$\Sigma_{b_2} \sim IW(\alpha_2,\gamma_2)$, $\alpha_0,\gamma_0,\alpha_1,\gamma_1,\alpha_2,\gamma_2$ known.

$\eta \sim N(\mathbf{0},\Sigma_{\eta})$

$b_1 \sim N(\mathbf{0},\Sigma_{b_1})$

$b_2 \sim N(\mathbf{0},\Sigma_{b_2})$

$\beta \sim N(\mathbf{0},\Sigma_{\beta})$, $\Sigma_{\beta}$ known.

$\lambda _{tijk} = \beta*X_{ti} + \eta_i*X_{pps_{ti}} + b_{1_j} * Z_{tj} + b_{2_k} Z_{tk}$,

$Y_{tijk} \sim Poi(exp(\lambda_{tijk}))$

$i \in {1,\dots,N}$, $j \in {1,\dots,m_1}$, $k \in {1,\dots,m_2}$

$Z_i$ matrix of mixed effects for the 2 groups, $X_{pps_i}$ indicating price, promotion and stockout of product considered. $IW$ indicates inverse Wishart distributions, usually used for covariance matrices of normal multivariate priors. But it's not important here. An example of a possible $Z_i$ could be the matrix of all the prices, or we could even say $Z_i=X_i$. As regards the priors for the mixed-effects variance-covariance matrix, I would just try to preserve the correlation between the entries, so that $\sigma_{ij}$ would be positive if $i$ and $j$ are products of the same brand or either of the same flavour.

The intuition behind this model would be that the sales of a given product depend on its price, its availability or not, but also on the prices of all the other products and the stockouts of all the other products. Since I don't want to have the same model (read: same regression curve) for all the coefficients, I introduced mixed effects which exploit some groups I have in my data, through parameter sharing.

My questions are:

1. Is there a way to transpose this model to a neural network architecture? I know that there are many questions looking for the relationships between bayesian network, markov random fields, bayesian hierarchical models and neural networks, but I didn't find anything going from the bayesian hierarchical model to neural nets. I ask the question about neural networks since, having a high dimensionality of my problem (consider that I have 340 products), parameter estimation through MCMC takes weeks (I tried just for 20 products running parallel chains in runJags and it took days of time). But I don't want to go random and just give data to a neural network as a black box. I would like to exploit the dependence/independence structure of my network.

Here I just sketched a neural network. As you see, regressors($P_i$ and $S_i$ indicate respectively price and stockout of product $i$) at the top are inputed to the hidden layer as are those product specific (Here I considered prices and stockouts). (Blue and black edges have no particular meaning, it was just to make the figure more clear) . Furthermore $Y_1$ and $Y_2$ could be highly correlated while $Y_3$ could be a totally different product (think about 2 orange juices and red wine), but I don't use this information in neural networks. I wonder if the grouping information is used just in weight inizialization or if one could customize the network to the problem.

Edit, my idea:

My idea would be something like this: as before, $Y_1$ and $Y_2$ are correlated products, while $Y_3$ is a totally different one. Knowing this a priori I do 2 things:

1. I preallocate some neurons in the hidden layer to any group I have, in this case I have 2 groups {($Y_1,Y_2$),($Y_3$)}.
2. I initialize high weights between the inputs and the allocated nodes (the bold edges) and of course I build other hidden nodes to capture the remaining 'randomness' in the data.

• @Tomasso Guerrini here is possible the answer for you: stats.stackexchange.com/questions/4498/… Feb 11 '17 at 7:22
• thanks @AntonDanilov , unfortunately the accepted answer says 'While neural networks come with "graphs" they generally don't encode dependence information, and the nodes don't represent random variables' :/ Feb 11 '17 at 7:51
• Have you tried Stan, or it's not feasible for your problem? Hamiltonian Monte Carlo can be orders of magnitude faster than Gibbs sampling, and scales well to hundreds (or even thousands) of variables. Mar 28 '17 at 0:09
• Have you tried posing the same question(s) to the Stan users mailing list? They are usually extremely helpful with technical aspects to make a model work. For example, it's possible that issues in your case can be solved with a better parameterization. (Hamiltonian Monte Carlo should mix much faster than Gibbs sampling.) Mar 28 '17 at 0:43
• Probably it's better to say I spammed that mailing list .. Thank you very much Luigi by the way.. I'm in that situation where I have no more time to dig into the problems as I should, since I have an incoming deadline.. It seems like STAN is a great tool, but the learning curve is a little steep to really realize its incredible performance (as of now I realized its speed up wrt JAGS) Mar 28 '17 at 0:50

For the record, I don't view this as an answer, but just a long comment ! The PDE (heat equation) that is used to model the flow of heat through a metal rod can also be used to model option pricing. No one that I know of has ever tried to suggest a connection between option pricing and heat flow per se. I think that the quote from Danilov's link is saying the same thing. Both Bayesian Graphs and Neural Nets use the language of graphs to express the relations between their different internal pieces. However, Bayesian graphs tells one about the correlation structure of the input variables and the graph of a neural net tells one how to build the prediction function from the input variables. These are very different things.
Various methods used in DL attempt to 'chose' the most important variables, but that is an empirical issue. It also doesn't tell one about the correlation structure of either the entire set of variables or the remaining variables. It merely suggests that the surviving variables will be best for prediciton. For example if one looks at neural nets, one will be led to the German credit data set, which has, if I recall correctly, 2000 data points and 5 dependent variables. Through trial and error I think you will find that a net with only 1 hidden layer and using only 2 of the variables gives the best results for prediction. However, this can only be discovered by building all the models and testing them on the independent testing set.

• I don't get your comparison with the application of the same model on different data: here the data is the same and the model are different not the other way around. Furthermore I am not trying to make inference on the correlation structure of my variables using a neural net, that is already well achieved through the bayesian posteriors inference. The graph was just to picture what happens in the hierarchical model, so I don't understand the 'language of graphs' thing (Yet I may have misled you with the title, but I needed a catchy one :D ) Feb 12 '17 at 17:03
• And perhaps I don't understand your question. I still think the point is that the way the edges are created in the two graph structures have nothing to do with each other. One could just define a neural net with a given set of edges and weights, but one has no reason to think that such a net will be either accurate or useful. The heart of creating a neural net is to use something akin to back-propagation to let the data determine the 'correct' weights.
– meh
Feb 14 '17 at 3:20
• "The graph was just to picture what happens in the hierarchical model". We agree that in one case we define the covariance structure and the model is very well interpretable a posteriori, while in the other we let gradient descent do the work and even if not interpretable it usually (as in my case) results in good performances. My question is: is there a way to mantain interpretability while not losing predicting performance? That's why I asked this on stack and that's why I propose that idea in the edit, I'm looking for ideas . I hope now it's clear to you. Feb 14 '17 at 13:27
• One can't prove a negative, so I can't conclusively say there is no connection between the graphs of Bayesian Networks and those of neural nets. I can say that I have no knowledge of such a connection and that I am deeply skeptical of any connection. While one can use the graph structure of the Bayesian network to give the graph structure for the neural network, from a neural network point of view this doesn't seem reasonable. I don't currently have the time to work out the details, but as a thought experiment imagine a data set where the independent variables were all statisitically
– meh
Feb 15 '17 at 14:05
• I don't currently have the time to work out the details, but as a thought experiment imagine a data set where the independent variables were all statisitically significant, but were not all correlated. For example $y = \sum x_i + \sum z_i$ where $z_i = A \times \sigma^{-1}(x_i)$ with A very large in absolute value and $\sigma$ the (non-linear) activation function of the network. Because of the non-linear relationship of y and the z one could have that the correlation between y and the $z_i$ is approximately zero. Yet they should be a part of any good model.
– meh
Feb 15 '17 at 14:11


text:
An error was encountered while trying to add the item to the cart. Please try again.
The following link can be shared to navigate to this page. You can select the link to copy or click the 'Copy To Clipboard' button below.
Copy To Clipboard
Successfully Copied!
Algebraic Geometry II

David Mumford Brown University, Providence, RI
A publication of Hindustan Book Agency
Available Formats:
Hardcover ISBN: 978-93-80250-80-9
Product Code: HIN/70
List Price: $76.00 AMS Member Price:$60.80
Please note AMS points can not be used for this product
Click above image for expanded view
Algebraic Geometry II
David Mumford Brown University, Providence, RI
A publication of Hindustan Book Agency
Available Formats:
 Hardcover ISBN: 978-93-80250-80-9 Product Code: HIN/70
 List Price: $76.00 AMS Member Price:$60.80
Please note AMS points can not be used for this product
• Book Details

Hindustan Book Agency
Volume: 702015; 516 pp
MSC: Primary 14;

Anyone interested in algebraic geometry.

• Reviews

• The book is well written (as one would expect from Mumford) and insightful..."Algebraic Geometry II" is not an easy book, but working through it will provide a good base from which to proceed into research in algebraic geometry.

Fernando Q. Gouvêa, MAA Reviews
• Request Review Copy
Volume: 702015; 516 pp
MSC: Primary 14;


text:
Question

# How to prove that a normally distributed assumption was fulfilled for the Two-Proportional z-test? Select all relevant assumptions. Residual graphs do

Scatterplots
How to prove that a normally distributed assumption was fulfilled for the Two-Proportional z-test?
Select all relevant assumptions.
Residual graphs do not have a pattern
Scattered plots are linear
Scattered plots do not have a pattern
Normal sample distribution: npge5&n(1-p)ge5
Bell-shaped histograms
Histograms are uniform
Residual graphs are linear
Residual graphs are linear box plots have less than two outliers
Normal quantile plots do not have a pattern
Normal sample distribution: n,p,ge5,n,(1-p)ge5,n_2p_2ge5&91-p_2)ge5
Normal sample distribution: n'sge30 or populations usually are distributed

2021-02-25
Two proportion z-test assumption is below:
Therefore the appropriate assumptions is:
Scatter plot are linear
Histograms are bell shaped
Normal quantile plots are linear
Residual plots are linear
Normal sampling distribution: all n≥30 or population are normally distributed.


text:
## Homework Statement

Question 1)
18. Convert the following measurements to radians.

c) the motion of an hour hand in 4.4 h = 2.3 Rad
d) Earth’s rotation in 28.5 h = 7.5 Rad

<<<<<<figured it out, thanks SammyS for that obivious yet overlooked detail lol :D >>>>>>>>

Question 2)
A flywheel rotating at 18.0 rad/s slows to a
stop in 22.0 s. Find

a) its angular acceleration. = -18.18rad/sec^2
b) the number of radians it turns before
c) the number of cycles it completes in
this time. 31.5 Cycles
d) the angular speed after 8.7 s. 11rads/sec

though i have a feeling this isn't the end of my issues lol, if anyone knows of an awsome site/article anything on rotational work please let me know, because I've been searching lol

Thanks sammyS

-stevo

Last edited:

SammyS
Staff Emeritus
Homework Helper
Gold Member
How many radians does the hour hand pass through in 12 hours?

(Problem written BDC - Before Digital Clocks!) LOL

SammyS
Staff Emeritus
Homework Helper
Gold Member

## Homework Statement

Question 2)
A flywheel rotating at 18.0 rad/s slows to a
stop in 22.0 s. Find

a) its angular acceleration. = -18.18rad/sec^2
b) the number of radians it turns before
stopping.
c) the number of cycles it completes in
this time.
d) the angular speed after 8.7 s.

## The Attempt at a Solution

A)found the angular acceleration,(-.818 rad/sec/sec) but I can't figure out the rest of it...

B) I tried 18*22 to get the Rads before stopping, but that didn't work...
22 rad/s is the initial ang. vel. (It's not rotating at that rate the whole time.) The final ang. vel. is zero. Assuming a constant angular acceleration, what is the Average angular velocity? Use that. Then for (C), I would simply convert radians to cycles: 1 Cycle = 2π radians.
C) I tried dividing 18/6.28 to get the Cycles/second then multiplying by 22 seconds.. but that's not right either

D) well I don't know where to start...

I tried a lot of different things to solve these questions, most of my efforts are scribbled on papers littered around my room lol. I'm just so extremely frustrated and need some help/guidance, I don't want to be spoon fed though (I don't learn that way), just a nice push would help, or show me an example done? those are always best for me to learn, but I can't find any "like" examples of close problems.

This is our final Unit in Classical physics and my teacher's a..well lets not go there, he can't teach at all, so we're left to our own devices... I am so hopelessly lost its painful. I know what a radian is (from calculus) and I know that 2pi is one cycle, but I've never had so much issue with anything in physics before... :grumpy::grumpy:
(My students have claimed to have the same problem.)

Kinematic equations are much like kinematic equations for linear motion (constant acceleration):

$$v=v_0+a\,t\quad\leftrightarrow\quad \omega=\omega_0+\alpha t$$

$$x-x_0=v_{avg}\ t=v_0\ t+(1/2)a\,t^2\quad\leftrightarrow\quad \theta-\theta_0=\omega_{avg}\ t=\omega_0 t+(1/2)\alpha t^2$$

$$v_{avg}=\frac{v+v_0}{2}\quad\leftrightarrow\quad\omega_{avg}=\frac{\omega+\omega_0}{2}$$

$$v^2={v_0}^2+\,2\,a(x-x_0)\quad\leftrightarrow\quad\omega^2={\omega_0}^2+\,2\,\alpha(\theta-\theta_0)$$

OH wow I solved it all!!! thank you SOOO much Sammys!! how about you replace my teacher? haha! really though thank you so much for such a speedy and helpful response, much appreciated :D!!


text:
This summer, I made my first contribution to a large open source repository called scikit-learn. I contributed an example demonstrating the new model_selection module with nested cross validation. I was really happy with the end product that I contributed, and was gracious that the community of developers at scikit-learn was open and friendly toward new contributors. Here I walk you through my contribution, when nested cross-validation is necessary and why it generally a good practice, and some things I learned along the way.

## What is Cross Validation?

First to understand Nested cross validation (CV) we should first understand what non-nested CV does for us. In short, CV is essentially a procedure for splitting your data into a training set and testing set for your model that helps avoid overfitting and estimates the error rate of your fitted model. For an excellent short introductory video, Jeff Leek from Johns Hopkins Biostatistics department has one here.

## What is Nested Cross Validation?

Nested Cross Validation (CV) is quite simply a CV loop within each iteration of another CV loop. This is generally used when our learning model has hyperparameters that we do not know the optimal values for. For example, if we wish to fit a support vector classifier with a radial basis function (rbf) kernel, the classifier has two parameters to specify, gamma and C. (A breakdown of how the parameters affect classification). The outer CV loop thus splits the original dataset into a training set and testing set. In the inner CV loop, the training set from the outer loop is further split into another training set and a validation set. In this inner loop, different values are tried for the classifier parameters, and is scored using the validation set. The parameter values that give the best average scores on the validation set is then used on the outer testing set. This is good practice because without splitting the training set further, we would be using the same data to train the model as we do to validate the model, which ends up in overly optimistic generalization scores. Exactly how optimistic is dependent on the dataset, cross-validation strategy, and model. These topics are further explored by Cawley and Talbot in this paper.

## Nested Cross Validation Example

In my example, I use a support vector classifier with rbf kernel on the classic iris dataset. The example uses K-fold validation for both the inner and outer loops, however this can be easily changed depending on your data. In order to simulate many trials, the seed for the random number generator is set to the iteration number, and a score is generated for both non-nested CV and nested CV. The first graph shows a comparison of scores for between the two types of CV, while the second graph shows the difference on each individual trial. As you can see, for this particular dataset and model choice, non-nested CV is only marginally more optimistic. However, this may not be the case for different datasets.

## Summary

I enjoyed my first experience contributing to scikit-learn. If I have the time, and can find a proper sized issue I will definitely try to contribute again. Along the way, I learned lots about how the model_selection module is organized, how to apply general cross-validation concepts, the importance of continuous integration for large public projects, and how to write Sphinx documentation.


text:
# The Real Conjecture

1. Dec 4, 2007

### approx

Now that we've all warmed up a bit...

Let's try this little gem of a conjecture...

Instead of 2^x - 3^y or 3^y - 2^x, which together can be represented as
abs( 2^x - 3^y ) since all we care about are the positive solutions, where
abs( ) is absolute value,

instead of that, let's try the following...

set p(n) to be the nth prime
separate all of the primes from 2 to p(n) (inclusive) into two disjoint sets, A* and B*
Take all of the primes in A*, exponentiate them at will with positive integer exponents, and
multiply the resulting numbers together to get a number called A.
Do the same with B* to get B.

So far, an example might be...
A = 2^6 * 7^9 * 11^3
B = 3^1 * 5^12

where p(n) = 11

Proven result: If q = abs( A +/- B ), where +/- means "plus or minus", AND q < [ p(n+1) ]^2, then q is either prime or the number 1.

in the example, if abs( 2^5 * 7^9 * 11^14 +/- 3^1 * 5^7 ) were less than 169, then it would be 1 or prime.

Unproven conjecture: If q is prime, then q = abs( A +/- B ) as constructed above, where the largest prime factor in AB is also the largest prime less than the square root of q.

So far this works for in fact all primes up to 1369 = 37^2 (I stopped past 1000 because I was doing it by hand, and 31^2 = 961 didn't make it to 1000 so I kept going).

Note that the "plus" in the +/- becomes useless, and unnecessary, after p(n) = 11.

I was on a couple of chat rooms some years ago about this, so you may have seen it before, but some of you seem to have some new approaches, so I'm curious what you think?

Here's an example, where I let all the exponents remain fixed except the exponent on 2.

abs( 45 +/- 2^x ) < 49
this gets alot of the primes under 49. To get more, try other exponents:
abs( 15 +/- 2^x ) < 49
or repartition the primes in A* and B*
abs( 10 +/- 3^x )
abs( 20 +/- 3^x )
abs( 40 +/- 3^x )
abs( 50 +/- 3^x )
abs( 80 +/- 3^x )
abs( 100 +/- 3^x )
abs( 6 +/- 5^x )
abs( 12 +/- 5^x )
abs( 18 +/- 5^x )
abs( 24 +/- 5^x )
abs( 36 +/- 5^x )
etc.
Now try abs( 105 +/- 2^x ) < 121
etc.
you only need a few partitions, though, and fairly low exponents, as far as I've seen, to get all the primes less than the square of the next prime.

Thanks again for all your ideas.

approx

Last edited: Dec 4, 2007
2. Dec 4, 2007

### Xevarion

I think this problem is much harder than the one we did in the other thread, and cannot be approached via the same techniques. I will think about it more later.

3. Dec 4, 2007

### CRGreathouse

I don't understand the conjecture. Is this what you mean, or do you mean something else?

Conjecture 1: If q = A + B is prime, the largest prime factor in AB is also the largest prime less than the square root of q.
Conjecture 2: If q = abs(A - B) is prime, the largest prime factor in AB is also the largest prime less than the square root of q.

where A and B are as in your post.

If so, it can be simplified to
Conjecture: If q = A - B is prime, the largest prime factor in AB is also the largest prime less than the square root of q, where A and B are as in your post.

since small numbers can be checked (so A + B isn't needed) and A can be taken to be the larger without loss of generality.

4. Dec 4, 2007

### Xevarion

I thought the OP meant that every prime less than $$p^2$$ can be made as a difference between elements in sets A and B, where A is the set of products of powers of some of the primes up to p and B is the set of products of powers of the rest of the primes up to p (that weren't used in A).

5. Dec 4, 2007

### approx

yes

EDIT: not exactly, see explanation later. Ignore the rest of this post. you are both correct, although I should say that small numbers are the ONLY ones where the plus is used, so to use your simplification, you should check numbers greater than 121.
IOW:

A-B, where gcd(A,B)=1, where p(1)*p(2)*...*p(n) divides A*B and where p(k) doesn't divide A*B when k>n

OR

[p(1)]^a1 * [p(2)]^a2 *... * [p(n)]^an - [p(1)]^b1 * [p(2)]^b2 *... * [p(n)]^bn
where aj*bj=0 for all j and where aj+bj>0 for all j
this guarantees the exponent on, for example, 3 is zero on one side only

all just different ways to say the same think... take your pick

Last edited: Dec 5, 2007
6. Dec 4, 2007

### CRGreathouse

Conjecture: If
• p# | AB for some prime p
• AB | (p#)^k for some k
• gcd(A, B) = 1, and
• A - B is prime
then p is the largest prime less than the square root of A - B.

Case: p = 2
B = 1, A = 2^k for some k in {2, 3, 5, 7, 13, 17, 19, ...} (http://www.research.att.com/~njas/sequences/A000043 [Broken]).
Conjecture fails for k > 4.

Case: p = 3, B = 1
A = 2^a * 3^b for some a, b > 0.
Conjecture fails for A in {27, 32, 36, 48, 54, 64, 72, ...} (http://www.research.att.com/~njas/sequences/A003586 [Broken])

Case: p = 3, A = 2^a, B = 3^b
Fails for
2^4 - 3^1 = 13
2^5 - 3^0 = 31
2^5 - 3^1 = 29
2^5 - 3^2 = 23
2^6 - 3^1 = 61
2^6 - 3^3 = 37
2^7 - 3^0 = 127
2^7 - 3^3 = 101
2^7 - 3^4 = 47
2^8 - 3^3 = 229
2^8 - 3^5 = 13
2^9 - 3^1 = 509
2^9 - 3^2 = 503
2^9 - 3^4 = 431
2^9 - 3^5 = 269
2^10 - 3^1 = 1021
2^10 - 3^3 = 997
2^11 - 3^2 = 2039
2^11 - 3^6 = 1319
2^12 - 3^1 = 4093
2^12 - 3^5 = 3853
2^13 - 3^0 = 8191
2^13 - 3^4 = 8111
2^13 - 3^5 = 7949
2^14 - 3^1 = 16381
2^14 - 3^5 = 16141
2^14 - 3^7 = 14197
2^15 - 3^4 = 32687
2^16 - 3^5 = 65293
2^16 - 3^9 = 45853
2^17 - 3^0 = 131071
2^17 - 3^2 = 131063
2^17 - 3^5 = 130829
2^17 - 3^6 = 130343
2^19 - 3^0 = 524287
2^19 - 3^3 = 524261
2^19 - 3^11 = 347141
2^20 - 3^1 = 1048573
2^20 - 3^3 = 1048549
2^20 - 3^7 = 1046389
2^20 - 3^9 = 1028893
2^21 - 3^2 = 2097143
2^21 - 3^5 = 2096909
2^21 - 3^10 = 2038103
2^21 - 3^13 = 502829
2^22 - 3^1 = 4194301
2^22 - 3^3 = 4194277
2^22 - 3^13 = 2599981
2^23 - 3^3 = 8388581
2^23 - 3^6 = 8387879
2^23 - 3^11 = 8211461
2^24 - 3^1 = 16777213
2^24 - 3^5 = 16776973
2^24 - 3^11 = 16600069
2^26 - 3^3 = 67108837
2^27 - 3^14 = 129434759
2^29 - 3^1 = 536870909
2^29 - 3^14 = 532087943
2^30 - 3^17 = 944601661
2^31 - 3^0 = 2147483647
2^32 - 3^13 = 4293372973
2^33 - 3^2 = 8589934583
2^33 - 3^16 = 8546887871
2^33 - 3^17 = 8460794429
2^34 - 3^17 = 17050729021
2^34 - 3^19 = 16017607717
2^35 - 3^8 = 34359731807
2^35 - 3^12 = 34359206927
2^35 - 3^19 = 33197476901
2^36 - 3^5 = 68719476493
2^36 - 3^13 = 68717882413
2^37 - 3^9 = 137438933789
2^37 - 3^16 = 137395906751
2^39 - 3^14 = 549751030919
2^40 - 3^9 = 1099511608093
2^40 - 3^17 = 1099382487613
2^41 - 3^13 = 2199021661229
2^41 - 3^20 = 2195536471151
2^42 - 3^13 = 4398044916781
2^42 - 3^23 = 4303903332277
2^42 - 3^25 = 3550757901661
2^45 - 3^4 = 35184372088751
2^45 - 3^8 = 35184372082271
2^45 - 3^17 = 35184242948669
2^45 - 3^26 = 32642506260503
2^46 - 3^11 = 70368744000517
2^46 - 3^15 = 70368729828757
2^46 - 3^19 = 70367581916197
2^46 - 3^21 = 70358283824461
2^47 - 3^7 = 140737488353141
2^47 - 3^11 = 140737488178181
2^47 - 3^26 = 138195622526999
2^48 - 3^5 = 281474976710413
2^48 - 3^25 = 280627688101213
2^49 - 3^4 = 562949953421231
2^49 - 3^12 = 562949952889871
2^49 - 3^16 = 562949910374591
2^49 - 3^22 = 562918572361703
2^49 - 3^25 = 562102664811869
2^50 - 3^3 = 1125899906842597
2^50 - 3^7 = 1125899906840437
2^50 - 3^11 = 1125899906665477
2^50 - 3^19 = 1125898744581157
2^51 - 3^14 = 2251799808902279
2^51 - 3^22 = 2251768432625639
2^51 - 3^28 = 2228923021230287
2^51 - 3^31 = 1634126417401301
2^55 - 3^19 = 36028795856702501
2^56 - 3^3 = 72057594037927909
2^57 - 3^8 = 144115188075849311
2^57 - 3^13 = 144115188074261549
2^57 - 3^22 = 144115156694796263
2^57 - 3^29 = 144046557698490989

Last edited by a moderator: May 3, 2017
7. Dec 4, 2007

### approx

You said:
Conjecture: If
p# | AB for some prime p
AB | (p#)^k for some k
gcd(A, B) = 1, and
A - B is prime
then p is the largest prime less than the square root of A - B.

Is this your conjecture, or what you think mine is?
All I'm saying is that
the group of ALL PRIMES, FROM p(n+1) TO p(n+1)^2, can be generated using A-B,
where all of the primes from 2 to p(n) are in either A or B (that's p#dividesAB)
and no larger prime is a factor of either A or B (that's p(k) doesn't divide AB for k>n)
and p(i) is only in A or B, not both (that's gcd(A,B)=1)

IOW, use ALL primes from 2 to p(n), some on each side of the +/-, making sure none are on both sides, exponentiate at will with positive integers, THEN
you can produce all primes from p(n+1) to p(n+1)^2.

abs(15 +/- 2^x) gives 17,19,23,31,47 with the plus and
13,11,7,1,17,
abs(45 +/- 2^x) gives 47 and 43,41,37,29,13,19

Last edited: Dec 5, 2007
8. Dec 4, 2007

### approx

remember, ALL primes from 2 to p(n) must be used, and the exponents are POSITIVE integers, not zero

Also remember, we are only finding primes up to p(n+1)^2, so if we have 3^b * 5^c +/- 2^a, it is only good for primes LESS THAN 49!!!!!!

3^b - 2^a is only good for primes LESS THAN 25!!!!!

Last edited: Dec 4, 2007
9. Dec 5, 2007

### approx

ok, now I get the confusion! The bit about the square root -- that just means that if your "target prime" is 47 then its square root is less than seven so you only need to use 2, 3, and 5 in A and B. if your target prime is, for example, 83 then its square root is less than 11 so you only need to use 2, 3, 5, and 7, seven being the maximum prime less than its square root. IOW, this isn't the conjecture but one of the conditions. Please reread it keeping that in mind.

Last edited: Dec 5, 2007
10. Dec 5, 2007

### CRGreathouse

That's what I said: "p# | AB for some prime p". p# is the primorial, that is 2 * 3 * 5 * ... * p. The special cases I showed above deal with p = 2 or p = 3 so there are only one or two primes to consider. (It's often easiest to deal with the smallest special cases first.)

11. Dec 5, 2007

### CRGreathouse

Can you rewrite the conjecture? The original statement is very hard to make sense of, even with your clarification: "If q is prime, then q = abs( A +/- B ) as constructed above, where the largest prime factor in AB is also the largest prime less than the square root of q."

Maybe just break it down into the things that are assumed and the things that are conjectured to follow? Anything you can do to make it stand alone (i.e. no "as constructed above") would help.

12. Dec 6, 2007

### approx

ok

This first part is not a conjecture but rather something easily proven.

If we construct A and B so that their prime factorization includes all of the primes up to p(n) only AND each prime is in A or B but not both AND their difference is less than [p(n+1)]^2 THEN that difference will be either prime or 1.

This second part is the conjecture.

If p is a prime, and p(n) is the last prime before the square root of p, then we can construct A and B so that their prime factorization includes all of the primes up to p(n) only AND each prime is in A or B but not both AND their difference will be p.

In other words, the first part asserts that such an A-B will always produce a noncomposite if it passes the less-than test, and the second part conjectures that FOR EACH PRIME SUCH AN A AND B CAN BE FOUND. The first part only claims some primes will be found, though each output will be prime, or 1.

Last edited: Dec 6, 2007
13. Dec 6, 2007

### approx

examples

for primes from 5 to 25, use factors of 2 and 3 in A and B

27-16=11
16-3=13
81-64=17
27-8=19
27-4=23

for primes less than 49 use factors of 2, 3, and 5

45-16=29
81-50=31
45-8=37
45-4=41
45-2=43
50-3=47

for primes less than 121 use factors 2, 3, 5, and 7

60-7=53
80-21=59
70-9=61
70-3=67
120-49=71
105-32=73
100-21=79
90-7=83
105-16=89
105-8=97
105-4=101
105-2=103
350-243=107
189-80=109
120-7=113

if you allow the use of 1 and a factor of 2, for primes less than 9 you can get:

4-1=3
4+1=5
8-1=7

The question that my conjecture is about is whether or not there is any prime which can't be generated this way.

14. Dec 6, 2007

### approx

Ok, now that I have a few minutes to concentrate, I'll try to answer your question clearly...

Let p be any given prime.
Let 2, 3, 5, ... p(n) be all of the primes less than square root of p.
Then my conjecture is that you CAN CONSTRUCT A and B WITH p=A-B such that:
CONDITIONS:
(1.)Each p(i) from 2 to p(n) inclusive is a factor of either A or B but not both.
(2.)Each such p(i) has an integer exponent > 0.
(3.)No prime larger than p(n) is a factor of either A or B

The other part, which is not a conjecture but is easy to prove is kind of like reversing
the conditions with the result,

Choose a p(n) and construct A and B as in (1.), (2.), and (3.) above. Then A-B will be SOME prime (or the number 1) IF
(condition): A-B < [p(n+1)]^2

Note that this part I've proven doesn't say all primes are constructed this way, only that this construction will always produce a prime, or 1, when it satisfies the less-than condition. The conjecture says that EVERY prime can be found this way.

Last edited: Dec 6, 2007
15. Dec 6, 2007

### Xevarion

Here's a simpler and more formal statement of your conjecture.

approx's Prime Difference Conjecture

Suppose that $$p_k$$ is the $$k^{th}$$ prime, and $$k \ge 3$$. Then for each prime $$q$$ with $$p_{k-1}^2 < q < p_k^2$$ there exist positive integers $$m, n$$ such that

(1) $$q = m - n$$

(2) If $$j < k$$ then $$p_j \mid m$$ or $$p_j \mid n$$.

16. Dec 6, 2007

### approx

and

Yes, exactly, and (3) if r>k or r=k then p(r) doesn't divide m and p(r) doesn't divide n.

Last edited: Dec 6, 2007
17. Dec 7, 2007

### Xevarion

OK I think we can show the conjecture is true for sufficiently big $$k$$ by the following ideas:

(1) There exists a primitive root mod $$n$$ which is smaller than $$cn^{1/4}$$ for some absolute constant $$c$$ when $$n$$ is sufficiently large.

(2) Observe that we can make any number between 2 and $$p_k > q^{1/2}$$ as a product of some primes no bigger than $$p_{k-1}$$.

So if we believe (1) (I don't have a reference but I think something like this is true), we can construct a primitive root mod $$q$$ which is a product of some of the primes up to $$p_{k-1}$$. Call this number $$r$$. Now we use a combinatorial argument to show that we can find another number $$s$$ which is a product of the other primes smaller than $$p_k$$ with $$s - r^n = q$$.

... okay I am stuck here, at least for now. It seems that $$r^n$$ grows too quickly for my crude way of counting the possibilities for $$s$$. If anyone has any suggestions I'd be delighted to hear them. I'll continue to work on this later, but I'll have much more time during winter break so don't too expect much from me for another week and a half...

18. Dec 7, 2007

### Xevarion

Reasons to expect the conjecture to be true: If you recall, the earlier conjecture about powers of 2 and 3 was false because if you looked mod certain big numbers, the powers of 2 and 3 didn't hit that many residues, so differences of them didn't hit all residues. But since we now get to use all primes up to $$p_{k-1}$$, there are way more possible residues, so it's likely that the same argument would require us to find a VERY large number before we couldn't hit all residues. But then the first example would be much bigger than $$p_k^2$$ and would therefore be irrelevant anyway.

Also, there was the intuitive issue that powers of 2 and 3 don't seem to be very close together when the powers are big. But now, again, we have many more possible combinations without making the powers too big, so we have more "small" numbers available.

These reasons suggest that we should be able to prove the conjecture using some kind of combinatorial argument.

Reasons to think the conjecture is false: To me, the main problem is that when k is big, since we must use all of the $$p_j, j < k$$ as factors of m or n, both m and n will have to be much bigger than q. This makes me suspect that even though you get many more possible combinations when k is big, the products will be so huge that the number of small differences will still be small.

My friend also pointed out that if q-1 is divisible by many small primes, then it may be hard to find appropriate m and n. This is because if $$p_j \mid n$$ then $$p_j \mid m-1$$ and if $$p_j \mid m$$ then $$p_j \mid n+1$$ (except maybe for 3, and its trivial for 2). This turned out not to be a serious problem for 71 = 120 - 49; observe that 49+1 = 50 = 5 * 10 and 120 - 1 = 119 = 7 * 17. But it may make things difficult for larger primes.

In summary, could someone with programming ability please try to produce m and n for the following primes?
173
331
509
2311

Seeing those decompositions might help a lot with getting some intuition about what's actually going on.

19. Dec 7, 2007

### CRGreathouse

Oof. That's not an easy task.

173 = 693 - 520
331 = 2431 - 2100
509 = 51714 - 51205

20. Dec 7, 2007

### CRGreathouse

The code I'm using is very efficient for small numbers, less so for large. (I mean that there are obvious, if not so easily implemented, methods that would be much slower for n < 200 but faster for large n.)

Actually in that range there are some significantly harder problems than the ones you asked. 431 in particular was tough to make work. I haven't been able to find solutions for 397, 419, 433, or 487; I've searched up to a billion on each.

Of course 2311 is super-hard because it's very large -- just finding N and M with 47#|NM is hard enough. I'm going to have to write a whole new program and throw a lot of cycles at it if I'm to have any chance to solving it. Of course I don't know that it's solvable.

Code (Text):
127 = 490 - 363
131 = 231 - 100
137 = 165 - 28
139 = 154 - 15
149 = 275 - 126
151 = 165 - 14
157 = 220 - 63
163 = 198 - 35
167 = 1575 - 1408
173 = 693 - 520
179 = 1089 - 910
181 = 286 - 105
191 = 455 - 264
193 = 1183 - 990
197 = 1352 - 1155
199 = 364 - 165
211 = 715 - 504
223 = 1848 - 1625
227 = 3087 - 2860
229 = 385 - 156
233 = 728 - 495
239 = 330 - 91
241 = 780 - 539
251 = 1001 - 750
257 = 455 - 198
263 = 770 - 507
269 = 819 - 550
271 = 546 - 275
277 = 420 - 143
281 = 1001 - 720
283 = 1053 - 770
293 = 2295 - 2002
307 = 2925 - 2618
311 = 20111 - 19800
313 = 18513 - 18200
317 = 11900 - 11583
331 = 2431 - 2100
337 = 1724800 - 1724463
347 = 7497 - 7150
349 = 910 - 561
353 = 3213 - 2860
359 = 1430 - 1071
367 = 7150 - 6783
373 = 88825 - 88452
379 = 35700 - 35321
383 = 53865 - 53482
389 = 3315 - 2926
**397
401 = 247401 - 247000
409 = 122265 - 121856
**419
421 = 4620 - 4199
431 = 14189175 - 14188744
**433
439 = 44044 - 43605
443 = 77520 - 77077
449 = 230945 - 230496
457 = 372400 - 371943
461 = 4641 - 4180
463 = 452200 - 451737
467 = 65637 - 65170
479 = 25350 - 24871
**487
491 = 270215 - 269724
499 = 206250 - 205751
503 = 25935 - 25432
509 = 51714 - 51205
I'm beginning to seriously doubt this conjecture. Finding small solutions is easy, but large ones depend on finding smooth numbers in short intervals. A generalization of Sto/rmer's theorem could disprove this conjecture -- although I'm not seen any work in that direction.

Last edited: Dec 7, 2007


text:
# The unitary time-evolution in the interation picture

I'm currently consuming a course on QFT where we need to define the unitary time-evolution to get the time evolution of the wave function in the interaction picture:

$\hat{U}(t_1,t_0) = \exp\left(\frac{i}{\hbar}\hat{H}_0t_1\right)\exp\left(-\frac{i}{\hbar}\hat{H}(t_1-t_0)\right)\exp\left(-\frac{i}{\hbar}\hat{H}_0t_0\right)$ .

Now one can show that this operator follows a Schrödinger equation by simply taking the derivative to time:

$i\hbar\frac{d}{dt}\hat{U}(t,t_0) = \hat{H}_1^I(t)\hat{U}(t,t_0)$ .

Where $\hat{H}_1^I$ is the perturbation to our free-field Hamiltonian $\hat{H}_0$.

Now I started wondering whether $\hat{U}(t_1,t_0)$ shouldn't also follow a Heisenberg equation since it's an operator.

I believe it shouldn't since $\hat{U}(t_1,t_0)$ gives a unitairy time-evolution which is a transformation, while the Heisenberg equation applies to observables. I was woundering if someone could confirm my reasoning or disprove it?

-
If $t_1$ and $t_0$ are constants, then $\hat{U}(t_1,t_0)$ is the operator evaluated at those particular instants, not a function. Think about the function $\sin(x)$ and the function evaluated at $x_0$ $\sin(x)|_{x=x_0}=\sin(x_0)$ –  Jorge Jun 24 '13 at 14:30
Yes but if I were to take $t_1$ as my variable, then it might follow some equation governing the time-evolution. That it follows Schrödinger can be proven. For the Heisenberg-case this doesn't work (I wouldn't know how to take the commutator of $\hat{H_1^I}$ and $\hat{H_0}$). My reasoning for this is that the Heisenberg-equation only applies to observables, not the transformation (what the $\hat{U}(t_1,t_0)$ in principle is. –  Nick Jun 24 '13 at 14:54

Yes, OP is right. The Heisenberg evolution equation in the interaction picture applies to an operator $A_I(t)$, that depends on a single moment of time $t$. On the other hand, the evolution operator $\hat{U}(t_f,t_i)$ depends in principle on the whole intermediate time interval $[t_i,t_f]$, and is in particular not a local operator of a single time.

-
Ok, that might explain my conceptual problems upon trying to derive the Heisenberg-like equation. Thanks! Now I was woundering if it was purely because of the fact that $\hat{U}(t_f,t_i)$ is depending on the interval $[t_i,t_f]$. Or also because of the fact that it is a transformation and Heisenberg doesn't apply to transformations ? –  Nick Jun 24 '13 at 15:20
@Nick: Well, I'm not sure what class of transformations you allow, but a sufficiently well-behaved local transformation operator that is only associated with a single time should satisfy the Heisenberg evolution equation. –  Qmechanic Jun 24 '13 at 15:41
Okay, thanks a lot! –  Nick Jun 24 '13 at 15:47
@Nick: An other way to see that is that the evolution operator have to be expressed as a time ordered function of the perturbation hamiltonian. –  Trimok Jun 24 '13 at 17:00
@Nick : Yes. Be careful, it is a partial derivative. (Minor remark : if you want your message appears in the mail box of somebody, you have to do a @ (for instance @Trimok). Sometimes it is automatic, but not in this case.) –  Trimok Jun 25 '13 at 18:21


text:
# Structural principles of α/β barrel proteins: The packing of the interior of the sheet

@article{Lesk1989StructuralPO,
title={Structural principles of $\alpha$/$\beta$ barrel proteins: The packing of the interior of the sheet},
author={Arthur M. Lesk and C. I. Br{\"a}nd{\'e}n and Cyrus Chothia},
journal={Proteins: Structure},
year={1989},
volume={5}
}
• Published 1989
• Chemistry
• Proteins: Structure
α/β barrel structures very similar to that first observed in triose phosphate isomerase are now known to occur in 14 enzymes. To understand the origin of this fold, we analyzed in three of these proteins the geometry of the eight‐stranded β‐sheets and the packing of the residues at the center of the barrel. The Packingin thisregion is seen in its simplest form in glycolate oxidase. It consists of 12 residues arranged in three layers. Each layer contains four side chains. The packing of RubisCO… Expand
Principles determining the structure of beta-sheet barrels in proteins. I. A theoretical analysis.
• Materials Science, Medicine
• Journal of molecular biology
• 1994
It is shown that the (n, S) values determine all the other general structural features of regular beta-sheet barrels, in particular, optimal values of the twist and coiling angles that produce the closed beta- sheet, the hyperboloidal shape and the arrangement of residues in the barrel interior. Expand
Principles determining the structure of beta-sheet barrels in proteins. II. The observed structures.
• Physics, Medicine
• Journal of molecular biology
• 1994
The observed arrangement of the strands, and the extent of the twist and coiling of the beta-sheets, are very close to those calculated from the (n, S) values for the barrel, demonstrating the validity of these principles. Expand
On the evolution of alternate core packing in eightfold β/α‐barrels
• Biology, Medicine
• Protein science : a publication of the Protein Society
• 1994
It is demonstrated that simple genetic alterations may be responsible for switching the nature of side‐chain packing observed in β/α‐barrels and that convergent evolution to a stable fold need not be invoked to account for the emergence of 2 classes of β/β-barrel core. Expand
Recurrent αβ loop structures in TIM barrel motifs show a distinct pattern of conserved structural features
The results suggest furthermore that conserved hydrophobic residues along the sequence of the connections, may be correlated more with specific patterns of interactions made with neighboring helices and sheet strands than with helix/strand packing within the connection itself. Expand
Identifying the structural boundaries of independent folding domains in the a subunit of tryptophan synthase, a β/α barrel protein
• Chemistry, Medicine
• Protein science : a publication of the Protein Society
• 1999
Results suggest that the residual structure in αTS requires the participation of hydrophobic residues in multiple β‐strands that span the entire sequence, suggesting the modular assembly of βαβ supersecondary structural elements. Expand
Locating the stabilizing residues in (α/β)8 barrel proteins based on hydrophobicity, long‐range interactions, and sequence conservation
• Biology
• 2004
This work proposes a new consensus approach for locating stabilizing residues in TIM‐barrel domains based on long‐range interactions, hydrophobicity, and conservation of amino acid residues, and suggests that these residues are among the ones with less mobility in the considered proteins. Expand
Analysis of interactive packing of secondary structural elements in α/β units in proteins
• Chemistry, Medicine
• Protein science : a publication of the Protein Society
• 1999
The β‐sheet unit (βu), defined as a pair of adjacent parallel or antiparallel hydrogen‐bonded β‐strands, packing with an α‐helix shows a better correlation between the interaxial distance and log (V/nda) for the residues in the packing interface. Expand
The structure and evolution of a/β barrel proteins
• Chemistry, Medicine
• FASEB journal : official publication of the Federation of American Societies for Experimental Biology
• 1995
Arguments are made to support the divergence of all members of this family from a common ancestor and evidence is presented to suggest that convergent molecular evolution occurs when there is only one energetically reasonable pathway for a chemical reaction. Expand
One fold with many functions: the evolutionary relationships between TIM barrel families based on their sequences, structures and functions.
• Biology, Medicine
• Journal of molecular biology
• 2002
The eightfold barrel structure, first observed in triose-phosphate isomerase, occurs ubiquitously in nature and is an extreme example of the "one fold-many functions" paradigm, which illustrates the difficulty of assigning function through a structural genomics approach for some folds. Expand
Packing constraints of hydrophobic side chains in (α/β)8 barrels
• Chemistry
• 1995
An analysis of possible tight packing of hydrophobic groups simultaneously at the both surfaces of β‐hyperboloid‐8 was conducted. This analysis shows that the disposition of amino acid side chains atExpand

#### References

SHOWING 1-10 OF 41 REFERENCES
Structural principles of parallel beta-barrels in proteins.
• Chemistry, Medicine
• Proceedings of the National Academy of Sciences of the United States of America
• 1988
Eight-stranded beta-sheets in nine protein structures containing "TIM (triose phosphate isomerase) barrels" are shown to be fitted satisfactorily by hyperboloids, the generating lines of which passExpand
Packing of α-Helices onto β-Pleated sheets and the anatomy of αβ proteins☆
• Chemistry
• 1980
We propose a model for the packing of α-helices on β-sheets in αβ proteins. It involves the association of two smooth surfaces with complementary twists: the surface of a regular β-sheet with aExpand
Analysis and predication of structural motifs in the glycolytic enzymes.
• Biology, Medicine
• Philosophical transactions of the Royal Society of London. Series B, Biological sciences
• 1981
General rules governing the topology and packing of alpha-helices against a beta-sheet provide a basis for the combinatorial prediction of the tertiary fold of glycolytic domains from their amino acid sequence and observed secondary structure. Expand
On the conformation of proteins: The handedness of the β-strand-α-helix-β-strand unit
• Biology
• 1976
It is shown that the right-handed strand-helix-strand unit determines the sense of the super-secondary structure found in the dehydrogenases and of related folds found in other structures. Expand
Three-dimensional structure of the iron-sulfur flavoprotein trimethylamine dehydrogenase at 2.4-A resolution.
• Chemistry, Medicine
• The Journal of biological chemistry
• 1986
The three-dimensional structure of trimethylamine dehydrogenase from the methylotrophic bacterium W3A1 has been determined to 2.4-A resolution and the topologies and spatial arrangements of these two domains are remarkably similar to the FAD- and NADPH-binding domains of glutathione reductase. Expand
Structure of glycolate oxidase from spinach.
• Chemistry, Medicine
• Proceedings of the National Academy of Sciences of the United States of America
• 1985
A high-resolution structure determination of glycolate oxidase from spinach is reported, and the subunit structure is essentially a structure of the eight-stranded alpha/beta-barrel type first described for triosephosphate isomerase. Expand
Three-dimensional structure of the tryptophan synthase alpha 2 beta 2 multienzyme complex from Salmonella typhimurium.
• Biology, Medicine
• The Journal of biological chemistry
• 1988
The three-dimensional structure of the alpha 2 beta 2 complex of tryptophan synthase from Salmonella typhimurium has been determined by x-ray crystallography at 2.5 A resolution. The four polypeptideExpand
X-ray crystal structure of D-xylose isomerase at 4-A resolution.
• Medicine, Chemistry
• The Journal of biological chemistry
• 1984
The structure of D-xylose isomerase from Streptomyces rubiginosus has been determined at 4-A resolution using multiple isomorphous phasing techniques and the location of the active site in the enzyme has been tentatively identified from studies using a crystal grown from a solution containing the inhibitor xylitol. Expand
Gene duplications in the structural evolution of chymotrypsin.
• A. Mclachlan
• Biology, Medicine
• Journal of molecular biology
• 1979
It is suggested that the Chymotrypsin barrel originally evolved from a closely-linked dimer of two intertwined half-domains which became united into one by gene duplication, consistent with the gene duplication hypothesis. Expand
Crystal structure of muconate lactonizing enzyme at 3 A resolution.
• Medicine
• Journal of molecular biology
• 1987
The crystal structure of muconate lactonizing enzyme has been solved at 3 A resolution, and an unambiguous alpha-carbon backbone chain trace made, implying that these two enzymes may be related by convergent, rather than divergent, evolution. Expand


text:
Outlook: MELROSE INDUSTRIES PLC is assigned short-term Ba1 & long-term Ba1 estimated rating.
Time series to forecast n: 15 Feb 2023 for (n+1 year)
Methodology : Transfer Learning (ML)

## Abstract

MELROSE INDUSTRIES PLC prediction model is evaluated with Transfer Learning (ML) and Independent T-Test1,2,3,4 and it is concluded that the LON:MRO stock is predictable in the short/long term. According to price forecasts for (n+1 year) period, the dominant strategy among neural network is: Buy

## Key Points

1. What is Markov decision process in reinforcement learning?
2. Market Risk
3. Market Risk

## LON:MRO Target Price Prediction Modeling Methodology

We consider MELROSE INDUSTRIES PLC Decision Process with Transfer Learning (ML) where A is the set of discrete actions of LON:MRO stock holders, F is the set of discrete states, P : S × F × S → R is the transition probability distribution, R : S × F → R is the reaction function, and γ ∈ [0, 1] is a move factor for expectation.1,2,3,4

F(Independent T-Test)5,6,7= $\begin{array}{cccc}{p}_{a1}& {p}_{a2}& \dots & {p}_{1n}\\ & ⋮\\ {p}_{j1}& {p}_{j2}& \dots & {p}_{jn}\\ & ⋮\\ {p}_{k1}& {p}_{k2}& \dots & {p}_{kn}\\ & ⋮\\ {p}_{n1}& {p}_{n2}& \dots & {p}_{nn}\end{array}$ X R(Transfer Learning (ML)) X S(n):→ (n+1 year) $\stackrel{\to }{R}=\left({r}_{1},{r}_{2},{r}_{3}\right)$

n:Time series to forecast

p:Price signals of LON:MRO stock

j:Nash equilibria (Neural Network)

k:Dominated move

a:Best response for target price

For further technical information as per how our model work we invite you to visit the article below:

How do AC Investment Research machine learning (predictive) algorithms actually work?

## LON:MRO Stock Forecast (Buy or Sell) for (n+1 year)

Sample Set: Neural Network
Stock/Index: LON:MRO MELROSE INDUSTRIES PLC
Time series to forecast n: 15 Feb 2023 for (n+1 year)

According to price forecasts for (n+1 year) period, the dominant strategy among neural network is: Buy

X axis: *Likelihood% (The higher the percentage value, the more likely the event will occur.)

Y axis: *Potential Impact% (The higher the percentage value, the more likely the price will deviate.)

Z axis (Grey to Black): *Technical Analysis%

## IFRS Reconciliation Adjustments for MELROSE INDUSTRIES PLC

1. When identifying what risk components qualify for designation as a hedged item, an entity assesses such risk components within the context of the particular market structure to which the risk or risks relate and in which the hedging activity takes place. Such a determination requires an evaluation of the relevant facts and circumstances, which differ by risk and market.
2. When designating a risk component as a hedged item, the hedge accounting requirements apply to that risk component in the same way as they apply to other hedged items that are not risk components. For example, the qualifying criteria apply, including that the hedging relationship must meet the hedge effectiveness requirements, and any hedge ineffectiveness must be measured and recognised.
3. An entity shall apply Annual Improvements to IFRS Standards 2018–2020 to financial liabilities that are modified or exchanged on or after the beginning of the annual reporting period in which the entity first applies the amendment.
4. In accordance with the hedge effectiveness requirements, the hedge ratio of the hedging relationship must be the same as that resulting from the quantity of the hedged item that the entity actually hedges and the quantity of the hedging instrument that the entity actually uses to hedge that quantity of hedged item. Hence, if an entity hedges less than 100 per cent of the exposure on an item, such as 85 per cent, it shall designate the hedging relationship using a hedge ratio that is the same as that resulting from 85 per cent of the exposure and the quantity of the hedging instrument that the entity actually uses to hedge those 85 per cent. Similarly, if, for example, an entity hedges an exposure using a nominal amount of 40 units of a financial instrument, it shall designate the hedging relationship using a hedge ratio that is the same as that resulting from that quantity of 40 units (ie the entity must not use a hedge ratio based on a higher quantity of units that it might hold in total or a lower quantity of units) and the quantity of the hedged item that it actually hedges with those 40 units.

*International Financial Reporting Standards (IFRS) adjustment process involves reviewing the company's financial statements and identifying any differences between the company's current accounting practices and the requirements of the IFRS. If there are any such differences, neural network makes adjustments to financial statements to bring them into compliance with the IFRS.

## Conclusions

MELROSE INDUSTRIES PLC is assigned short-term Ba1 & long-term Ba1 estimated rating. MELROSE INDUSTRIES PLC prediction model is evaluated with Transfer Learning (ML) and Independent T-Test1,2,3,4 and it is concluded that the LON:MRO stock is predictable in the short/long term. According to price forecasts for (n+1 year) period, the dominant strategy among neural network is: Buy

### LON:MRO MELROSE INDUSTRIES PLC Financial Analysis*

Rating Short-Term Long-Term Senior
Outlook*Ba1Ba1
Income StatementCaa2Caa2
Balance SheetBaa2C
Leverage RatiosBaa2Baa2
Cash FlowCCaa2
Rates of Return and ProfitabilityBaa2B2

*Financial analysis is the process of evaluating a company's financial performance and position by neural network. It involves reviewing the company's financial statements, including the balance sheet, income statement, and cash flow statement, as well as other financial reports and documents.
How does neural network examine financial reports and understand financial state of the company?

### Prediction Confidence Score

Trust metric by Neural Network: 81 out of 100 with 600 signals.

## References

1. Abadie A, Imbens GW. 2011. Bias-corrected matching estimators for average treatment effects. J. Bus. Econ. Stat. 29:1–11
2. Belsley, D. A. (1988), "Modelling and forecast reliability," International Journal of Forecasting, 4, 427–447.
3. Robins J, Rotnitzky A. 1995. Semiparametric efficiency in multivariate regression models with missing data. J. Am. Stat. Assoc. 90:122–29
4. Mikolov T, Chen K, Corrado GS, Dean J. 2013a. Efficient estimation of word representations in vector space. arXiv:1301.3781 [cs.CL]
5. Hill JL. 2011. Bayesian nonparametric modeling for causal inference. J. Comput. Graph. Stat. 20:217–40
6. Thompson WR. 1933. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika 25:285–94
7. Bera, A. M. L. Higgins (1997), "ARCH and bilinearity as competing models for nonlinear dependence," Journal of Business Economic Statistics, 15, 43–50.
Frequently Asked QuestionsQ: What is the prediction methodology for LON:MRO stock?
A: LON:MRO stock prediction methodology: We evaluate the prediction models Transfer Learning (ML) and Independent T-Test
Q: Is LON:MRO stock a buy or sell?
A: The dominant strategy among neural network is to Buy LON:MRO Stock.
Q: Is MELROSE INDUSTRIES PLC stock a good investment?
A: The consensus rating for MELROSE INDUSTRIES PLC is Buy and is assigned short-term Ba1 & long-term Ba1 estimated rating.
Q: What is the consensus rating of LON:MRO stock?
A: The consensus rating for LON:MRO is Buy.
Q: What is the prediction period for LON:MRO stock?
A: The prediction period for LON:MRO is (n+1 year)