text:
# Android Testing with Kotlin.

In this post we will walk through how we can take advantage of the Kotlin Programming Language by introducing it in our codebase without affecting production code, in this case testing. This should be a good starting point towards a full migration.

“We should never talk about production code and testing separately, testing should be implicit when writing code as part of our solution.”

## Introduction

This is not a new topic actually, especially since Kotlin is gaining terrain in the world of programming languages in general, and especially on Android. Also, I’m not going to get into details on what Kotlin offers since there is people out there doing a great job (especial mention to my friend Antonio Leiva).

## Kotlin Programming Language

Before starting I will just mention and give a quick summary of the main benefits of this “young?” and modern programming language:

• Kotlin is concise. The less code you write, the fewer mistakes you make.
• Kotlin is expressive. You can express whatever you want in a shorter way (Java is verbose).
• Kotlin is pragmatic. Straight to the point without a lot of wiring.
• Kotlin is android-friendly. As we can see in this article ;).
• Kotlin is type-safe. Remember the billion dollars mistake?.
• Kotlin is functional. Functions and properties are first-class citizens.
• Kotlin is friendly. Interoperability between Kotlin and Java works almost perfect.

## Why Kotlin in Tests?

We have an android codebase in our old and lovely(?) Java, and we would love to introduce this awesome language gradually, so why not starting with tests?

This way, we can give it a try without affecting our main application under any circumstances, and at the same time we get the excitement of a modern and already mature language, plus some training for us and our team in preparation for the big change.

Sounds good right? Let’s write some code then…

## Getting our hands dirty

Basically, the idea is to showcase how we can test our android applications using Kotlin, so as a first step we need to setup and prepare our environment by adding Kotlin dependencies in our build.gradle file:

buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
}
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

...

dependencies {
...
compile "org.jetbrains.kotlin:kotlin-stdlib:1.0.6"

...
testCompile 'org.jetbrains.kotlin:kotlin-stdlib:1.0.6'
testCompile 'org.jetbrains.kotlin:kotlin-test-junit:1.0.6'
testCompile "com.nhaarman:mockito-kotlin:1.1.0"
testCompile 'org.amshove.kluent:kluent:1.14'
}

Now we need to set the dedicated directories for tests written in Kotlin, this is done in our sourceSets section:

android {
...
sourceSets {
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}
...
}

And as a third step we want to make sure, we do not allow accidentally (for now ;)) any Kotlin code in production by also adding this defensive lines:

afterEvaluate {
android.sourceSets.all { sourceSet ->
if (!sourceSet.name.startsWith('test') || !sourceSet.name.startsWith('androidTest')) {
sourceSet.kotlin.setSrcDirs([])
}
}
}

The entire file can be seen in the sample project on Github. And now we are able to write tests in the same way as we would do in Java.

## JUnit Tests

What I only need here is JUnit, Mockito-kotlin and Kluent (a library with really cool assertion semantics).

Let’s see a simple test case for a class called GetUserDetails.java which is a UseCase (from my Android Architecture approach):

class GetUserDetailsTest {

private val USER_ID = 123

private lateinit var getUserDetails: GetUserDetails

private val userRepository: UserRepository = mock()

@Before
fun setUp() {
}

@Test
fun shouldGetUserDetails() {
getUserDetails.buildUseCaseObservable(GetUserDetails.Params.forUser(USER_ID));

verify(userRepository).user(USER_ID)
verifyNoMoreInteractions(userRepository)
}
}

Something to pay attention is that when we need to construct our subject under test (in the setup method), we must declare it “lateinit“, otherwise the compiler will complain, since properties must be initialized or be abstract.

Here is another test example for a Serializer.java class in the project, where you can see the assertions mentioned above:

class SerializerTest {

private val JSON_RESPONSE =
"{\n \"id\": 1,\n " +
"\"cover_url\": \"http://www.android10.org/myapi/cover_1.jpg\",\n " +
"\"full_name\": \"Simon Hill\",\n " +
"\"description\": \"Curabitur gravida nisi at nibh. In hac habitasse " +
"platea dictumst. Aliquam augue quam, sollicitudin vitae, consectetuer " +
"eget, rutrum at, lorem.\\n\\nInteger tincidunt ante vel ipsum. " +
"Praesent blandit lacinia erat. Vestibulum sed magna at nunc commodo " +
"placerat.\\n\\nPraesent blandit. Nam nulla. Integer pede justo, " +
"lacinia eget, tincidunt eget, tempus vel, pede.\",\n " +
"\"followers\": 7484,\n " +
"\"email\": \"[email protected]\"\n}"

private var serializer = Serializer()

@Test
fun shouldSerialize() {
val userEntityOne = serializer.deserialize(JSON_RESPONSE, UserEntity::class.java)
val jsonString = serializer.serialize(userEntityOne, UserEntity::class.java)
val userEntityTwo = serializer.deserialize(jsonString, UserEntity::class.java)

userEntityOne.userId shouldEqual userEntityTwo.userId
userEntityOne.fullname shouldEqual userEntityTwo.fullname
userEntityOne.followers shouldEqual userEntityTwo.followers
}

@Test
fun shouldDesearialize() {
val userEntity = serializer.deserialize(JSON_RESPONSE, UserEntity::class.java)

userEntity.userId shouldEqual 1
userEntity.fullname shouldEqual "Simon Hill"
userEntity.followers shouldEqual 7484
}
}

## Robolectric (Integration?) Tests

I created a test parent class (used for each test case) in order to encapsulate everything Robolectic related, thus, my tests do not depend directly on this framework.

The idea is that any functionality or helper method is wrapped here (this is a lesson learned from the past where I polluted all my code with Robolectric classes, so the process of migrating to a non-backward compatible newer version was very painful).

/**
* Base class for Robolectric data layer tests.
* Inherit from this class to create a test.
*/
@RunWith(RobolectricTestRunner::class)
@Config(constants = BuildConfig::class,
application = AndroidTest.ApplicationStub::class,
sdk = intArrayOf(21))
abstract class AndroidTest {

fun context(): Context {
return RuntimeEnvironment.application
}

fun cacheDir(): File {
return context().cacheDir
}

internal class ApplicationStub : Application()
}

And here is an example of an integration test that interacts with the android framework through our AndroidTest.kt class:

class FileManagerTest : AndroidTest() {

private var fileManager = FileManager()

@After
fun tearDown() {
fileManager.clearDirectory(cacheDir())
}

@Test
fun shouldWriteToFile() {
val fileToWrite = createDummyFile()
val fileContent = "content"

fileManager.writeToFile(fileToWrite, fileContent)

fileToWrite.exists() shouldEqualTo true
}

@Test
fun shouldHaveCorrectFileContent() {
val fileToWrite = createDummyFile()
val fileContent = "content\n"

fileManager.writeToFile(fileToWrite, fileContent)

expectedContent shouldEqualTo fileContent
}

private fun createDummyFile(): File {
val dummyFilePath = cacheDir().path + File.separator + "dummyFile"
return File(dummyFilePath)
}
}

## Espresso Acceptance (UI?) Tests

My choice here is Espresso since it is backed by Google and from my perspective the most stable integration test framework nowadays.

The same as with Robolectric, I decided to create a little framework on top of it, let’s see how it works.

All my tests depend on an AcceptanceTest.kt class:

@LargeTest
@RunWith(AndroidJUnit4::class)
abstract class AcceptanceTest<T : Activity>(clazz: Class<T>) {

@Rule @JvmField
val testRule: ActivityTestRule<T> = IntentsTestRule(clazz)

val checkThat: Matchers = Matchers()
val events: Events = Events()
}

Things to keep an eye on here:

• A test rule is needed within Espresso (from the documentation): This rule provides functional testing of a single activity. The activity under test will be launched before each test annotated with @Test and before methods annotated with @Before. It will be terminated after the test is completed and methods annotated with @After are finished. During the duration of the test you will be able to manipulate your Activity directly.
• We must annotate our “testRule” field with @JvmField: this is necessary to turn this Kotlin property into a JVM field that JUnit can interpret.
• Matchers class: A wrapper around Espresso checks.
• Events class: Another wrapper encapsulating Espresso events.
class Matchers {
fun <T : Activity> nextOpenActivityIs(clazz: Class<T>) {
intended(IntentMatchers.hasComponent(clazz.name))
}

fun viewIsVisibleAndContainsText(@StringRes stringResource: Int) {
onView(withText(stringResource))
.check(matches(withEffectiveVisibility(Visibility.VISIBLE)))
}

fun viewContainsText(@IdRes viewId: Int, @StringRes stringResource: Int) {
onView(withId(viewId)).check(matches(withText(stringResource)))
}
}

class Events {
fun clickOnView(@IdRes viewId: Int) {
onView(withId(viewId)).perform(click())
}
}

Last but not least, an example of the main activity of the project, which displays a view and also opens another activity when clicking on a button.

The code is pretty simple but if you need a better understanding, you can browse the sample code on Github.

class MainActivityTest : AcceptanceTest<MainActivity>(MainActivity::class.java) {

@Test
fun shouldOpenHelloWorldScreen() {
events.clickOnView(R.id.btn_hello_world)
checkThat.nextOpenActivityIs(HelloWorldActivity::class.java)
}

@Test
fun shouldDisplayAction() {
events.clickOnView(R.id.fab)
checkThat.viewIsVisibleAndContainsText(R.string.action)
}
}

## Running our test battery

There are neither problems nor especial configuration to run our tests from Android Studio/Intellij. I also added a couple of Gradle tasks in my root build.gradle file:

task runUnitTests(dependsOn: [':app:testDebugUnitTest']) {
description 'Run all unit tests'
}

description 'Run all acceptance tests.'
}

Just type this from the command line:

./gradlew runUnitTests

## Wrapping up

If at some point you were considering Kotlin, there are no longer excuses to use it in production. Tests are a good starting point to introduce it, plus this will help you to have a taste of what this language has to offer.

Of course as an extra ball you get all the benefits mentioned in this article and a nice training that will prepare you and your team for the big change.


text:
# Fundamental approximation in the circle method

I am interested in the circle method and I am currently working on Vaughan's book. Let $$f$$ be the generating function $$f$$ of the squares, that is to say the power series sum of $$z^{m^2}$$.

One of the main points of the method is to approximate the generating function in the form $$f(\rho e(\frac aq + \beta) ) \sim \frac Cq S(a, q) (1-\rho e(\beta)) ^{-1/2} \qquad (\star)$$

where $$S(a, q) = \sum_m e(am^2/q)$$

where the sum is over m modulo $$q$$. This lead to decomposing the sought coefficients into singular series and singular integral, up to an error term. However, I do not understand where does $$(\star)$$ come from. It does not seem to me to be a straightforward development of the function. Also, is it dependent on the particular choice of the problem of sum of squares, or does an analogous of $$(\star)$$ also hold for every function in this context? How to get a precise error term?

format: plain


text:
## The Annals of Statistics

### ℓ1-penalized quantile regression in high-dimensional sparse models

#### Abstract

We consider median regression and, more generally, a possibly infinite collection of quantile regressions in high-dimensional sparse models. In these models, the number of regressors p is very large, possibly larger than the sample size n, but only at most s regressors have a nonzero impact on each conditional quantile of the response variable, where s grows more slowly than n. Since ordinary quantile regression is not consistent in this case, we consider 1-penalized quantile regression (1-QR), which penalizes the 1-norm of regression coefficients, as well as the post-penalized QR estimator (post-1-QR), which applies ordinary QR to the model selected by 1-QR. First, we show that under general conditions 1-QR is consistent at the near-oracle rate $\sqrt{s/n}\sqrt{\log(p\vee n)}$, uniformly in the compact set $\mathcal{U}\subset(0,1)$ of quantile indices. In deriving this result, we propose a partly pivotal, data-driven choice of the penalty level and show that it satisfies the requirements for achieving this rate. Second, we show that under similar conditions post-1-QR is consistent at the near-oracle rate $\sqrt{s/n}\sqrt{\log(p\vee n)}$, uniformly over $\mathcal{U}$, even if the 1-QR-selected models miss some components of the true models, and the rate could be even closer to the oracle rate otherwise. Third, we characterize conditions under which 1-QR contains the true model as a submodel, and derive bounds on the dimension of the selected model, uniformly over $\mathcal{U}$; we also provide conditions under which hard-thresholding selects the minimal true model, uniformly over $\mathcal{U}$.

#### Article information

Source
Ann. Statist., Volume 39, Number 1 (2011), 82-130.

Dates
First available in Project Euclid: 3 December 2010

https://projecteuclid.org/euclid.aos/1291388370

Digital Object Identifier
doi:10.1214/10-AOS827

Mathematical Reviews number (MathSciNet)
MR2797841

Zentralblatt MATH identifier
1209.62064

#### Citation

Belloni, Alexandre; Chernozhukov, Victor. ℓ 1 -penalized quantile regression in high-dimensional sparse models. Ann. Statist. 39 (2011), no. 1, 82--130. doi:10.1214/10-AOS827. https://projecteuclid.org/euclid.aos/1291388370

#### References

• [1] Belloni, A. and Chernozhukov, V. (2009). Computational complexity of MCMC-based estimators in large samples. Ann. Statist. 37 2011–2055.
• [2] Belloni, A. and Chernozhukov, V. (2010). Supplement to “1-penalized quantile regression in high-dimensional sparse models.” DOI: 10.1214/10-AOS827SUPP.
• [3] Belloni, A. and Chernozhukov, V. (2009). 1-penalized quantile regression in high-dimensional sparse models. Available at arXiv:0904.2931.
• [4] Belloni, A. and Chernozhukov, V. (2008). Conditional quantile processes under increasing dimension. Technical report, Duke and MIT.
• [5] Belloni, A. and Chernozhukov, V. (2009). Post-1-penalized estimators in high-dimensional linear regression models. Available at arXiv:1001.0188.
• [6] Bertsimas, D. and Tsitsiklis, J. (1997). Introduction to Linear Optimization. Athena Scientific, Belmont, MA.
• [7] Bickel, P. J., Ritov, Y. and Tsybakov, A. B. (2009). Simultaneous analysis of Lasso and Dantzig selector. Ann. Statist. 37 1705–1732.
• [8] Buchinsky, M. (1994). Changes in the U.S. wage structure 1963–1987: Application of quantile regression. Econometrica 62 405–458.
• [9] Bunea, F., Tsybakov, A. B. and Wegkamp, M. H. (2006). Aggregation and sparsity via 1 penalized least squares. In Proceedings of 19th Annual Conference on Learning Theory (COLT 2006) (G. Lugosi and H. U. Simon, eds.). Lecture Notes in Artificial Intelligence 4005 379–391. Springer, Berlin.
• [10] Bunea, F., Tsybakov, A. B. and Wegkamp, M. H. (2007). Aggregation for Gaussian regression. Ann. Statist. 35 1674–1697.
• [11] Bunea, F., Tsybakov, A. and Wegkamp, M. H. (2007). Sparsity oracle inequalities for the Lasso. Electron. J. Stat. 1 169–194.
• [12] Candes, E. and Tao, T. (2007). The Dantzig selector: Statistical estimation when p is much larger than n. Ann. Statist. 35 2313–2351.
• [13] Chernozhukov, V. (2005). Extremal quantile regression. Ann. Statist. 33 806–839.
• [14] Fan, J. and Lv, J. (2008). Sure independence screening for ultra-high dimensional feature space. J. R. Stat. Soc. Ser. B Stat. Methodol. 70 849–911.
• [15] Gutenbrunner, C. and Jurečková, J. (1992). Regression rank scores and regression quantiles. Ann. Statist. 20 305–330.
• [16] He, X. and Shao, Q.-M. (2000). On parameters of increasing dimenions. J. Multivariate Anal. 73 120–135.
• [17] Knight, K. (1998). Limiting distributions for L1 regression estimators under general conditions. Ann. Statist. 26 755–770.
• [18] Knight, K. and Fu, W. J. (2000). Asymptotics for Lasso-type estimators. Ann. Statist. 28 1356–1378.
• [19] Koenker, R. (2005). Quantile Regression. Cambridge Univ. Press, Cambridge.
• [20] Koenker, R. (2010). Additive models for quantile regression: Model selection and confidence bandaids. Working paper. Available at http://www.econ.uiuc.edu/~roger/research/bandaids/bandaids.pdf.
• [21] Koenker, R. and Basset, G. (1978). Regression quantiles. Econometrica 46 33–50.
• [22] Koltchinskii, V. (2009). Sparsity in penalized empirical risk minimization. Ann. Inst. H. Poincaré Probab. Statist. 45 7–57.
• [23] Laplace, P.-S. (1818). Théorie Analytique des Probabilités. Éditions Jacques Gabay (1995), Paris.
• [24] Ledoux, M. and Talagrand, M. (1991). Probability in Banach Spaces: Isoperimetry and Processes. Ergebnisse der Mathematik und ihrer Grenzgebiete 23. Springer, Berlin.
• [25] Lounici, K., Pontil, M., Tsybakov, A. B. and van de Geer, S. A. (2009). Taking advantage of sparsity in multi-task learning. In COLT’09. Omnipress, Madison, WI.
• [26] Meinshausen, N. and Yu, B. (2009). Lasso-type recovery of sparse representations for high-dimensional data. Ann. Statist. 37 246–270.
• [27] Portnoy, S. (1991). Asymptotic behavior of regression quantiles in nonstationary, dependent cases. J. Multivariate Anal. 38 100–113.
• [28] Portnoy, S. and Koenker, R. (1997). The Gaussian hare and the Laplacian tortoise: Computability of squared-error versus absolute-error estimators. Statist. Sci. 12 279–300.
• [29] Rosenbaum, M. and Tsybakov, A. B. (2010). Sparse recovery under matrix uncertainty. Ann. Statist. 38 2620–2651.
• [30] Tibshirani, R. (1996). Regression shrinkage and selection via the Lasso. J. Roy. Statist. Soc. Ser. B 58 267–288.
• [31] van der Vaart, A. W. (1998). Asymptotic Statistics. Cambridge Univ. Press, Cambridge, MA.
• [32] van de Geer, S. A. (2008). High-dimensional generalized linear models and the Lasso. Ann. Statist. 36 614–645.
• [33] van der Vaart, A. W. and Wellner, J. A. (1996). Weak Convergence and Empirical Processes. Springer, New York.
• [34] Zhang, C.-H. and Huang, J. (2008). The sparsity and bias of the Lasso selection in high-dimensional linear regression. Ann. Statist. 36 1567–1594.

#### Supplemental materials

• Supplementary material: Supplement to “ℓ1-penalized quantile regression in high-dimensional sparse models”. We included technical proofs omitted from the main text: Examples of simple sufficient conditions, VC index bounds and Gaussian sparse eigenvalues.


text:
# Reference request Eigenspace decomposition Hodge Laplacian on forms on manifolds with boundary

I know that on a connected, compact, oriented Riemannian manifold without boundary the Hodge Laplacian $$\Delta_k=(d+\delta)^2$$ (acting on $$k$$-forms) admits an orthogonal eigenspace decomomposition of $$L^2\Lambda^k(M)$$, consisting of smooth eigenforms, where all eigenvalues have finite multiplicity, are non-negative and only accumulate at infinity. A reference for this is for instance:

The Laplacian on a Riemannian manifold: An Introduction to Analysis on Manifolds (1997), Cambridge University Press. By Steven Rosenberg [Theorem $$1.30$$]

I was wondering whether the same holds true for compact manifolds with boundary, provided we impose some appropriate boundary conditions. Rosenberg deals first with the case of $$0$$-forms before proving the general result. He mentions after the $$\Lambda^0(M)$$ case, that we may allow boundary if we impose Dirichlet or Neumann boundary conditions. I also found references for this case. However he does not say anything about a similar result for general $$k$$-forms on manifolds with boundary.

So my question is, do we also have an orthogonal eigenspace decomposition of $$L^2\Lambda^k(M)$$ in the case of compact manifolds with boundary (under some appropriate boundary condtions, e.g. vanishing normal component)?

So far I was not able to find any reference for such a result. If anyone is aware of a paper or book dealing with this problem I would highly appretiate it.


text:
# What is constant appreciation?

An example of constant appreciation is simple interest. This is where interest is typically paid on the principal annually. For instance, $1000 is invested in a term deposit at 2% simple interest for 5 years . What is the value of the term deposit at the end of 5 years? 2% of$1000 is $20, so$20 is the constant appreciation. At the end of 5 years, the term deposit would be worth $1100: $1000+5xx\$20.


text:
# Debunking Denialism

Defending science against the forces of irrationality.

## How Modern Genomics Crushed Bigfoot Pseudoscience

Thousands of people around the world believe in the existence of a large primate that roams the mountain forests. It is known by many names, such as Bigfoot, Yeti and Sasquatch. Many of these enthusiasts even claim to have genuine biological samples from these creatures. Skeptics have so far remain unconvinced. No authentic photographs or video material has been produced (the one on the right is a man in a suit) and no bodies have been found. Meanwhile, cryptozoologists complain that scientist are not taking them seriously.

To remedy this problem, Sykes et. al. (2014) requested samples from all over the world, subject them to rigorous decontamination protocols, amplified the DNA and then sequence them in order to find out their identity. Guess what they found?

## Risk Factors: Misunderstandings and Abuses

Although risk factors occupy a central place in medical and epidemiological research, it is also one of the most misunderstood concepts in all of medicine.

The World Health Organization (2009) defines a risk factor as: “A risk factor is any attribute, characteristic or exposure of an individual that increases the likelihood of developing a disease or injury. Some examples of the more important risk factors are underweight, unsafe sex, high blood pressure, tobacco and alcohol consumption, and unsafe water, sanitation and hygiene.” The CDC (2007) offers a similar definition: “an aspect of personal behavior or lifestyle, an environmental exposure, or a hereditary characteristic that is associated with an increase in the occurrence of a particular disease, injury, or other health condition.” However, the CDC also uses the term risk factor when it comes to sexual violence. For instance, they consider alcohol and drug use, antisocial tendencies, hostility towards women, and community-level tolerance to sexual violence.

Based on these sources, we can develop a simplified definition of a risk factor: if A is a risk factor for B, then the presence of A increases (but not necessarily in a causal sense) the probability of B occurring.

A is a risk factor for B does not necessarily mean that A causes B. It might be the case that A causes B only indirectly via some third factor, that B causes A, or that some third factor causes both A and B. In other words, correlation does not on its own imply causation. However, it is possible to disentangle these possibilities by measuring B at the start of the study. If physical punishment of children is a risk factor for aggressiveness, we can find out what comes first by measuring baseline child aggressiveness.

A is a risk factor for B does not mean that A will cause B in every instance of A. Smoking causes lung cancer, but some smokers can smoke all their lives without developing lung cancer. This does not mean that smoking is not a cause of lung cancer. It just means that there are other factors that also play a role. It is common for pseudoscientific cranks to bring up exceptions of this kind to argue against a correlational or causal association in an effort to spread uncertainty and doubt. Read more of this post

## Half of Americans Believe in Medical Conspiracy Theories

An interesting study was recently published in JAMA Internal Medicine by Oliver and Wood (2014). They report the results of a YouGov survey that looked at the acceptance of medical conspiracy theories in the United States and what, if any, effect the belief in medical conspiracy theories had on health-related behavior, such as taking herbal supplements, getting a flu shot and preference for organic foods. The results were chilling as almost half of the U. S. population believed in at least one medical conspiracy. Those who held three or more were less likely to go to the doctor or dentist and fewer got vaccinated against seasonal influenza. They were also more likely to take herbal supplements.

The selection of medical conspiracy theories

Oliver and Wood selected six different medical conspiracy theories to include in their research. Although the researchers did not justify their selection, it seems representative and wide as it spanned from FDA and alternative medicine to discredited beliefs about the origin of HIV Read more of this post

## The Pitfalls of fMRI-Based Lie Detection

A while ago, an interesting paper on the promise and pitfalls of fMRI-based lie detection was published by Farah, Hutchinson, Phelps and Wagner (2014) in Nature Reviews Neuroscience. It is part of an ongoing article series by the journal examining the interplay between neuroscience and law. This installment discussed the reliability of observed associations between certain brain areas and deception, current limitations of fMRI-based lie detectors, how U. S. courts have treated appeal to fMRI data put forward as evidence as well as ethical and legal issues with the procedure. This post will also discuss ways of beating an fMRI-based lie detector.

Another article in that series that deals with common misconceptions about memory, memory distortions and the consequence of ignorance was covered here.

How does fMRI work?

An fMRI indirectly measure brain activity by measuring blood-oxygen-level dependent (BOLD) activity. This typically involve a lot of controls to make sure that researchers capture the neural correlates of what they want to study instead of irrelevant confounders. Typically, researchers compare BOLD activity during deception and truth-telling in an attempt to find the BOLD-signature of deception, which would give clues about the neural correlates of deception (i.e. patterns of brain activation associated with deception).

The theoretical rationale for fMRI-based deception is that there is probably a relationship between deception and cognition because deception is more demanding on memory and various executive functions than truth-telling.

What are the neural correlates of deception?

The paper performed a meta-analysis with the activation likelihood estimation (ALE) method. This is a way to measure overlap in neuroimaging data based on so-called “peak-voxel coordinate information” and thereby find out how reliable the association between deception and certain brain regions is. After applying their specific inclusion criteria, they identified 23 relevant studies. Their meta-analysis identified several areas as being associated with deception e. g. parts of the prefrontal cortex, the anterior insula and inferior parietal lobule. However, the between-study variation was enormous and no region was always identified.

Limitations

Despite the apparent high identification rate of deception, fMRI-based lie detection has a long list of very important limitations that effectively undermine any confidence in this technique for legal purposes Read more of this post

## Butchering Scientific Studies

Sometimes, people who promote pseudoscience online try to reference the scientific literature. In one sense, this is progress. They are going from just making arbitrary assertions to trying to justify them. In another sense, it is a turn for the worse. That is because the papers they reference are either of incredibly low scientific quality or rarely support what is being claimed. However, the behavior gives the illusion of evidential support for some readers. A lot of the time, they damage their own position by spamming long lists of links to videos and blog articles, but some promoters of pseudoscience are more sophisticated.

Previously, I wrote a short introduction on how to counter cranks that reference the scientific literature. Consider this to be the intermediate to advanced version. It will attempt to provide scientific skeptics with additional tools to counter pseudoscience online. The focus will be on research articles, specifically clinical trials. However, the general arguments can often be extended to other forms of research articles. Some of the tools are evidential or methodological in nature and directly related to the meat of the article such as whether or not there was a control group or control for confounders, the appropriateness of the statistical analysis and whether the conclusion accurately reflected the results. Others are more sociological in nature, looking at the journal itself, the presence or absence of peer-review, impact factor, who the authors are etc. These do not necessary count against the research in the article directly and should not be used alone, but provide useful external arguments if combined with criticisms of the study itself. There is of course some overlap between and within these broad categories.

First, a word of warning. Knowledge can be used for good or evil, and this is no exception. It is very dangerous to find oneself in a situation when the studies that run counter to one’s position are subjected to merciless criticisms while the research that support it is being accepted with little or no critical thought. This is known as pseudoskepticism and something to avoid at all cost. It can even undermine the rationality of some of the giants in science seemingly without difficulty. Read more of this post

## How HIV/AIDS Denialists Abuse Bayes’ Theorem

Image by Matt Buck, under Attribution-ShareAlike 2.0 Generic.

Note: Snout (Reckless Endangerment) has made some good arguments in the comment to this post. The gist is that HIV/AIDS denialists overestimate the false positive rate by assuming that the initial test is all there is, when in fact, it is just the beginning of the diagnostic process. Snout also points out that it is probably wrong to say that most people who get tested have been involved in some high-risk behavior, as a lot of screening goes on among e. g. blood donors etc. I have made some changes (indicated by del or ins tags) in this post because I find myself convinced by the arguments Snout made.

There have already been several intuitive introductions to Bayes’ theorem posted online, so there is little point in writing another one. Instead, let us apply elementary medical statistics and Bayes’ theorem to HIV tests and explode some of the flawed myths that HIV/AIDS denialists spread in this area.

The article will be separated into three parts: (1) introductory medical statistics (e. g. specificity, sensitivity, Bayes’ theorem etc.), (2) applying Bayes’ theorem to HIV tests to find the posterior probability of HIV infection given a positive test result in certain scenarios and (3) debunking HIV/AIDS denialist myths about HIV tests by exposing their faulty assumptions about medical statistics. For those that already grasp the basics of medical statistics, jump to the second section.

(1) Introductory medical statistics

A medical test usually return a positive or a negative result (or sometimes inconclusive). Among the positive results, there are true positives and false positives. Among the negative results, there are true negatives and false negatives.

True positive: positive test result and have the disease.
False positive: positive test result and do not have the disease

True negative: negative test result and do not have the disease.
False negative: negative test result and have the disease.

For the purpose of this discussion, $+$ will indicate a positive test, $-$ will indicate a negative test, $HIV$ will indicate having HIV and $\neg HIV$ will indicate not having HIV.

$P(A)$ is the probability of an event A, say, the probability that a fair dice will land on three. Conditional probabilities, such as $P(A \mid B)$, represents the probability of event A, given that event B has occurred. If A and B are statistically independent events, then $P(A \mid B) = P(A)$, if $P(B) \neq 0$ (because the definition of $P(A \mid B)$ has $P(B)$ in the denominator).

Let us define some conditional probabilities that are relevant for HIV tests and Bayes theorem: Read more of this post

## The Widespread Abuse of Heritability

Together with evolution, heritability is perhaps one of the most misunderstood and abused concepts in biology.

Some white supremacists appeal to moderate to high estimates of heritability for phenotypic traits to justify genetic determinism, that genes explain between-group differences, the discrimination of ethnic groups or other malignant and pseudoscientific beliefs that are incompatible with science.

Some egalitarian dislikes scientific results regarding moderate to high heritability estimates because they believe that it indicate that the environment is unimportant in explaining the phenotype of individuals and latch onto single studies showing low heritability as if that meant that genes are less important.

As we shall see, both of these groups believe things that are flawed from a scientific standpoint. But before we discuss why and how this is, it might be beneficial to know something about what heritability actually is. Our definition of heritability will be unpacked and improved in several stages to facilitate understanding. Read more of this post

## Some Falsehoods about the Y chromosome and Male Brains

Note: Greg Laden has made a comment on this post saying that I misrepresented his position. I am open to the possibility and have therefore asked some follow-up questions, but at the time of writing this note (2012-07-26 22:23 GMT +1 DST), Laden has not clarified the situation for me. Keep this in mind while reading this post. Will update this again when he does.

Note: I just noticed (2012-07-28 22:08 GTM +1 DST) that Heina Dadabhoy did not mean what she actually said, but said it as a joke in response to a tweet by Zvan. There is an alternative explanation, namely as a post hoc rationalization when Heina discovered that she had been called on it, but it seems less likely. In essence, this means that we can probably consider both the claim made by Greg and Heina to be jokes or awkwardly expressed science. The only think left now is for Greg to finish writing up his follow-up and/or setting me straight by explaining more in detail in what way I misrepresented him.

Note: As a clarification (2012-07-28 23:06 GMT +1 DST) for Kelseigh Nieforth (@Nezchan), I reject this alternative explanation. It is possible, but relatively implausible. I did not intend to sound “mean-spirited & insulting”, quite the opposite. My intent was to rebuke what I felt was going to be the standard misogynist reply (i.e. claiming that Heina only said it was a joke when she noticed it had gotten a lot of attention and reflected badly upon her).

Note: Greg Laden has clarified his position over at his Scienceblogs blog. The general idea is that testosterone alters the male brain during different stages of development and “damaged” referred to the fact that androgens and other biosocial factors influence certain men to be more statistically likely to exhibit socially noxious and harmful behaviors that are incompatible with progressive, egalitarian and peaceful world. I have no general problems with this position (note added 2012-08-03 20:16 GTM +1 DST).

Note: This blog post has been linked by a men’s rights activist blog. All forms of discrimination is morally wrong, but most men’s rights activism I have come across seems to be equal parts pseudoscience and blanket anti-feminism. I therefore, in general, reject men’s rights activism. This post should not, and cannot, be interpreted as giving men’s rights activism any support, whatsoever (clarification added 2012-08-04 14:14 GMT +1 DST).

The background to this story is that Heina Dadabhoy and Greg Laden, at a panel discussion on gender differences at SkepchickCon/CONvergence, claimed that the Y chromosome was “broken” and that the male brain is a female brain damaged by testosterone. Amidst substantial criticism of these claims, the FtB blogger Stephanie Zvan decided to take upon herself to defend these flawed notions. As we shall see, her attempt is filled with incorrect characterizations and selective use of the scientific literature,

But first, let us make sure we have understood the claims being put forward in the video, so that we do not incorrectly characterize them as something they are not. A video of the panel discussion can be found here. I will post enough of the discussion for context, but readers are encouraged to check if I have gotten everything right. Laden was especially hard to take a transcript of, because he talks very fast and often changes mid-sentence, but hopefully I got the gist. It starts with a question from the audience at 35:41 about the gender differences in autism diagnosis and how males are supposedly more often autistic than females:

Heina Dadabhoy: That is an underdiagnosis issue, actually. They have been doing more and more research on women and autism. A lot of us women who fall on the spectrum only find out when we are adults, because a lot of the behaviors that manifest…the ways that girl tend to manifest it is slightly different and you know a girl who gets obsessed with something they are like “oh, well she is a girl and she has her little obsessions, how cute and when it is a boy it is like “oh, why isn’t he out beating up his peers?” so that is a big issue with autism.

Member in the audience: …inaudible… [probably something to do with differential disease susceptibility between genders e. g. red-green color blindness or hemophilia – E. K.]

Heina Dadabhoy: That is the Y chromosome. It’s broken [Dadabhoy smiles and laughs – E. K.]

Greg Laden: There is… there is … One thing that psychology does…There is some reasonable evidence that certain….There are gender differences.. [inaudible]. But there are gender differences. One of the most important gender differences.. in other words males versus females do not overlap that much at all… in certain areas and one of…one place they do not overlap at all, and you can’t change this… with culture… much..like you can change spatial orientation by giving everyone Tetris when they are born and will be the same. What we can’t change is that, for example, is the number of kids that cannot read until much later…the age at which you start to read and how you have dyslexia and so on that are boys is an order of magnitude higher in girls and you can do everything you want to fix that and you can only fix them a little bit. Most of those differences disappear and are not necessarily that significant, but is real. You know, the male brain is a female brain damaged by testosterone in various stages in it’s life. I think probably there are some very interesting adult difference…you cannot look at at a person and say that, but population differences between males and females that has to do with brain development because hormonal differences and…most of them are probably kind of trivial but there probably are some…yeah autism…I don’t think that is an example of one, but there probably are some things but if we where that different, it would be a hard time communicating…[inaudible].

So, right of the bat we can see that Zvan has incorrectly characterized both what Dadabhoy and Laden had stated. Dadabhoy stated that the Y chromosome was broken, not, as Zvan wants to have it that the Y chromosome is a broken X chromosome. Laden stated that male brain is a female brain damaged by testosterone in various stages in it’s life and did not use the term development. As we shall see, it is these false characterizations that Zvan’s bases her arguments on, but the bigger problem is that Zvan has no scientific foundation for her argument, leading the entire tortuous justification of the notion that men are genetically and neurologically “broken” to collapses onto itself.

The Y chromosome is not broken, but contains 86 unique and functioning genes

In her attempt to justify the absurd notion that men are genetically broken, Zvan appeals to the fact that the Y chromosome cannot recombine with the X chromosome to the same degree that the X chromosome can with another X chromosome. While this is true, this does not justify the original claim that the Y chromosome is a broken X chromosome, or the stronger claim that the Y chromosome is broken. In fact, the Y chromosome contains 86 fully functioning genes and this does not even count the genes that exists on both the X and Y chromosome. For the vast majority of individuals, the Y chromosome is fully functional and does not produce genetic defects or pathology. So nothing is actually “broken”.

X-linked recessive disorders signify a problem with the X chromosome, not the Y one

Zvan points out that males are more at risk for certain heritable disease because the related gene only occurs once, while in females it occurs twice (since they have two X chromosomes). This is also true, but the causative factor is the disabling mutation in the X chromosome that causes the disease, not something to do with the Y chromosome. So in other words, what is “broken” in these cases, is the X chromosome, not the Y.

Lack of large-scale recombination is sometimes a good thing

The loss of an ability for large-scale recombination is not something uniformly bad. In fact, if large-scale recombination between the Y chromosome and X chromosome was possible, it could result in males without the necessary sex-determining or sex-influencing regions in their Y chromosomes and females with harmful genes only found on the Y chromosomes, so the lack of large-scale recombination between X and Y is clearly adaptive. A loss does not need to be evolutionary or physiologically detrimental. Read more of this post

## Genetic Risk Factors and Parental Responsibility

The interaction of nature and circumstance is very close, and it is impossible to separate them with precision. Nurture acts before birth, during every stage of embryonic and pre-embryonic existence, causing the potential faculties at the time of birth to be in some degree the effect of nurture. We need not, however, be hypercritical about distinctions; we know that the bulk of the respective provinces of nature and nurture are totally different, although the frontier between them may be uncertain, and we are perfectly justified in attempting to appraise their relative importance.

- Sir Francis Galton, Inquiries into human faculty and its development (1883).

The nature versus nurture (or biology versus the environment) controversy has raged on for thousands of years. Modern science, however, has rejected this dichotomy as trivially false. It is not nature versus nurture, but nature through nurture. Both play essential roles in shaping organisms such as ourselves and they often interact with each other. However, as Galton remarked above, one could still discuss the relative merits of partial biological and environmental explanations. When people reduce the complex interaction of biology, psychology, biological and social environment to “mostly biology” or “mostly environment”, they are perpetually restraining humanity into the black-and-white cage that is nature versus nurture, despite paying lip service to modern science. Worse is that “mostly biology” is incorrectly interpreted as some form of genetic determinism, whereas “mostly environment” is erroneously conceived as the notion of the blank slate and the hail of vitriolic straw man arguments begin. The fact that some Internet commentators, journalists and other interested parties do not have sufficient scientific understanding, especially with regards to biology and psychology, makes it even more troubling. This, in turn, leads to a lot of misunderstandings about the science.

Clearly not the best setup for an intellectually productive discussion. Read more of this post

## The Intellectual Bankruptcy of Eugenics

For the purpose of this article, eugenics is defined as “the belief that certain individuals should be killed, be forced to undergo sterilization or other be exposed to other coercive measures to prevented them from reproducing in order to protect the population from harm and to ensure the genetic quality of future generations”. I will occasionally attribute other beliefs to eugenics, such as beliefs in “racial purity” or that evolutionary beneficial implies moral, so let’s consider this a working definition for now. Yes, I am aware that there are people who support other forms of eugenics based on voluntarism etc. but those groups are not the target here.

As we shall see, there are many problems with eugenics. It is based on a multitude of scientific falsehoods, has huge practical problems, it is arguably not cost-effective and wildly unethical. Some of these points are somewhat overlapping, but they emphasize specific problems.

1. Eugenics is based on artificial selection, but this is in practice mainly useful for selecting genes with additive effects. However, most genes have interacting effects, making eugenics less efficient, although not impossible.

2. Eugenics is based on a naive view of development. There is hardly never a direct 1:1 relationship between one gene and one phenotypic trait. In general, most traits are polygenic (influenced by many genes) and most genes are pleiotropic (affect many different traits). It is more accurate to think of the situation as a huge, complex network of genes and gene products influencing each other. The heritability of personality traits and certain complex hereditary diseases tend to be moderate (calculated from twin and adoption studies). Using Genome-wide association studies to analyze hundreds of thousands of single nucleotide polymorphisms (SNPs), scientists have found that candidate SNPs can only account for a fraction of his heritability (“missing heritability problem”). This may be accounted for by rare gene variants that are unique for different populations, variation in copy number or genetic interactions.

3. Eugenics is based on a naive view of the power of genes. Genes tend to be risk factors for certain conditions, where environment can act as the trigger. A classical example is the condition know as phenylketonuria (PKU). The genetic risk factor is a mutated version of a gene coding for the enzyme known as phenylalanine hydroxylase that catalyze the hydroxylation of the amino acid phenylalanine to tyrosine. When this is non-functional, phenylalanine accumulates and is converted to phenylketones. This in turn causes mental retardation, brain damage and seizures. An incredibly successful treatment is a diet free of phenylalanine and monitoring of the blood levels of this amino acid. In this case, environmental interventions are more beneficial, cheaper and less unethical than eugenics.

4. If you imagine the general problem outlined in point 3, but instead think of it being hundreds of different genetic and environmental risk factors, then you have an approximate view of most complex human diseases.

5. Even for so called single gene disorders, an individual with one copy of the defect allele and one copy of the healthy allele may have a selective advantage. The classic example is that a person heterozygous for the allele that in the homozygous condition causes sickle-cell anemia has a higher resistance to malaria. The allele, although detrimental in the homozygous condition, is retained in the population by balancing selection. Eliminating gene variants that cause disease in the homozygous condition may lead to less prevalence of individuals with heterozygous advantage. Read more of this post

## Belief and Knowledge

Helen Quinn is a particle physicists at the Stanford Linear Accelerator Center and a former president of the American Physical Society and also has been involved in science education and the public understanding of science. Quinn has written an extremely important article that was published a few years ago in the journal Physics Today called Belief and knowledge—a plea about language, dealing with how well-defined scientific concepts are sometimes misunderstood and even abused by the public, which is often incredibly frustrating.

Quinn starts with a personal anecdote: as her husband where describing the topic of his thesis to a layperson, which was using a coincidence set up for to see that two particles detected simultaneously where most likely coming from the same event.

I remember the puzzlement of a friend as my husband described his thesis research—a coincidence experiment. His listener stopped listening; she was thinking about why anyone would try to measure coincidences. I pointed out that the word “coincident” simply means “occurring at the same time.” The experiment used its precise timing to ensure that two particles detected at the same time had a very high probability of coming from the same source event. Thus the term coincidence was used in a sense opposite to the everyday meaning, where a coincidence is two uncorrelated events that come together. Words shift their meaning; each community develops its own usage. That change in meaning leads to miscommunication.

Quinn points out that this problem does not just arise with the term coincident, but with other terms, such as theory and energy and explains how this can lead to misunderstanding of science. Read more of this post

## Summary of Victor Stenger’s Case against the Fine-tuning Argument

Victor Stenger is a physicist, philosopher and prolific author, and has recently published the book The Fallacy of Fine-tuning: Why the Universe is Not Designed for Us. It contains perhaps the best currently existing response to the creationist argument from fine-tuning from the perspective of physics. Now, other philosophical and mathematical responses exists, but this is a comprehensive overview of the scientific case against the fine-tuning argument. I will summarize some of the more interesting parts of Stenger’s case below by paraphrasing certain parts of the last part of the final chapter in the book (pp. 293-294) as well as mentioning other problems mentioned in other parts of the book.

1. Many proponents of the fine-tuning argument quote Stephen Hawking out of context to try and show that Hawking thinks that the expansion rate of the universe is fine-tuned. In reality, Hawking just lists this problem as a problem for the big bang theory before cosmological inflation is taken into account. When it is, the fine-tuning problem of the expansion rate goes away.

2. Many proponents of the fine-tuning argument appeal to the singularity theorem proved by Hawking and Penrose in order to try and established that the universe began in a singularity. However, a singularity would be very massive and have infinitesimal volume. This is forbidden in quantum mechanics due to Heisenberg’s uncertainty principle, which states (in one of its versions) that the uncertainty in momentum times the uncertainty in position cannot be less than a specific non-zero number. Thus, the theorem proved by Hawking and Penrose is not applicable anymore.

3. Claims about fine-tuning are made against the backdrop of our particular form of life, yet other forms of life may be possible. Read more of this post

## The Top Five Most Annoying Statistical Fallacies

Mathematical statistics and probability is hard. It often involves what, at a first glance, involves complicated calculations and the sheer volume of data coming out of some studies can often be hard to interpret, even if you know all of the mathematics behind it. Although it is important to understand the math, it is equally important (or perhaps even more important) to understand what the results mean and don’t mean. It is easy to get dazzled by fancy mathematics or over-interpret results to mean something they really do not. Therefore, a basic understanding of statistical fallacies should be a part of every scientific skeptics toolbox or baloney detection kit.

Here is a list of the most common statistical fallacies, what they are and how to combat them.

1. Confusing correlation with causation

A correlation is when two variables vary together, whereas. For instance, ice cream sales may increase in the summer and decrease in the winter. The same may be true for drowning accidents. Does this mean we can draw the conclusion that drowning accidents causing ice cream sales? Does this mean that people have become so selfish and morally vile that they prefer to buy ice cream and watching people drown than trying to save them!? Fortunately, not really. Just because two variables vary together does not mean that one caused the other. It might be that the other caused the first, that they both cause each other or that a third factor causes both. In the case of ice cream sales and drowning accidents, a third factor that probably explain the correlation is season. In the summer, more people eat ice cream and go bathing, but fewer to these things in the winter. Confusing correlation with causation is widespread in many areas of pseudoscience, such as the anti-vaccination movement; one of their claims is that as the number of vaccines given have increased, so has the rates of cancer. This shows that the two factors correlate, not that vaccines caused cancer (in fact, the vaccine against HPV and Hepatitis B can prevent cancers) is a correlation, not a causation. A more likely factor is better healthcare as a third factor; better healthcare has meant more vaccines, but also increased lifespan, which is associated with an increase in the risk of cancer.

2. Post hoc

Post hoc and denotes the fallacy of thinking that A causes B just because B follows A in time. This fallacy, like the fallacy of confusing correlation with causation, is understandable from an evolutionary perspective. Those that where too skeptical of attributing an upset stomach to poisonous berries where less likely to reproduce. However, this kind of instinct-based reasoning can no longer be thought of as justified in our modern society Read more of this post

## Symphony of Science: Combining the Awe and Wonder of Science with Music

John Boswell is a musician and producer that has made some of the best music videos about science ever. According to his website, called The Symphony of Science, the “goal of the project is to bring scientific knowledge and philosophy to the public, in a novel way, through the medium of music. Science and music are two passions of mine that I aim to combine, in a way that is intended to bring a meaningful message to listeners, while simultaneously providing an enjoyable musical experience”. He does this by remixing and tuning spoken words by scientists and putting them together with photos and clips from lectures given by them. The videos and audio can be downloaded at the website, but the videos are also posted on Youtube.

At the time of this writing, there are 17 videos of pure awesomeness.

Watch them, rate them, add to favorites and spread the beautiful message of science. Boswell has hit upon an idea that may transform the way the general population views science. It is an enormously powerful approach.

## What is Scientific Methodology?

What exactly is science? Thinkers from Aristotle to Larry Laudan have pondered some version of this question and come up with different explanations or criteria. Most of us have seen the linear method containing steps like coming up with an idea, testing it and evaluating the results. This, however, is an oversimplification and the real process of science. This does not mean that rules of thumb like falsifiability is wrong or unhelpful, however, science is much more dynamic, combining interacting features such as exploration, testing, interaction with society and communicating results in the peer-review literature.

There are many factors influencing the start of scientific exploration. It could be a practical problem, like how to reduce smog from a major city or treat malaria, it could be due to the development of new technology, such as biotelemetry equipment that reduces effects of measurements in animal research, or simply unintentional accidents, like Alexander Flemming’s discovery of penicillin. It can also be due to being put into a research group, talking to academic advisers, reading an exciting new article in the peer-review literature and so on.

When designing an experiment in many areas of science, a null hypothesis is often tested. This is usually stated as no statistically significant different between two groups, two treatments or two physical variables. Results can often be confusion, hard to interpret or inconclusive. This spurs further research, trying to fix the problems or approach the issue from a different angle. Often an experiment needs to be useful, coherent and cost-effective.

Research is often published in the peer-review literature, presented at scientific conferences, discussed with colleagues and used to build upon the state of knowledge by improving explanations and models or replicating already existing research in order to critically evaluate it.

Some of this knowledge can be used to improve our life and society, from finding the link between smoking and lung cancer and treating infections to renewable sources of energy and designing smarter computers.


text:
"Flat spots” are computed by dividing the sample space of a time series into ten equal-sized intervals, and computing the maximum run length within any single interval.

longest_flat_spot(x)

## Arguments

x a vector

A numeric value.


text:
# How to move a point onto a line, but leave it alone if it is already on the line? [closed]

Let say I have a given point and a line. The point may be on the line or not. How to make sure that this line remains in place, while I need to move the point to the line, only if it is not on the line. See this image:

-

## closed as not a real question by BenjaLim, Henning Makholm, Leonid Kovalev, Chris Eagle, rschwiebAug 14 '12 at 16:59

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Could you perhaps rephrase the last two sentences? What do you mean by line always remaining on line and moving line only if it is not on line? – T. Eskin Apr 23 '12 at 11:52
@ThomasE., I have added an image – user960567 Apr 23 '12 at 11:58
What do you mean by "line remain on line"? – dtldarek Apr 23 '12 at 11:58
Why should we expect that the point won't remain on the line if you place it on the line? Your question implies some dynamical process, but you don't provide any context. -1 – Raskolnikov Apr 23 '12 at 12:07
Are you looking for the general formula for a general line through a fixed point? – Mark Bennet Apr 23 '12 at 12:23

In case you are asking how to project point onto a line, then there is a simple formula for an orthogonal projection which can be done as follows. Let $v$ be the vector denoting the line, then

$$x' = \frac{\langle v, x \rangle}{\langle v, v \rangle}\cdot v$$

where

$$\langle a, b \rangle = \sum_i a_i\cdot b_i$$

is the standard scalar product. In 2D the whole formula will look like below:

let $P = (P_x, P_y)$ and $Q = (Q_x, Q_y)$ will be two points the line passes through, then $v = P-Q = (P_x-Q_x, P_y-Q_y)$ and the projection of $R = (R_x, R_y)$ denoted as $R' = (R_x', R_y')$ can be calculated by the formula:

$$(R_x', R_y') = \frac{(R_x-Q_x)\cdot v_x + (R_y-Q_y)\cdot v_y}{v_x^2+v_y^2}\cdot(v_x, v_y) + (Q_x, Q_y).$$

Of course this can be easily generalized to higher dimensions. Cheers!

-
Yes. Thanks. Why so many -ve votes. – user960567 Apr 23 '12 at 17:41


text:
# Elementary function (differential algebra)

For simple functions see List of mathematical functions

In differential algebra, an elementary function is a function built from a finite number of exponentials, logarithms, constants, one variable, and roots of equations through composition and combinations using the four elementary operations (+ − × ÷). The trigonometric functions and their inverses are assumed to be included in the elementary functions by using complex variables (i = √-1) and the relations between the trigonometric functions and the exponential and logarithm functions.

The roots of equations are the functions implicitly defined as solving a polynomial equation with constant coefficients. For polynomials of degree four and smaller there are explicit formulas for the roots (the formulas are elementary functions), but even for higher degree polynomials the fundamental theorem of algebra and the implicit function theorem assures the existence of a function that returns each one of the roots of a polynomial equation.

Examples of elementary functions include:

[itex]\frac{e^{\tan(x)}}{1-x^2}\sin\left(\sqrt{1+\ln^2 x}\,\right)[itex]

and

[itex] \,\ln(-x^2) [itex].

The domain of this last function does not include any real number. An example of a function that is not elementary is the error function

[itex]\mathrm{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt,[itex]

a fact that cannot be seen directly from the definition of elementary function but can be proven using the Risch algorithm.

Elementary functions where introduced by Joseph Liouville in a series of papers from 1833 to 1841. An algebraic treatment of elementary functions was started by Joseph Fels Ritt in the 1930s.

## Differential algebra

The mathematical definition of an elementary function is done in the context of differential algebra. A differential algebra is an algebra with the extra operation of derivation (algebraic version of differentiation). Using the derivation operation new equations can be written and their solutions used in extensions of the algebra. By starting with the field of rational functions, two special types of transcendental extensions (the logarithm and the exponential) can be added to the field building a tower containing elementary functions.

A differential field F is a field F0 (rational functions over the rationals Q for example) together with a derivation map u → ∂u. (Here ∂u is a new function. Sometimes the notation u ′ is used.) The derivation captures the properties of differentiation, so that for any two elements of the base field, the derivation is linear

[itex]\partial (u + v) = \partial u + \partial v [itex]

and satisfies the Leibniz' product rule

[itex]\partial(u\cdot v)=\partial u\cdot v+u\cdot\partial v\,.[itex]

An element h is a constant if ∂h = 0. If the base field is over the rationals, care must be taken when extending the field to add the needed transcendental constants.

A function u of a differential extension F[u] of a differential field F is an elementary function over F if the function u

• is algebraic over F, or
• is an exponential, that is, ∂u = ua for aF, or
• is a logarithm, that is, ∂u = ∂a / a for aF.

## Reference

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy


text:
## Elementary Statistics (12th Edition)

O is the observed frequency (which is given): O=23. E is the expected outcome (sum of the frequencies divided by the number of categories): $E=\frac{23+23+21+21+19}{5}=21.4.$


text:
## Advice and help needed asap!!

Hi there.
I last had intercourse at the beginning of may and at the end, although I did have a period which started on the 8th June I have not had one since and I frequently feel sick and have headaches. Also every now an again I get slight sharp pains in my stomach. A few friends have said that I look to have put on a bit of weight and this is making me a little bit worried that I might be expecting. I'm just confused because of the time and the fact I have had a period since the deed happened..


text:
# NEET Questions Solved

NEET - 2016

The interference pattern is obtained with two coherent light sources of intensity ratio n. In the interference pattern, the ratio $\frac{{I}_{max}-{I}_{min}}{{I}_{max}+{I}_{min}}$ will be

(a) $\frac{\sqrt{n}}{n+1}$             (b) $\frac{2\sqrt{n}}{n+1}$

(c) $\frac{\sqrt{n}}{{\left(n+1\right)}^{2}}$         (d) $\frac{2\sqrt{n}}{{\left(n+1\right)}^{2}}$

(b) It is given that $\frac{{l}_{2}}{{l}_{1}}=n⇒{l}_{2}=n{l}_{1}$

Ratio of intensites is given by

$\frac{{l}_{max}-{l}_{min}}{{l}_{max}+{l}_{min}}=\frac{{\left(\sqrt{{l}_{2}}+\sqrt{{l}_{1}}\right)}^{2}_{\left(\sqrt{{l}_{2}}-\sqrt{{l}_{1}}\right)}^{2}}{{\left(\sqrt{{l}_{1}}+\sqrt{{l}_{2}}\right)}^{2}+{\left(\sqrt{{l}_{2}}-\sqrt{{l}_{1}}\right)}^{2}}$

$=\frac{{\left(\sqrt{\frac{{l}_{2}}{{l}_{1}}}+1\right)}^{2}-{\left(\sqrt{\frac{{l}_{2}}{{l}_{1}}-1}\right)}^{2}}{{\left(\sqrt{\frac{{l}_{2}}{{l}_{1}}}+1\right)}^{2}+{\left(\sqrt{\frac{{l}_{2}}{{l}_{1}}-1}\right)}^{2}}$

$=\frac{{\left(\sqrt{n}+1\right)}^{2}-{\left(\sqrt{n}-1\right)}^{2}}{{\left(\sqrt{n}+1\right)}^{2}+{\left(\sqrt{n}-1\right)}^{2}}=\frac{2\sqrt{n}}{n+1}$

Difficulty Level:

• 10%
• 54%
• 21%
• 16%
Crack NEET with Online Course - Free Trial (Offer Valid Till September 22, 2019)


text:
Solve the cubic equation:

$$3x^3+6x^2+4x+1=0$$

Since the discriminant $$\Delta >0$$, the cubic equation has one real root and two conjugate complex roots.

$$\Delta=0.00034293552812071$$

$$\begin{cases} x_1=-1 \\ x_2=-\dfrac{1}{2}+\dfrac{\sqrt{3}}{6}i \\ x_3=-\dfrac{1}{2}-\dfrac{\sqrt{3}}{6}i \end{cases}$$

In decimals,

$$\begin{cases} x_1=-1 \\ x_2=-0.5+0.28867513459481i \\ x_3=-0.5-0.28867513459481i \end{cases}$$

Detailed Steps on Solution

If a cubic equation has a rational root, the root could be a fracion number with a factor of constant term as the numerator and a factor of the coefficient of leading term as the denumerator.

1. Factorization Method

Find all possible factors for constant $$1$$, which are,

$$1$$

$$-1$$

and all possible factors of the coefficient of the leading term $$3$$,

$$1, 3$$

$$-1, -3$$

Dividing factors of constant term by those of the cubic term one by one gives the following fractions.

$$1, -1, \dfrac{1}{3}, -\dfrac{1}{3},$$

Substitute the fractions to the function $$f(x) = 3x³ + 6x² + 4x + 1$$ one by one to find out the one that makes $$f(x) = 0$$.

According to the factor theorem, $$f(n) = 0$$, if and only if the polynomial $$3x³ + 6x² + 4x + 1$$ has a factor $$x-n$$, that is, $$x=n$$ is the root of the equation.

Fortunetely, one of the numbers is found to make the equation equal.

$$f(-1) = 3(-1)³ + 6(-1)² + 4(-1) + 1 = 0$$

then, $$x = -1$$ is one of roots of the cubic equaiton $$3x³ + 6x² + 4x + 1 = 0$$. And, the equation can be factored as

$$(x +1)(ax^2+bx+c) = 0$$

Next we can use either long division or synthetic division to determine the expression of trinomial

Long division

Divide the polynomial $$3x³ + 6x² + 4x + 1$$ by $$x + 1$$

 3x² +3x +1 x + 1 3x³ +6x² +4x +1 3x³ +3x² 3x² +4x 3x² +3x x +1 x +1 0

Now we get another factor of the cubic equation $$3x² + 3x + 1$$

Solve the quadratic equation: $$3x² + 3x + 1 = 0$$

Given $$a =3, b=3, c=1$$,

Use the root solution formula for a quadratic equation, the roots of the equation are given as

\begin{aligned} \\t&=\dfrac{-b\pm\sqrt{b^2-4ac} }{2a}\\ & =\dfrac{-3\pm\sqrt{3^2-4\cdot 3\cdot 1}}{2 \cdot 3}\\ & =\dfrac{-3\pm\sqrt{-3}}{6}\\ & =-\dfrac{1}{2}\pm\dfrac{\sqrt{3}}{6}i\\ \end{aligned}

Since the discriminat is less than zero, we get another two complex roots:

That is,

$$\begin{cases} t_2 =-\dfrac{1}{2}+\dfrac{\sqrt{3}}{6}i \\ t_3=-\dfrac{1}{2}-\dfrac{\sqrt{3}}{6}i \end{cases}$$

Another method to find the roots of a general cubic equation is simplifing it to a depressed form. This method is applicable to all cases, especially to those difficult to find factors.

2. Convert to depressed cubic equation

The idea is to convert general form of cubic equation

$$ax^3+bx^2+cx+d = 0$$

to the form without quadratic term.

$$t^3+pt+q = 0$$

By substituting $$x$$ with $$t - \dfrac{b}{3a}$$, the general cubic equation could be transformed to

$$t^3+\dfrac{3ac-b^2}{3a^2}t+\dfrac{2b^3-9abc+27a^2d}{27a^3} = 0$$

Compare with the depressed cubic equation. Then,

$$p = \dfrac{3ac-b^2}{3a^2}$$

$$q = \dfrac{2b^3-9abc+27a^2d}{27a^3}$$

Substitute the values of coefficients, $$p, q$$ is obtained as

$$p = \dfrac{3\cdot 3\cdot 4-6^2}{3\cdot 3^2}=0$$

$$q = \dfrac{2\cdot 6^3-9\cdot3\cdot 6\cdot 4+27\cdot 3^2\cdot1}{27\cdot 3^3}=\dfrac{1}{27}$$

Use the substitution to transform

Let $$p$$ and $$q$$ being the coefficient of the linean and constant terms, the depressed cubic equation is expressed as.

$$t^3 +pt+q=0$$

Let $$x=t-\dfrac{2}{3}$$

The cubic equation $$3x³ + 6x² + 4x + 1=0$$ is transformed to

$$t^3 +\dfrac{1}{27}=0$$

For the equation $$t^3 +\dfrac{1}{27}$$, we have $$p=0$$ and $$q = \dfrac{1}{27}$$

Calculate the discriminant

The nature of the roots are determined by the sign of the discriminant.

\begin{aligned} \\\Delta&=\dfrac{q^2}{4}+\dfrac{p^3}{27}\\ & =\dfrac{\Big(\dfrac{1}{27}\Big)^2}{4}+0\\ & =\dfrac{1}{2916}\\ & =0.00034293552812071\\ \end{aligned}

2.1 Use the root formula directly

If the discriminant is greater than zero, we can use the root formula to determine the roots of the cubic equation.

$$t_{1,2,3} =\begin{cases} \sqrt[3]{-\dfrac{q}{2}+\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} } } +\sqrt[3]{-\dfrac{q}{2} -\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} }}& \\ ω\cdotp \sqrt[3]{-\dfrac{q}{2}+\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} } } + \overline{ω} \sqrt[3]{-\dfrac{q}{2} -\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} }}&\ \\ \overline{ω}\cdotp \sqrt[3]{-\dfrac{q}{2}+\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} } } + ω\cdotp \sqrt[3]{-\dfrac{q}{2} -\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} }} \end{cases}$$

in which, $$ω = \dfrac{-1+i\sqrt{3}}{2}$$ and $$\overline{ω} =\dfrac{-1-i\sqrt{3}}{2}$$

Substitute the values of $$p, q$$ and $$\Delta$$ which we have calculated. Then,

\begin{aligned} \\t_1&=\sqrt[3]{-\dfrac{1}{54}+\sqrt{\dfrac{1}{2916}}}+\sqrt[3]{-\dfrac{1}{54}-\sqrt{\dfrac{1}{2916}}}\\ & =\sqrt[3]{-\dfrac{1}{54}+\dfrac{1}{54}}+\sqrt[3]{-\dfrac{1}{54}-\dfrac{1}{54}}\\ & =\sqrt[3]{\dfrac{-1}{2\cdot 3^3}+\dfrac{1}{2\cdot 3^3}}+\sqrt[3]{\dfrac{-1}{2\cdot 3^3}-\dfrac{1}{2\cdot 3^3}}\\ & =\dfrac{1}{3}\Big(\sqrt[3]{\dfrac{-1}{2}+\dfrac{1}{2}}+\sqrt[3]{\dfrac{-1}{2}-\dfrac{1}{2}}\Big)\\ & =-\dfrac{1}{3}\\ \end{aligned}

If we denote

$$R = -\dfrac{q}{2}+\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} }$$

$$\overline{R} = -\dfrac{q}{2} -\sqrt{\dfrac{q^2}{4}+\dfrac{p^3}{27} }$$

then,

$$\sqrt[3]{R} = 0$$, $$\sqrt[3]{\overline{R}} =-\dfrac{1}{3}$$

\begin{aligned} \\t_2&= ω\cdotp \sqrt[3]{R}+ \overline{ω} \sqrt[3]{\overline{R} }\\ & =\dfrac{-\sqrt[3]{R}-\sqrt[3]{\overline{R} }}{2} +\dfrac{\sqrt{3}( \sqrt[3]{R} - \sqrt[3]{\overline{R} }) }{2} i\\ & =\dfrac{1}{2}\Big[0-\Big(-\dfrac{1}{3}\Big)\Big]+\dfrac{\sqrt{3}}{2}\Big[0-\Big(-\dfrac{1}{3}\Big)\Big]i\\ & =\dfrac{1}{6}+\dfrac{\sqrt{3}}{6}\\ \end{aligned}

\begin{aligned} \\t_3&= \overline{ω}\cdotp \sqrt[3]{R}+ ω\cdotp \sqrt[3]{\overline{R}}\\ & =\dfrac{-\sqrt[3]{R}-\sqrt[3]{\overline{R} }}{2} +\dfrac{\sqrt{3}(- \sqrt[3]{R} + \sqrt[3]{\overline{R} }) }{2}i \\ & =\dfrac{1}{2}\Big[0-\Big(-\dfrac{1}{3}\Big)\Big]-\dfrac{\sqrt{3}}{2}\Big[0-\Big(-\dfrac{1}{3}\Big)\Big]i\\ & =\dfrac{1}{6}-\dfrac{\sqrt{3}}{6}\\ \end{aligned}

Roots of the general cubic equation

Since $$x = t - \dfrac{b}{3a}$$, substituting the values of $$t$$, $$a$$ and $$b$$ gives

$$x_1 = t_1-\dfrac{2}{3}$$

$$x_2 = t_2-\dfrac{2}{3}$$

$$x_3 = t_3-\dfrac{2}{3}$$

3. Summary

In summary, we have tried the method of factorization, cubic root formula to explore the solutions of the equation. The cubic equation $$3x³ + 6x² + 4x + 1=0$$ is found to have one real root and two complex roots. Exact values and approximations are given below.

$$\begin{cases} x_1=-\dfrac{1}{3}-\dfrac{2}{3} \\ x_2=\dfrac{1}{6}+\dfrac{\sqrt{3}}{6}-\dfrac{2}{3} \\ x_3=\dfrac{1}{6}-\dfrac{\sqrt{3}}{6}-\dfrac{2}{3} \end{cases}$$

in decimal notation,

$$\begin{cases} x_1=-1 \\ x_2=-0.5+0.28867513459481i \\ x_3=-0.5-0.28867513459481i \end{cases}$$

Using the method of factorization, the roots are derived to the following forms

$$\begin{cases} x_1=-1 \\ x_2=-\dfrac{1}{2}+\dfrac{\sqrt{3}}{6}i \\ x_3=-\dfrac{1}{2}-\dfrac{\sqrt{3}}{6}i \end{cases}$$

The decimal results by using factorization method are

$$\begin{cases} x_1=-1 \\ x_2=-0.5+0.28867513459481i \\ x_3=-0.5-0.28867513459481i \end{cases}$$

4. Math problems derived by the cubic equation

It is found that the methods of factorizaiton and using cubic root formula yield the roots for the cubic equation in different forms. However, their deicmal results show that they are equal in values. Comparing the real roots, we get the equation.

$$-\dfrac{1}{3}-\dfrac{2}{3}=-1$$

Similarly, comparison of the imaginary parts of complex roots yields the following equation.

$$=\sqrt{\dfrac{1}{2}}$$

5. Graph for the function $$f(x) = 3x³ + 6x² + 4x + 1$$

Since the discriminat is greater than zero, the curve of the cubic function $$f(x) = 3x³ + 6x² + 4x + 1$$ has one intersection point with the x-axis.

Scroll to Top


text:
# hofmann elimination product

Nach zwanzig Jahren in Key Concepts: Terms in this set (10) Zaitsev products . rev 2020.11.12.37996, The best answers are voted up and rise to the top, Chemistry Stack Exchange works best with JavaScript enabled, Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, Learn more about hiring developers or posting ads with us, I think I would need a sketch of the products …. Diese Beobachtung legte die The key difference between Saytzeff and Hofmann rule is that Saytzeff rule indicates that the most substituted product is the most stable product, whereas Hofmann rule indicates that the least substituted product is the most stable product.. Saytzeff rule and Hofmann rule are very important in predicting the end product of an organic elimination reaction. Die Hofmann-Eliminierung ermöglicht die Darstellung niedrig substituierter Olefine. As to your first paragraph, to say that the Zaitsev product is the thermodynamic product does not imply that it was formed under thermodynamically controlled conditions. Test. Background Image vs Reference Image - What are the pros and cons of these methods? dass sich Tetraehylammoniumiodid unter Nachweisreaktion, um die Lage eines N-Atoms innerhalb von komplizierten STUDY. sich mit der Synthese von chemischen Grundstoffen und insbesondere von Why is there 5GB of unallocated space on my disk on Windows 10 machine? Chemistry Stack Exchange is a question and answer site for scientists, academics, teachers, and students in the field of chemistry. To learn more, see our tips on writing great answers. The reaction involves the formation of a quaternary ammonium iodide salt by treatment of the amine with excess methyl iodide (exhaustive methylation), followed by treatment with silver oxide and water to form a quaternary ammonium hydroxide. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. Sometimes referred to as the Hofmann Degradation. Hofmann elimination, also known as exhaustive methylation. Prof. August Wilhelm von Hofmann (1818-1892). Das Feature Preview: New Review Suspensions Mod UX, Creating new Help Center documents for Review queues: Project overview, “Tie-breaker” rules for IUPAC nomenclature of organic compounds, Exocyclic vs. endocyclic double bonds in E1 elimination. Doch auch die Möglichkeit, ansonsten schlecht zugängliche Has there been a naval battle where a boarding attempt backfired? Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. London kam Hofmann schliesslich nach Deutschland zurück, wo er in Bonn und Dort entdeckte Hofmann Melville's chain of thought in the "great democratic God" passage in "Moby-Dick". This elimination reaction of alkyl trimethyl amines proceeds with anti-stereochemistry, and is generally suitable for producing alkenes with one or two substituents.The reaction follows the Hofmann Rule. PLAY. Hofmann Elimination. The ratio of Zaitsev/Hofmann (Z/H) products in the hydroxide elimination of 2-bromo-2-methylbutane is not necessarily the same as the Z/H ratio in the acid-catalyzed equilibration of the two isomers. Hofmann-Eliminierung. Im ersten Teilschritt muss durch eine To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Hitzeeinfluss zu Ethen und Triethylamin zersetzte. In this reaction, least stable alkene is formed, i.e., the one with least number of Alpha hydrogen. Use MathJax to format equations. Empfehlung von Liebig als Professor nach London ging. On this basis, the teacher said that the alkene with the $\ce {-OH}$ substituent was more substituted and hence, it was the Zaitsev product while the other alkene was the Hofmann product. What is the name of this game with a silver-haired elf-like character? Cope-Eliminierung, Organic Chemistry Portal: Thanks for contributing an answer to Chemistry Stack Exchange! By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. How can a chess game with clock take 5 hours? Of course, it is known that tautomerisation would occur for such an alkene product as it is an enol. Die Saytzeff-Regel (auch Saizew-, Saytzev-, Zaitsev- oder Zajcev-Regel) ermöglicht eine Vorhersage über das bei einer chemischen Eliminierungsreaktion entstehende Produkt. Flashcards. more highly substituted alkene of the two possible outcomes. Doppelbindungen synthetisieren zu können, ist wertvoll. nach SN2 als Nebenreaktion auftreten. Russ_Puckett8. Match. Da die sterischen Verhältnisse im However, let us ignore this fact in this case. It is known that, with regard to the elimination reaction, the Zaitsev product is the thermodynamically more stable product, which is also often the more substituted alkene while the Hofmann product is the thermodynamically less stable product and is usually the less substituted alkene. Rechtswissenschaften, änderte seine Fachrichtung allerdings nach Besuch von C-Gerüsten zu bestimmen. Verwandte Reaktionen: Hofmann-Regel Organic Chemistry Portal: Saytzeff's Rule Saytzeff-Regel. How should I visualize the average of two bars in a bar chart? This is because the basis of the thermodynamic stability lies in hyperconjugation with $\ce {C-H}$ and $\ce {C-C}$ bonds. site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa. Zaitsev products (picture) Hoffman products. Use of "eben – does it mean just, also or even? Is there a puzzle that is only solvable by assuming there is a unique solution? schwache Base in geringer Konzentration vorhanden ist: An C-α kann nucleophile Substitution zudem, dass die Umsetzung von Anilin mit Ethyliodid bei völligem Less substituted alkene of the two possible outcomes. Wasserausschluss ein Salz ergab. Grundlage für die Entwicklung der Hofmann-Eliminierung. Can the $\ce {-OH}$ group be considered to have increased the degree of substitution of an alkene and hence, allow it to be identified as the "Zaitsev product"? It only takes a minute to sign up. To disregard tautomerization, perhaps the case of a halogen substitutent should be considered instead of the OH? Dazu zählen vor allem Created by. greift ein Hydroxid-Ion an, welches in der Gegenwart von Silber(I)-Oxid als Tetraalkylammoniumsalzen zeigt sich z.B. den Hofmann-Regeln statt. Giessen, dann wurde er kurzzeitig Privatdozent in Bonn, bis Hofmann auf I have always thought that the substituents refer to alkyl groups. Bei weiteren Versuchen mit einigen Vorlesungen zur Chemie von Liebig ab. Früher war die Hofmann-Elimierung eine wichtige Nachweisreaktion, um die Lage eines N-Atoms innerhalb von komplizierten C-Gerüsten zu bestimmen. Are bleach solutions still routinely used in biochemistry laboratories to rid surfaces of bacteria, viruses, certain enzymes and nucleic acids? Learn. Mechanismus. Asking for help, clarification, or responding to other answers. Would the Millennium Falcon have been carried along on the hyperspace jump if it stayed attached to the Star Destroyer? In London beschäftigte er "erschöpfende Methylierung" ein Ammoniumsalz hergestellt werden. What could cause SQL Server to deny execution of a SP at first, but allow it later with no privileges change? Making statements based on opinion; back them up with references or personal experience. [4], "Researches into the molecular constitution of the organic bases", Philosophical Transactions of the Royal Society of London, "Beiträge zur Kenntniss der flüchtigen organischen Basen", "Ueber den Nachweis und die Bestimmung des am Stickstoff gebundenen Alkyls", Berichte der deutschen chemischen Gesellschaft, An animation of the mechanism of the Hofmann elimination, https://en.wikipedia.org/w/index.php?title=Hofmann_elimination&oldid=978016169, Creative Commons Attribution-ShareAlike License, This page was last edited on 12 September 2020, at 10:57. I would like to ask if this identification was made correctly. Früher war die Hofmann-Elimierung eine wichtige Die Hofmann-Eliminierung ermöglicht die Darstellung niedrig substituierter Olefine. Die Saytzeff-Regel besagt, dass basenkatalysierte Eliminierungen nach E 2 (sogenannte bimolekulare Eliminierungen, d.h. zwei Moleküle sind an der Reaktion beteiligt) so ablaufen, dass die thermodynamisch günstigere Doppelbindung entsteht - also die höher substituierte. Zaitsev and Hofmann Elimination Products. The product of this reaction is a quaternary ammonium salt which is a good leaving group in the form a neutral amine: The E2 elimination leading to an alkene is accomplished with a hydroxide ion which is formed in situ when the substrate is heated with Ag 2 O: This is called the Hofmann elimination reaction.

Types Of Biochemical Processes, Butterfly Paragraph In Bengali, Sweet Pickled Jalapenos Recipe, Best Settings For Fortnite Ps4, Trainee Teacher Reflective Journal, Pus Cells In Urine 2-4 Hpf, Men's Pink Polo Shirt, Pension Asset Allocation, Boston Butt Meal Ideas,


text:
## Articles published in Uncategorized

So, you’ve taken a practice test!  Maybe you’re closing in on the score you want, or maybe you still have some distance left to travel.  Regardless of which scenario applies to you, “reading” your practice test data is an incredibly crucial element to GRE progress!

I write this assuming I don’t need to discuss looking at your score, comparing overall quantitative to overall verbal, etc.  Everyone looks at the ‘big’ numbers.  The question is, what eureka moments can we gain from a deeper analysis?

There are three components to analyzing a practice test: analyzing timing, analyzing accuracy by question type, and analyzing accuracy by topic tested.

Analyzing Timing

You can’t analyze your timing until you know what your timing should look like.

Does anything stand out to you in image above?  Why do some questions take you less than one minute, while some take more than three?  We expect some variation across different questions – Reading Comprehension should take longer than Text Completion or Sentence Equivalence, and Data Interpretation questions (especially the first DI question) will usually take longer than Quantitative Comparison.  But why are there such wide swings in question time within the QC question?  And I can’t help but notice that the two Discrete Quantity questions both took less time than the vast majority of the QC questions.  Perhaps this is someone who is skilled in math, but doesn’t yet truly grasp the logic underlying the QC questions.

A review of QC as a question type is probably called for from this practice test.

Another element of timing is more fundamental (and the above image captures this concept also).  Do you know when to let a question go, guess, and move on to the next question?  Any time you spent three minutes on a question, you had a problem letting go.  Right or wrong, that question hurt you.

Bottom line, when you analyze timing in a practice test, you want to see two things: 1) question by question timing – were you able to let a question go when needed, and 2) question type timing – do you have the desired timing for each question type?

Now it’s time to Generate an Assessment Report!!!  (It’s exciting because it’s got three exclamation points 🙂  )

Analyzing Accuracy by Question Type

Take a few moments and see what you can find in the image above.  Don’t worry, I’ll wait  🙂

Seriously, there’s a lot you should consider here.  If you haven’t been looking for at least 5 minutes, you haven’t spent enough time.  And although I *said* this is the Accuracy analysis portion of this post, we’re not done with timing.

First, let’s talk good decisions vs poor decisions.  Good decisions – on TC, you know when to get out of a question.  Look at the Average Time Wrong vs Average Time right for the Harder and Devilish TC questions.  That’s what we want to see!  This indicates you recognize when more time will/won’t pay off.  (Maybe… more on this in a moment.)

So why aren’t you making the same decisions in SE?

Finally, why, why, why are you spending five minutes – on AVERAGE across three questions – in RC?  What’s going on here?  There’s some leeway in RC, because of the time needed to read and process a longer passage, but not five minutes leeway.

On the Easier RC question that you missed, you missed it in one minute.  This indicates you were confident in your answer.  Confident in the wrong answer – somewhere in this question is a trap that you fell for, and you need to figure out what that trap was!

Back to the TC timing: one possibility is you know when to get out of TC, and that’s why your wrong answers take less time than the right answers.  Another, more disturbing possibility, is you’re cheating yourself on TC time.  How do I know this?  Look at the variation between TC and SE accuracy – it’s not huge, but the discrepancy is there.  Why is TC accuracy lower?

Finally, the most obvious element of this analysis is that RC is your lowest accuracy.  Time to go back and study!!!

Analyzing Accuracy by Topic Tested

This issue cannot be addressed by looking at one image – you will generate an assessment report, and view the Analysis by Content Area and Topic.  There are a few things you’re looking for here.

First, and foremost, are you seeing accuracy and speed in topics you’ve studied?  If you haven’t studied Geometry yet, who cares if your Geometry accuracy is 20%!  But you’ve spent two full weeks reviewing algebra, so why are you missing 2 out of 3 function/formula questions?  Bright side though, your accuracy in Quadratics is through the roof!!

Obviously that paragraph is a hypothetical, but notice two things: first, you need to decide which area(s) deserve your analysis; second, you need to look not just at the overall topic, but also at the subtopics.

You’re looking for improvements and discrepancies.  Which areas are strong?  Which are weak?  Do you have a mix of strong and weak areas in one major topic?  These are all question you need to ask yourself.

BUT you need to take this with a grain of salt – don’t neglect to consider the difficulty of the individual questions!  Yes, maybe you missed 2 function questions.  But they were both Devilish difficulty!  You’re not weak in this area, you just got hit by some of the worst questions.

Finally, don’t neglect to examine timing in this area of analysis.  Yes, you were accurate in Rates questions.  But you spent 4 minutes on them.  Time to study!!

Final Thoughts

I hope you’ve found this helpful.  If you go back and look at my previous GRE blog posts, I think you’ll notice that this post contains many, many more rhetorical questions.  That’s the point of practice test analysis.  In the test, and when you’re studying, the computer, or the book, or whatever study source you’re using is asking you questions.

Analyzing your practice tests is the time for you to ask the questions.  What are the weak areas?  Strong areas?  Why am I performing differently in Word Problems vs Geometry?

And there’s one question you must ask, which I haven’t addresses, simply because of how much space it would require – Are you seeing improvement???

Every time you take a practice test, from the second practice test on to the last, look at the most recent test, do all this analysis.  Then look at the test prior – what’s changed?  What has stayed the same?  Have you improved in your weaknesses, and have strengths remained strong?

A practice test doesn’t teach you anything in and of itself – but it tells you where you are, and where you’re moving, and what you *should* be teaching yourself.

Good Luck!!!

### Manhattan Prep Instructor Wows With Record-Setting Jeopardy Win

Yesterday, the whole wide internet was shocked by the Jeopardy dominance of “This dude Michael”, but here at Manhattan Prep we weren’t surprised at all. We already knew that dude was smart and we knew that dude had the mathematical wherewithal to bet $7,000 without batting an eyelash. Here at MPrep we know that dude as Michael Bilow (one of those people who command such respect that he must always be talked about using his last name lest anyone in earshot mistakenly attribute an anecdote or joke to some less deserving Michael). On Jeopardy, he lived up to his legend taking home the fourth highest single-day winnings in Jeopardy history:$57,198.

Michael Bilow joined the Manhattan Prep family in 2011 using his perfect GRE score and spectacular teaching chops to secure a role as an LA-based GRE instructor. A few years later we realized we needed more Bilow in our business so we asked him to join the Marketing Department. He took a position as our Business Data Analyst, while continuing to teach GRE classes and pursue his PhD. After seeing him flawlessly juggle those responsibilities, we never had any doubt that he would take the Jeopardy world by fire.

By now the whole country knows of Bilow’s intellectual prowess, but we know so much more. Michael is a dedicated practitioner of improv, a delightful presence in Google Hangout meetings, and a stylish dresser. We can’t wait for his next trip to the New York City headquarters so he can buy us a drink with his winnings after he takes a quick a nap in a tutoring pod.

Congrats, Michael Bilow! Keep it up!

### How to Switch from the GRE to the GMAT

Lately, we’ve been talking about how to decide which test to take. What if you decide to switch from the GRE to the GMAT? That’s what we’ll tackle today! (Next time, we’ll talk about what to do if you want to switch from the GMAT to the GRE.)

### How do I study?

The overall way that you want to study doesn’t actually change that much; rather, you’ll just need to change what you are studying, as discussed later in this article.

First, you’ll need to determine whether the way that you’ve already been studying is actually the optimal way. If not, then you’ll need to make some changes, regardless of whether you stick with the GRE or switch to the GMAT.

The GRE and the GMAT are both executive reasoning tests; that is, the test makers want to know how you think and make decisions. You of course need to know content (certain facts, rules, formulas) in order to do well on either test, but that level of study is not enough; you also need to lift yourself to a second level of understanding that allows you to think your way through these sometimes bizarrely-worded problems as effectively and efficiently as possible.

Follow the two links I put in the last paragraph. Take some time to just think about the concepts presented there. Has this been your approach to studying so far? If so, great. Keep thinking and working in that way.

If not, however, recognize that you’re going to need to start studying with this new mindset, regardless of whether you take the GRE or the GMAT.

### What are my strengths and weaknesses?

Any time you’re developing or revising a study plan, you’ll want to put together a solid analysis of your strengths and weaknesses.

If you have been studying for the GRE for a while, then you should have some practice CAT data. (If not, or if it has been more than 6 weeks since you last took a CAT, then you’ll need to take one to get the data. Make sure to take the test under official conditions, including the essays, length of breaks, and so on.)

Analyze your most recent two CATs (this link tells you how to analyze Manhattan Prep CATs). If you haven’t taken MPrep CATs, you can still read through that link to get an idea of how you want to analyze your data from another test. Your goal is to split all question types and content into one of three buckets:

Bucket 1: Strengths. I’ll still study and practice these but not as heavily as other areas.

Bucket 2: Low-hanging Fruit: These are my easiest opportunities for improvement. Careless mistakes. Things that I get wrong fast. Things that I get right but just a little too slowly.

Bucket 3: Weaknesses. These are areas that I’ll ignore until I’ve worked out my Bucket 2 issues. Things that I’m likely to get wrong even if I give myself unlimited time. Things that I get right but way too slowly. Things that use up way too much mental energy, even if I get them right.

Your primary focus until your next practice test will be working a lot to improve Bucket 2, while maintaining Bucket 1 skills and getting Bucket 3 questions wrong fast (yes, seriously!).

[Aside: there are certain things that will stay in Bucket 3 forever. I’m terrible at combinatorics and I’m pretty bad at 3D geometry. That’s been true since my very first practice GRE, more than 10 years ago! When I see these, I’ll give it a look in case the problem is very similar to one that I do remember how to do, but otherwise, I pick my favorite letter and move on.]

Okay, now that you know what your strengths and weaknesses are, you need to familiarize yourself with the differences between the GRE and the GMAT.

### What new things do I have to learn?

The Essays and Integrated Reasoning

You won’t care as much about one difference, so let’s get it out of the way. At the beginning of the GRE, you write two essays. The GMAT also asks you to write an essay but in place of the second essay you’ll have to do the Integrated Reasoning section, a multiple-choice section that mixes quant and verbal skills.

This section is different enough from the others that you will have to study how to answer these questions and how to manage your time during the section. At the time of this publication (in March 2015), schools aren’t using IR scores much, so this section is less important, though this could change in the future.

Quant

Next, for the quant section of the test, you’re going to need to learn about one different question type contained on the GMAT: Data Sufficiency (DS).

The GMAT dives more deeply into number properties, story problems, and some algebra concepts, so you may need to get GMAT books for these topics versus continuing to use your GRE books.

The timing on the two tests is also quite different, so you’ll have to learn how to handle 37 questions in 75 minutes on the GMAT, or about 2 minutes per question on average.

Verbal

Most of your new efforts on verbal will be geared towards the grammar question type, Sentence Correction (SC). You’ll definitely need to get some materials that teach you the grammar and meaning issues that are tested on SC.

Again, if you are already using Manhattan Prep materials, you can use what you already have for Reading Comprehension (RC), but you will need to get new materials for Critical Reasoning (CR). The CR question types on the GRE are also tested on the GMAT, but the GMAT contains additional CR question types that don’t appear on the GRE.

Again, the timing will be different on the GMAT. You’ll need to answer 41 verbal questions in 75 minutes, spending about 1 minute 20 seconds on SC, 2 minutes on CR, and about 6 to 8 minutes total for RC passages and questions.

### How do I make a study plan?

We’ve already talked about part of the process (analyzing your strengths and weaknesses). You may decide to take a class or work with a tutor, in which case your teacher will give you specific assignments . If not, you’ll need to develop your own study plan.

### Takeaways for switching from GRE to GMAT

(1) Make sure that you’re going into your studies with the right overall mindset (executive reasoning!) and that you know how to lift yourself to the “second level” of study.

(2) Begin your studies by concentrating on the aspects that are new to you: the different question types and topics that are tested on the GMAT. Once you build those skills up to a competent level, you’ll review all aspects and question types.