text:
SKY-MAP.ORG

 Inici Començant Sobreviure a l'Univers News@Sky Astro Fotografia La Col·lecció Fòrum Blog New! FAQ Premsa Login

# 55 Leo

Contingut

### Imatges

Carregar la teva Imatge

DSS Images   Other Images

### Articles Relacionats

 Orientations of Orbital Planes of BinariesOrientations of orbital planes of binaries are analysed by using acomplete sample of known orbital systems. The use of a so large sampleis possible due to the application of a new procedure enabling toinclude the binaries for which the ascending nodes do not certain. It isconcluded that, generally, the distribution of observed orientations ofthe orbital planes does not differ from simulated random orientations.In both cases the same star positions are retained. The Geneva-Copenhagen survey of the Solar neighbourhood. Ages, metallicities, and kinematic properties of 14 000 F and G dwarfsWe present and discuss new determinations of metallicity, rotation, age,kinematics, and Galactic orbits for a complete, magnitude-limited, andkinematically unbiased sample of 16 682 nearby F and G dwarf stars. Our63 000 new, accurate radial-velocity observations for nearly 13 500stars allow identification of most of the binary stars in the sampleand, together with published uvbyβ photometry, Hipparcosparallaxes, Tycho-2 proper motions, and a few earlier radial velocities,complete the kinematic information for 14 139 stars. These high-qualityvelocity data are supplemented by effective temperatures andmetallicities newly derived from recent and/or revised calibrations. Theremaining stars either lack Hipparcos data or have fast rotation. Amajor effort has been devoted to the determination of new isochrone agesfor all stars for which this is possible. Particular attention has beengiven to a realistic treatment of statistical biases and errorestimates, as standard techniques tend to underestimate these effectsand introduce spurious features in the age distributions. Our ages agreewell with those by Edvardsson et al. (\cite{edv93}), despite severalastrophysical and computational improvements since then. We demonstrate,however, how strong observational and theoretical biases cause thedistribution of the observed ages to be very different from that of thetrue age distribution of the sample. Among the many basic relations ofthe Galactic disk that can be reinvestigated from the data presentedhere, we revisit the metallicity distribution of the G dwarfs and theage-metallicity, age-velocity, and metallicity-velocity relations of theSolar neighbourhood. Our first results confirm the lack of metal-poor Gdwarfs relative to closed-box model predictions (the G dwarfproblem''), the existence of radial metallicity gradients in the disk,the small change in mean metallicity of the thin disk since itsformation and the substantial scatter in metallicity at all ages, andthe continuing kinematic heating of the thin disk with an efficiencyconsistent with that expected for a combination of spiral arms and giantmolecular clouds. Distinct features in the distribution of the Vcomponent of the space motion are extended in age and metallicity,corresponding to the effects of stochastic spiral waves rather thanclassical moving groups, and may complicate the identification ofthick-disk stars from kinematic criteria. More advanced analyses of thisrich material will require careful simulations of the selection criteriafor the sample and the distribution of observational errors.Based on observations made with the Danish 1.5-m telescope at ESO, LaSilla, Chile, and with the Swiss 1-m telescope at Observatoire deHaute-Provence, France.Complete Tables 1 and 2 are only available in electronic form at the CDSvia anonymous ftp to cdsarc.u-strasbg.fr (130.79.128.5) or viahttp://cdsweb.u-strasbg.fr/cgi-bin/qcat?J/A+A/418/989 The Hamburg/RASS Catalogue of optical identifications. Northern high-galactic latitude ROSAT Bright Source Catalogue X-ray sourcesWe present the Hamburg/RASS Catalogue (HRC) of optical identificationsof X-ray sources at high-galactic latitude. The HRC includes all X-raysources from the ROSAT Bright Source Catalogue (RASS-BSC) with galacticlatitude |b| >=30degr and declination delta >=0degr . In thispart of the sky covering ~ 10 000 deg2 the RASS-BSC contains5341 X-ray sources. For the optical identification we used blue Schmidtprism and direct plates taken for the northern hemisphere Hamburg QuasarSurvey (HQS) which are now available in digitized form. The limitingmagnitudes are 18.5 and 20, respectively. For 82% of the selectedRASS-BSC an identification could be given. For the rest either nocounterpart was visible in the error circle or a plausibleidentification was not possible. With ~ 42% AGN represent the largestgroup of X-ray emitters, ~ 31% have a stellar counterpart, whereasgalaxies and cluster of galaxies comprise only ~ 4% and ~ 5%,respectively. In ~ 3% of the RASS-BSC sources no object was visible onour blue direct plates within 40\arcsec around the X-ray sourceposition. The catalogue is used as a source for the selection of(nearly) complete samples of the various classes of X-ray emitters. Rotational velocities of A-type stars in the northern hemisphere. II. Measurement of v sin iThis work is the second part of the set of measurements of v sin i forA-type stars, begun by Royer et al. (\cite{Ror_02a}). Spectra of 249 B8to F2-type stars brighter than V=7 have been collected at Observatoirede Haute-Provence (OHP). Fourier transforms of several line profiles inthe range 4200-4600 Å are used to derive v sin i from thefrequency of the first zero. Statistical analysis of the sampleindicates that measurement error mainly depends on v sin i and thisrelative error of the rotational velocity is found to be about 5% onaverage. The systematic shift with respect to standard values fromSlettebak et al. (\cite{Slk_75}), previously found in the first paper,is here confirmed. Comparisons with data from the literature agree withour findings: v sin i values from Slettebak et al. are underestimatedand the relation between both scales follows a linear law ensuremath vsin inew = 1.03 v sin iold+7.7. Finally, thesedata are combined with those from the previous paper (Royer et al.\cite{Ror_02a}), together with the catalogue of Abt & Morrell(\cite{AbtMol95}). The resulting sample includes some 2150 stars withhomogenized rotational velocities. Based on observations made atObservatoire de Haute Provence (CNRS), France. Tables \ref{results} and\ref{merging} are only available in electronic form at the CDS viaanonymous ftp to cdsarc.u-strasbg.fr (130.79.125.5) or viahttp://cdsweb.u-strasbg.fr/cgi-bin/qcat?J/A+A/393/897 Two-colour photometry for 9473 components of close Hipparcos double and multiple starsUsing observations obtained with the Tycho instrument of the ESAHipparcos satellite, a two-colour photometry is produced for componentsof more than 7 000 Hipparcos double and multiple stars with angularseparations 0.1 to 2.5 arcsec. We publish 9473 components of 5173systems with separations above 0.3 arcsec. The majority of them did nothave Tycho photometry in the Hipparcos catalogue. The magnitudes arederived in the Tycho B_T and V_T passbands, similar to the Johnsonpassbands. Photometrically resolved components of the binaries withstatistically significant trigonometric parallaxes can be put on an HRdiagram, the majority of them for the first time. Based on observationsmade with the ESA Hipparcos satellite. Interferometry and spectroscopy of beta Cen: a beta Cephei star in a binary system^*beta Cen is a bright beta Cephei variable and has long been suspected tobe a binary. Here we report interferometric observations with the 3.9-mAnglo-Australian Telescope at a single epoch which show the star to be abinary with components separated by 15 milliarcsec and havingapproximately equal luminosities at 486 nm. We also presenthigh-resolution spectra taken over five nights with the ESO CAT whichshow beta Cen to be a double-lined spectroscopic binary. We identify twopulsation frequencies in the primary. Further spectroscopic andinterferometric studies of this double star should allow determinationof its orbital parameters and component masses. Visual binary orbits and masses POST HIPPARCOSThe parallaxes from Hipparcos are an important ingredient to derive moreaccurate masses for known orbital binaries, but in order to exploit theparallaxes fully, the orbital elements have to be known to similarprecision. The present work gives improved orbital elements for some 205systems by combining the Hipparcos astrometry with existing ground-basedobservations. The new solutions avoid the linearity constraints andomissions in the Hipparcos Catalog by using the intermediate TransitData which can be combined with ground-based observations in arbitarilycomplex orbital models. The new orbital elements and parallaxes give newmass-sum values together with realistic total error-estimates. To getindividual masses at least for main-sequence systems, the mass-ratioshave been generally estimated from theoretical isochrones and observedmagnitude-differences. For some 25 short-period systems, however, trueastrometric mass-ratios have been determined through the observedorbital curvature in the 3-year Hipparcos observation interval. Thefinal result is an observed mass-luminosity relation' which falls closeto theoretical expectation, but with outliers' due to undetectedmultiplicity or to composition- and age-effects in the nonuniformnear-star sample. Based in part on observations collected with the ESAHipparcos astrometry satellite. Tables~ 1, 3, 4 and 6 are also availablein electronic form at the CDS via anonymous ftp tocdsarc.u-strasbg.fr~(130.79.128.5) or viahttp://cdsweb.u-strasbg.fr/Abstract.html Inclination of the Orbital Planes of Visual BinariesThe inclination of the orbital planes of 78 visual binaries with knownorbits with respect to the galactic was examined. No double stargroupings were found having approximately equal orientation of theirorbital planes. Viewed the orbital plane north poles there are morebinary systems with counterclockwise motion than those moving clockwise. Identification of a Complete Sample of Northern ROSAT All-Sky Survey X-Ray Sources. III. The CatalogWe present a catalog of optical identifications of a representativesample of northern ( delta > -9 deg) ROSAT All-Sky Survey (RASS)sources. A full identification has been carried out for a count-rate-and area-limited complete RASS subsample comprising 674 sources. Allsources are within six study areas outside the Galactic plane (| b |> 19.dg6), one area being near the north Galactic pole and one nearthe north ecliptic pole. The ROSAT all-sky survey catalogue of optically bright late-type giants and supergiantsWe present X-ray data for all late-type (A, F, G, K, M) giants andsupergiants (luminosity classes I to III-IV) listed in the Bright StarCatalogue that have been detected in the ROSAT all-sky survey.Altogether, our catalogue contains 450 entries of X-ray emitting evolvedlate-type stars, which corresponds to an average detection rate of about11.7 percent. The selection of the sample stars, the data analysis, thecriteria for an accepted match between star and X-ray source, and thedetermination of X-ray fluxes are described. Catalogue only available atCDS via anonymous ftp to cdsarc.u-strasbg.fr (130.79.128.5) or viahttp://cdsweb.u-strasbg.fr/Abstract.html Observations of Double Stars and New Pairs. XVII.Abstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1996ApJS..105..475H&db_key=AST The photoelectric astrolabe catalogue of Yunnan Observatory (YPAC).The positions of 53 FK5, 70 FK5 Extension and 486 GC stars are given forthe equator and equinox J2000.0 and for the mean observation epoch ofeach star. They are determined with the photoelectric astrolabe ofYunnan Observatory. The internal mean errors in right ascension anddeclination are +/- 0.046" and +/- 0.059", respectively. The meanobservation epoch is 1989.51. Vitesses radiales. Catalogue WEB: Wilson Evans Batten. Subtittle: Radial velocities: The Wilson-Evans-Batten catalogue.We give a common version of the two catalogues of Mean Radial Velocitiesby Wilson (1963) and Evans (1978) to which we have added the catalogueof spectroscopic binary systems (Batten et al. 1989). For each star,when possible, we give: 1) an acronym to enter SIMBAD (Set ofIdentifications Measurements and Bibliography for Astronomical Data) ofthe CDS (Centre de Donnees Astronomiques de Strasbourg). 2) the numberHIC of the HIPPARCOS catalogue (Turon 1992). 3) the CCDM number(Catalogue des Composantes des etoiles Doubles et Multiples) byDommanget & Nys (1994). For the cluster stars, a precise study hasbeen done, on the identificator numbers. Numerous remarks point out theproblems we have had to deal with. Observations of double stars and new pairs. XVThe study reports visual and photographic measures listed for 1150 pairsobtained in the time frame 1989.91-1992.15, including 221 new doublestars. Magnitudes were estimated for a part of the objects, especiallythe fainter ones. Plate orientations were calculated from field stars ofknown positions and were precessed to the epoch; numbers of nights andof measured exposures are given. Reobservation of faint, neglected pairsreveal many corrections to the data from the old discovery lists. Observations of double stars and new pairs. XIVResults of a continuing survey of visual double stars are presented,including 4880 measurements made from February 1987 to November 1989.The positions in WDS format and Durchmusterung numbers are given for 194pairs first reported here. Micrometer measurements of 1142 doubles madewith the Swarthmore 61 cm refractor are presented. Magnitudes areestimated for some of the objects. Plate measurements, plateorientations, position angles, number of nights, and measured exposuresare given. Visual observations of 342 pairs obtained in May 1989 atCerro Tololo, mostly with the 1.0 m reflector, are reported. ICCD speckle observations of binary stars. IV - Measurements during 1986-1988 from the Kitt Peak 4 M telescopeOne thousand five hundred and fifty measurements of 1006 binary starsystems observed mostly during 1986 through mid-1988 by means of speckleinterferometry with the KPNO 4-m telescope are presented. Twenty-onesystems are directly resolved for the first time, including newcomponents to the cool supergiant Alpha Her A and the Pleiades shellstar Pleione. A continuing survey of The Bright Star Catalogue yieldedeight new binaries from 293 bright stars observed. Corrections tospeckle measures from the GSU/CHARA ICCD speckle camera previouslypublished are presented and discussed. Binary star measurements made at Nice with the 50-cm reflectorAbstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1989A&AS...77..125L&db_key=AST Micrometer Measurements of Visual Double Stars - Part Three -Not Available Metallicism among A and F giant stars132 stars considered as A and F giants have been studied for theirproperties in the Geneva photometric system. It is shown that thissystem to derive the temperature, absolute magnitude and Fe/H value forstars in this part of the HR diagram. 36 percent of the stars of oursample exhibit an enhanced value Delta m2 that can be interpreted interms of Fe/H. The red limit of stars having an enhanced Fe/H value is0.225 in B2-V1 or 6500 K in Teff. This corresponds to the limit definedby Vauclair and Vauclair (1982) where the diffusion timescale is equalto the stellar lifetime and permits the assumption that the diffusion isthe process responsible for the metallicism observed in the A and Fgiants. Visual multiples. VII - MK classificationsClassifications are given for 865 components of visual multiples; theyshow no systematic differences from the MK system, and the random errorsare one subclass in type and two-thirds of a luminosity class. It isfound that at least 1% of the F-type IV and V stars are weak-lined, 32%of the A4-F1 IV and V stars are Am, and 5% of the A0-A3 IV and V starsare early-type Am. Attention is called to the large fraction (55%) ofthe A3-A9 III-V stars that are of luminosity classes III or IV, unlikethe percentage (16%) at neighboring types. Visual multiples. V - Radial velocities of 160 systems937 radial velocities are listed from coude spectra of 160 visualmultiples with known visual orbital elements; these, plus the velocitiesin paper of Roemer and Sanwal (1980), are discussed. Among the resultsare (1) systems yielding spectroscopic elements with the visual period,(2) systems probably showing velocity variations during the visualperiod, (3) systems with short spectroscopic periods, some in additionto detectable motion during the visual period, (4) systems showing novariation in radial velocity during the visual period, either becausethe components are similar in brightness or the periods are very long,(5) systems with spectral lines too broad to allow the detection oforbital motion, and (6) systems with insufficient data for anyconclusions to be drawn at present. MK spectral types for some F and G stars.Abstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1979PASP...91...83C&db_key=AST Spectral classification of the bright F stars.Abstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1976PASP...88...95C&db_key=AST Micrometer observations of double stars.8.Abstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1975ApJS...29..315H&db_key=AST Double Star Measures at Lick Observatory, Mount Hamilton, CaliforniaAbstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1974PASP...86..902H&db_key=AST Mesures d'étoiles doubles faites à l'équatorial de 38 CM de l'Observatoire de ParisAbstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1972A&AS....6..147B&db_key=AST Catalog of Indidual Radial Velocities, 0h-12h, Measured by Astronomers of the Mount Wilson ObservatoryAbstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1970ApJS...19..387A&db_key=AST Orbites de cinq étoiles doubles visuellesAbstract image available at:http://adsabs.harvard.edu/cgi-bin/nph-bib_query?1970A&AS....1..115M&db_key=AST Mikrometermessungen von Doppelsternen. VI.Not Available Mesures d'étoiles doubles faites au réfracteur de 38 cm de l'Observatoire de NiceNot Available
Enviar un nou article

### Enllaços Relacionats

• - No s'ha trobat enllaços -
Enviar un nou enllaç


text:
# Why sequencing data is modeled as negative binomial

The goal of most sequencing experiments is to identify differences in gene expression between biological conditions such as the influence of a disease-linked genetic mutation or drug treatment. Fitting the correct statistical model to the data is an essential step before making inferences about differentially expressed genes. The negative binomial (NB) distribution has emerged as the model of choice to fit sequencing data. While the NB distribution is bread-and-butter to a statistician, the average experimental biologist may not be very familiar with it.

### A first intuition

In a standard sequencing experiment (RNA-Seq), we map the sequencing reads to the reference genome and count how many reads fall within a given gene (or exon). This means that the input for the statistical analysis are discrete non-negative integers (“counts”) for each gene in each sample. The total number of reads for each sample tends to be in the millions, while the counts per gene vary considerably but tend to be in the tens, hundreds or thousands. Therefore, the chance of a given read to be mapped to any specific gene is rather small. Discrete events that are sampled out of a large pool with low probability sounds very much like a Poisson process. And indeed it is. In fact, earlier iterations of RNA-Seq analysis modeled sequencing data as a Poisson distribution. There is one problem, however. The variability of read counts in sequencing experiments tends to be larger than the Poisson distribution allows.

A fundamental property of the Poisson distribution is that its variance is equal to the mean. Here I plotted the gene-wise means versus their variance of the “bottomly” experiment provided by the ReCount project. The code to produce this plot can be found on Github.

It is obvious that the variance of counts is generally greater than their mean, especially for genes expressed at a higher level. This phenomenon is called “overdispersion“. The NB distribution is similar to a Poisson distribution but has an extra parameter called the “clumping” or “dispersion” parameter. It is like a Poisson distribution with more variance. Note, how the NB estimates of the mean-variance relationship (blue line) fits the observed values quite well. Thus, a reasonable first intuition of why the NB distribution is a proper way of fitting count data is that the dispersion parameter allows the extra wiggle room to model the “extra” variance that we empirically observe in RNA-Seq experiments.

### A more rigorous justification

There are two mathematically equivalent formulations of the NB distribution. In its traditional form, which I will mention only for the sake of completion, the NB distribution estimates the probability of having a number of failures until a specified number of successes occur. An example for an application would be the expected number of games a striker goes without a goal (“failure”) before scoring (“success”). Note that, “success” and “failure” are not value judgements but just the two outcomes of a Bernoulli process and therefore interchangeable. Whenever you see the NB distribution used in this form, pay close attention to what is defined as a “success” and a “failure”. In is a common point of notational confusion. This definition is not terribly useful for understanding how the NB distribution relates to RNA-Seq count data.

The second definition sounds more intimidating but is much more useful. The NB distribution can be defined as a Poisson-Gamma mixture distribution. This means that the NB distribution is a weighted mixture of Poisson distributions where the rate parameter $\lambda$ (i.e. the expected counts) is itself associated with uncertainty following a Gamma distribution. This sounds very similar to our earlier definition as a “Poisson distribution with extra variance”.

While it is convenient to have a distribution that fits our empirical observations it is not quite satisfying without a more theoretical justification. When comparing samples of different conditions we usually have multiple replicates of each condition. Those replicates need to be independent for statistical inference to be valid. Such replicates are called “biological” replicates because they come from independent animals, dishes, or cultures. In contrast, splitting a sample in two and running it through the sequencer twice would be a “technical” replicate. In general, there is more variance associated with biological replicates than technical replicates. If we assume that our samples are biological replicates, it is not surprising that the same transcript is present at slightly different levels in each sample, even under the same conditions. In other words, the Poisson process in each sample has a slightly different expected count parameter. This is the source of the “extra” variance (overdispersion) we observe in sequencing data. In the framework of the NB distribution, it is accounted for by allowing Gamma-distributed uncertainty about the expected counts (the Poisson rate) for each gene. Conversely, if we were to deal with technical replicates, there should be no overdispersion and a simple Poisson model would be adequate.

The variance (dispersion) $\sigma^2$ of a NB distribution can be expressed as function of the mean $\mu$ and the dispersion parameter $\alpha$.

$\sigma^2 = \mu + \alpha \mu^2$

From this formula it is evident that the dispersion is always greater than the mean for $\alpha > 0$. If $\alpha \rightarrow 0$, the NB distribution is a Poisson distribution.

### Dispersion estimates

Finally, a short note on the practical implications of estimating the dispersion of sequencing data. In a standard sequencing experiment, we have to be content with few biological replicates per condition due to the high costs associated with sequencing experiments and the large amount of time that goes into library preparations. This makes the gene-wise estimates of dispersion rather unreliable. Modern RNA-Seq analysis tools such as DESeq2 and edgeR combine the gene-wise dispersion estimate with an estimate of the expected dispersion rate based on all genes. This Bayesian “shrinkage” of the variance has already been applied successfully in microarray analysis. Although the implementation of this method varies between analysis tools, the concept of using information from the whole data set has emerged as a powerful technique to mitigate the shortcomings of having few replicates.

# Analyzing quantitative PCR data the tidy way

Previously in this series on tidy data: Taking up the cudgels for tidy data

One of the most challenging aspects of working with data is how easy it is to get lost. Even if the data sets are small. Multiple levels of hierarchy and grouping quickly confuse our human brains (at least mine). Recording such data in two dimensional spreadsheets naturally leads to blurring of the distinction between observation and variable. Such data requires constant reformatting and its structure may not be intuitive to your fellow researcher.

Here are the two main rules about tidy data as defined in Hadley Wickham’s paper:

1. Each variable forms a column
2. Each observation forms a row

A variable is an “attribute” of a given data point that describes the conditions when it was taken. Variables often are categorical (but they don’t need to be). For example, the gene tested or the genotype associated with a given measurement would be a categorical variables.

An observation is a measurement associated with an arbitrary number of variables. There are no measurements that are taken under identical conditions. Each observation is uniquely described by the variables and should form its own row.

Let’s look at an example of a typical recording of quantitative PCR data in Excel.

We have measurements for three different genotypes (“control”, “mutant1”, “mutant2”) from three separate experiments (“exp1”, “exp2”, “exp3”) with three replicates each (“rep1”, “rep2”, “rep3”).

Looking at the columns, we see that information on “experiment” and “replicate” are stored in the names of the columns rather than the entries of the columns. This will have to be changed.

There clearly are multiple measurements per row. More precisely, it looks like we have a set of nine measurements for each genotype. But this is not entirely true. Experiments are considered statistically independent as they are typically performed at different times and with different cells. They capture the full biological variability and we call them “biological replicates”. The repeated measurements done in each experiment are not statistically independent because they come from the same sample preparation and thus only capture sources of variance that originate from sample handling or instrumentation. We call them “technical replicates”. Technical replicates cannot be used for statistical inference that requires “statistical independence”, such as a t-test. As you can see, we have an implicit hierarchy in our data that is not expressed in the structure of the data representation shown above.

We will untangle all those complications one by one using R tools developed by Hadley Wickham and others to represent the same data in a tidy format suitable for statistical analysis and visualization. For details about how the code works, please consult the many excellent tutorials on dplyr, tidyr, ggplot2, and broom.

messy <- read.csv("qpcr_messy.csv", row.names = 1)

This is the original data read into R. Let’s get started.

#### Row names should form their own column

The “genotype” information is recorded as row names. “Genotype” clearly is a variable, so we should make “genotype” a full column.

tidy <- data.frame(messy) %>%
# make row names a column
mutate(genotype = rownames(messy))

#### What are our variables?

Next, we need to think about what are our variables. We have already identified “genotype” but what are the other ones? The way we do this is to ask ourselves what kind of information we would need to uniquely describe each observation. The experiment and replicate number are essential to differentiate each quantitative PCR measurement, so we need to create separate columns for “experiment” and “replicate”. We will do this in two steps. First we use “gather” to convert tabular data from wide to long format (we could have also used the more general “melt” function from the “reshape2” package). The former column names (e.g. “exp1_rep1”) are saved into a temporary column called “sample”. As this column contains information about two variables (“experiment” and “replicate”), we need to separate it into two columns to conform with the “each variable forms a column” rule. To do this, we use “separate” to split “sample” into the two columns “experiment” and “replicate”.

tidy <- tidy %>%
# make each row a single measurement
gather(key = sample, value = measurement, -genotype) %>%
# make each column a single variable
separate(col = sample, into = c("experiment", "replicate"), sep = "_")

Here are the first 10 columns of the “tidy” representation of the initial Excel table. Before we can do statistical tests and visualization, we have to take care of one more thing.

#### Untangling implicit Domain specific hierarchies

Remember what we said before about the two different kind of replicates. Only data from biological replicates (“experiments”) are considered statistically independent samples, while technical replicates (“replicate”) are not. One common approach is to average the technical replicates (“replicate”) before any statistical test is applied. With tidy data, this is simple.

data <- tidy %>%
# calculate mean of technical replicates by genotype and experiment
group_by(genotype, experiment) %>%
summarise(measurement = mean(measurement)) %>%
ungroup()

Having each variable as its own column makes the application of the same operation onto different groups straightforward. In our case, we calculate the mean of technical replicates for each genotype and experiment combination.

Now, the data is ready for analysis.

#### TIdy Statistical analysis of quantitative pcr data

The scientific rational for a quantitative PCR experiment is to find out whether the number of transcripts for a given gene is different between two or more conditions. We have measurements for one transcript in three distinct genotypes (“control”, “mutant1”, “mutant2”). Biological replicates are considered independent and measurements are assumed to be normally distributed around a “true” mean value. A t-test would be an appropriate choice for the comparison of two genotypes. In this case, we have three genotypes, so we will use one-way anova followed by Tukey’s post-hoc test.

mod <- data %>%
# set "control" as reference
mutate(genotype = relevel(factor(genotype), ref = "control")) %>%
# one-way anova and Tukey's post hoc test
do(tidy(TukeyHSD(aov(measurement ~ genotype, data = .))))

We generally want to compare the effect of a genetic mutation to a “control” condition. We therefore set the reference of “genotype” to “control”.

Using base R statistics functions like “aov” and “TukeyHSD” in a tidy data analysis workflow can pose problems because they were not created with the idea of “dplyr”-style piping (“%>%”) in mind. Piping requires that the input and output of each function is a data frame and that the input is the first argument of the function. The “aov” function neither takes the input data frame as its first argument, nor does it return a data frame but a specialized “aov” object. To add insult to injury, the “TukeyHSD” function only works with such a specialized “aov” object as input.

In situations like this, the “do” function comes in handy. Within the “do” function, the input of the previous line is accessible through the dot character, so we can use an arbitrary function within “do” and just refer to the input data at the appropriate place with “.”. As a final clean-up, the “tidy” function from the “broom” package makes sure that the output of the line is a data frame.

Tukey’s post hoc test thinks “mutant1” is different from “control” but “mutant2” is not. Let’s visualize the results to get a better idea of how the data looks like.

#### tidy Visualization of quantitative PCR data

We are dealing with few replicates, three in our case, so a bar graph is not the most efficient representation of our data. Plotting the individual data points and the confidence intervals gives us more information using less ink. We will use the “ggplot2” package because it is designed to work with data in the tidy format.

# genotype will be on the x-axis, measurements on the y-axis
ggplot(data, aes(x = genotype, y = measurement, col = experiment)) +
# plot the mean of each genotype as a cross
stat_summary(fun.y = "mean", geom = "point", color = "black", shape = 3, size = 5) +
# plot the 95% confidence interval for each genotype
stat_summary(fun.data = "mean_cl_normal", geom = "errorbar", color = "black", width = 0.1) +
# we we add the averaged measurements for each experiment
geom_point(shape = 16, size = 5) +
theme_classic()

We can see why the first mutant is different from the “control” sample and the second is not. More replicates would be needed to test whether the small difference in means between “control” and “mutant2” is a true difference or not.

What I have shown here is just the tip of the iceberg. There are many more tools and functions to discover. The more data analysis you do, the more you will realize how important it is not to waste time formatting and reformatting the the data for each step of the analysis. Learning about how to tidy up your data is an important step towards that goal.

The R code can be found on Github.

# Taking up the cudgels for tidy data

The abundance of data has led to a revolution in marketing and advertisement as well as in biomedical research. A decade ago, the emerging field of “systems biology” (no pun intended) promised to take basic research to the next level through the use of high-throughput screens and “big data”. Institutes were built, huge projects were funded, but surprisingly little of substance has been accomplished since.

There are three main reasons, I think, two of which are under our control and one is not.

During our first forays into understanding biology as a “system” we underestimated the complexity of even an isolated cell, let alone a multi-cellular organism. A somewhat complete description of even the most basic regulatory mechanisms and pathways remains a dream to this day due to myriads of adaptive mechanisms and cross-talks preventing the formulation of a coherent view. Unfortunately, this problem has to be overcome with improved scientific methodology or analysis and will take time.

There are things we can do right now, however.

Overly optimistic or incorrect interpretation of statistical results and “cherry-picking” of hits of high-throughput screens has led to a surprising number of publications that cannot be replicated or even be reproduced. I have written more extensively about this particular problem I refer to as the “Fisherman’s dilemma“.

The lack of standards for structuring data is another reason that prevents the use of existing data and makes merging data sets from different studies or sources unnecessary painful and time consuming. A common saying is that data science is 80% data cleaning, 20% data analysis. The same is true for bioinformatics, where one needs to wrestle with incomplete and messy datasets or, if it’s your lucky day, just different data formats. This problem is especially prevalent in meta-analysis of scientific data. Arguably, the integration of datasets from different sources is where we would predict to find some of the most important and universal results. Why else spend the time to generate expensive datasets if we don’t use them to compare and cross-reference?

If we were to spent less time on the arduous task of “cleaning” data, we could focus our attention on the question itself and the implementation of the analysis. In recent years, Hadley Wickham and others have developed a suite of R tools that help to “tidy up” messy data and establish and enforce a “grammar of data” that allows easy visualization, statistical modeling, and data merging without the need to “translate” the data for each step of the analysis. Hadley deservedly gets a lot of credit for his dplyr, reshape2, tidyr, and ggplot2 packages, but not nearly enough. At this point David Robinson’s excellent broom package for cleaning results from statistical models should also be mentioned.

The idea of tidy data is surprisingly simple. Here are the two most basic rules (see Hadley’s paper for more details).

1. Each variable forms a column.
2. Each observation forms a row.

Here is an example.

This is a standard form of recording biological research data such as data from a PCR experiment with three replicates. At first glance, the data looks pretty tidy. Genes in rows, replicates in columns. What’s wrong here?

In fact, this way of recording data violates both basic rules of a tidy dataset. First, the “replicates” are not distinct variables but instances of the same variable, which violates the first rule. Second, each measurement is a distinct observation and should have its own row. Clearly, this is not the case either.

This is how the same data looks like once cleaned-up.

Each variable is a column, each observation is a row.

Representing data “the tidy way” is not novel. It has been called the “long” format previously, as opposed to the “wide” (“messy”) format. Although “tidy” and “messy” imply a value judgement, it is important to note that while the tidy/long format has distinct advantages for data analysis, the wide format is often seen as the more intuitive and almost always is the more concise.

The most important advantage of tidy data in data analysis is that there is one way of representing the data in a tidy format, while there are many possible ways of having a messy data structure. Take the example of the messy data from above. Storing replicates in rows and genes in columns (the transpose) would have been an equivalent representation to the one shown above. However, cleaning up both representations results in the same tidy data representation shown. This advantage becomes even more important with datasets that contain multiple variables.

A related, but more technical advantage of the tidy format is that it simplifies the use of loops and vectorized programming (implicit loops) because the “one variable, one column – one observation, one row” structure enforces a “linearization” of the data that is more easily dealt with from a programming perspective.

Having data in a consistent format allows feeding data into visualization and modeling tools without spending time on getting the data in the right shape. Similarly, tidy dataset from different sources can be more easily merged and analyzed together.

While data in marketing is sometimes called “cheap”, research data in science often is generally very expensive, both in terms of time and money. Taking the extra step of recording and sharing data in a “tidy” format, would make data analysis in biomedical research and clinical trials more effective and potentially more productive.

In a follow-up post, I will cover the practical application of some of the R tools developed to work with tidy data using an example most experimental biologists are familiar with: statistical analysis and visualization of quantitative PCR.

# What is a large enough sample?

In my previous entry, I tried to clear up some of my own confusion about the Central Limit Theorem (CLT) and explained why it is such a valuable theoretical concept in statistics. To recap, the CLT describes how the means of a random sample of an unknown sampling distribution approach a normal distribution as the sample size $n$ approaches $\infty$. The uncertainty about our estimate of the mean of the original sampling distribution is given by $\sigma / \sqrt{n}$, where $\sigma$ is the standard deviation of the sampling distribution. We can see that the larger the sample size, the more certain we are about our estimate of the true mean.

The obvious practical question is what is a large enough sample size? The short answer is, it depends. A sample size of 30 is a pretty save bet for most real life applications.

To investigate the influence of sample size on the convergence of the distribution of the means, I will use simulated sampling from three different sampling distributions. All simulations were done using R. The code can be found on Github.

### CLT in (simulated) action

Let’s consider a normal sampling distribution to start with. This is useful to illustrate the idea of how the uncertainty of our estimate of the true mean depends on the sample size $n$. Here is our normal sampling distribution with $\mu$ = 4 and $\sigma$ = 2.

Now we generate a large number $m$ of random samples each with sample size $n$ and calculate their means. If this confuses you, you are not alone. For now, understand that the only variable we are changing is the sample size $n$. $m$ will just be a “large number”, such as 10000 in our case, so that we can draw a histogram of 10000 simulated means. We will do this four time, each time with a different sample size of $n$ being either 2, 5, 15, or 30.

The histogram shows the distribution of simulated means and the blue curve illustrates the normal distribution predicted by the CLT with a mean of $\mu$ and a standard deviation of $\sigma / \sqrt{n}$. In the lower panel, I show quantile-quantile plots to investigate the how well the distribution of the means fits a theoretical normal distribution.

Unsurprisingly, the means of random samples drawn from a perfect normal distribution are themselves normally distributed. Even with a sample size as small as 2. It is intuitive that small sample sizes have more uncertainty associated with our estimate of the true mean, which is reflected by the relatively broad normal distribution of the means. As we increase the sample size the distribution of the means becomes more pointy and narrow, indicating that our estimate of the true mean $\mu$ becomes more and more accurate. Note also, that the y-axis changes as we increase the sample size. This is a visual confirmation that the standard deviation of the distribution of the means is given by $\sigma / \sqrt{n}$.

Let’s turn to an exponential sampling distribution with $\lambda$ = 1/4 next. Recall that both the mean and standard deviation of an exponential distribution is $1 / \lambda$. This one is clearly not normal.

I simulated random samples for different sample sizes as described above for the normal distribtion and calculated the means.

At smaller sample sizes, the deviation of the actual distribution of the means from the theoretical distribution of the means is obvious. It clearly retains some characteristics of an exponential distribution. As we increase the sample size, the fit becomes better and better, until it eventually morphes into a normal distribution.

Does the CLT hold for an arbitrary distribution? Well, let’s consider this crazy sampling distribution I made up using a combination of normal, exponential and uniform distributions.

Simulation of random samples using different sample sizes as before.

As predicted, the CLT holds even for a non-standard sampling distribution. Granted, I did not challenge the assumptions of the CLT too much using for example an extreme tail (skew). I trust this is good enough to convince you that it would just take a few more samples before convergence.

### Why is a sample size of 30 large enough?

Back to our original question: what is a large enough sample? We have seen that the major determinant is the shape of the sampling distribution. The more normal it is to begin with, the fewer samples we will need to reach convergence towards a normal distribution of the means.

In practice we do not generate 10000 random samples (10000 experiments!) to get a distribution of the means. We estimate the mean and standard deviation from a single random sample. The larger the random sample, the better will be our estimate of the true mean $\mu$ and the standard deviation $\sigma$. This follows directly from the Law of large numbers. It is often recommended in statistics textbooks that as a rule of thumb a sample size of 30 can be considered “large”. But why exactly 30? I think there is a practical and a pragmatic argument to be made.

In the simulations we saw that the distribution of the means of a random sample drawn from a (not too crazy) non-normal sampling distribution will be very close to normal. This means that our estimates of the mean and standard deviation of that distribution will be sufficient to describe the distribution of the means and we can use them in hypothesis testing with some confidence (no pun intended).

A more pragmatic argument would make use of the relationship between the sample size and our uncertainty about the true mean of the sampling distribution. Irrespective of the standard deviation $\sigma$ of the sampling distribution, the standard error $\sigma / \sqrt{n}$ decreases proportional to $\sqrt{n}$. Common sense dictates that increasing the sample size beyond a certain point will result in ever diminishing gains in precision. Here is a graphical representation of the relationship between the standard error and sample size.

As you can see, a sample size of 30 sits right at the point where the curve stops to have an exponential and starts to have a linear decrease. In other words, a sample size of 30 represents the sweet spot in terms of the most “bang for the buck”, no matter the magnitude of the standard deviation of the original sampling distribution.

You might ask, what if the standard deviation is a large value? Well, then our estimate of the true mean will be pretty bad. We will have to increase the sample size and deal with the fact that gains in precision will be ever smaller as $n$ goes beyond 30.

In biomedical research we often face the situation that even a sample size of 30 is unattainable in terms of time or money. Fortunately, there is a solution for that dilemma: Student’s t-distribution. I will investigate how the CLT relates to the t-distribution and hypothesis testing in the next post.

### Reproducibility

The full R code is available on Github.

# Tidy unnesting

At least once a week, I have to work with a data set that has “nested” measurements in one of its columns.

Such data violates rule #2 of Hadley Wickam’s definition of tidy data. Not all observations are in separate rows. In order to work with this data set, we generally want to “unnest” those measurements to make each a separate row.

### The “untidy” way

Ordinarily, I would convert the untidy data to tidy data using a cumbersome sequence of messy commands that involve splitting the entries in “value” into lists, then counting the elements of each list, and replicating each row of the data frame accordingly.

library(stringr)
# split "value" into lists
values <- str_split(data$value, ";") # count number of elements for each list n <- sapply(values, length) # replicate rownames of data based on elements for each list row_rep <- unlist(mapply(rep, rownames(data), n)) # replicate rows of original data data_tidy <- data[row_rep, ] # replace nested measurements with unnested measurements data_tidy$value <- unlist(values)
# reformat row names
rownames(data_tidy) <- seq(nrow(data_tidy))

### The “tidy” way

Is it really necessary to go through all those (untidy!) steps to tidy up that data set? It turns out, it is not. In comes the “unnest” function in the “tidyr” package.

library(tidyr)
# use dplyr/magrittr style piping
data_tidy2 <- data %>%
# split "value" into lists
transform(value = str_split(value, ";")) %>%
# unnest magic
unnest(value)

Much tidier! Just split and “unnest”. On top of that, “unnest” nicely fits into a “dplyr”-style data processing workflow using “magrittr” piping (“%>%”)

all.equal(data_tidy, data_tidy2)

The results of both methods are equivalent. Your choice, I have made mine!

### Synonymous fission yeast gene names

This is how the workflow would look like using an ID mapping file of synonymous gene names of the fission yeast Schizosaccharomyces pombe. The file can be obtained from the “Pombase” website.

# read data
names(raw) <- c("orf", "symbol", "synonyms", "protein")
# unnest
data <- raw %>%
transform(synonyms = str_split(synonyms, ",")) %>%
unnest(synonyms)

Tidy code is almost as much of a blessing as tidy data.

### Reproducibility

The full R code is available on Github.

# PCA – Part 5: Eigenpets

In this post scriptum to my series on Principal Component Analysis (PCA) I will show how PCA can be applied to image analysis. Given a number of images of faces, PCA decomposes those images into “eigenfaces” that are the basis of some facial recognition algorithms. Eigenfaces are the eigenvectors of the image data matrix. I have shown in Part 3 of this series that the eigenvectors that capture a given amount of variance of the data can be used to obtain an approximation of the original data using fewer dimensions. Likewise, we can approximate the image of a human face by a weighted combination of eigenfaces.

### From images to matrices

A digital image is just a matrix of numbers. Fair game for PCA. You might ask yourself, though, how to coerce many matrices into a single data matrix with samples in the rows and features in the columns? Just stack the columns of the image matrices to get a single long vector and then stack the image vectors to obtain the data matrix. For example, a 64 by 64 image matrix would result in a 4096-element image vector, and 100 such image vectors would be stacked into a 100 by 4096 data matrix.

The more elements a matrix has, the more computationally expensive it becomes to do the matrix factorization that yields the eigenvectors and eigenvalues. As the number of images (samples) is usually much smaller than the number of pixels (features), it is more efficient to compute the eigenvectors of the transpose of the data matrix with the pixels in the rows and the images in the columns.

Fortunately, there is an easy way to get from the eigenvectors of the covariance matrix $\boldsymbol A^T \boldsymbol A$ to those of the covariance matrix $\boldsymbol A \boldsymbol A^T$. The eigenvector equation of $\boldsymbol A^T \boldsymbol A$ is

$\boldsymbol A^T \boldsymbol A \vec{v} = \lambda \vec{v}$

Multiplying $\boldsymbol A$ to the left on both sides gives us important clues about the relationship between the eigenvectors and eigenvalues between the two matrices.

$\boldsymbol A \boldsymbol A^T (\boldsymbol A \vec{v}) = \lambda (\boldsymbol A \vec{v})$

The eigenvalues of the covariance matrices $\boldsymbol A^T \boldsymbol A$ and $\boldsymbol A \boldsymbol A^T$ are identical. If $\boldsymbol A$ is an $m$ by $n$ matrix and $m < n$, there will be $m$ nonzero eigenvalues and $n-m$ zero eigenvalues.

To get from an eigenvector $\vec{v}$ of $\boldsymbol A^T \boldsymbol A$ to an eigenvector of $\boldsymbol A \boldsymbol A^T$, we just need to multiply by $\boldsymbol A$ on the left.

### What does an “eigenpet” look like?

For this demonstration, I will not be using images of human faces but, in line with the predominant interests of the internet, faces of cats and dogs. I obtained this data set when I took the course “Computational Methods for Data Analysis” on Coursera and converted the original data to text files to make them more accessible to R. The data can be found on Github.

library(RCurl)
cats <- read.table(text = getURL("https://raw.githubusercontent.com/bioramble/pca/master/cat.csv"), sep = ",")
dogs <- read.table(text = getURL("https://raw.githubusercontent.com/bioramble/pca/master/dog.csv"), sep = ",")
# combine cats and dogs into single data frame
pets <- cbind(cats, dogs)

The data matrix already is in a convenient format. Each 64 by 64 pixel image has been converted into a 4096 pixel vector and each of the 160 image vector is stacked vertically to obtain a data matrix with dimensions 4096 by 160. As you might have guessed, there are 80 cats and 80 dogs in the data set.

The distinction between what is a sample and what is a feature becomes a little blurred in this analysis. Technically, the 160 images are the samples and the 4096 pixels are the features, so we should do PCA on a 160 by 4096 matrix. However, as discussed above it is more convenient to operate with the transpose of this matrix, which is why image data usually is prepared in its transposed form with features in rows and samples in columns.

As we have seen in theoretically in Part 2 of this series, it is necessary to center (and scale) the features before performing PCA. We are dealing with 8-bit greyscale pixel values that are naturally bounded between 0 and 255, so they already are on the same scale. Moreover, all features measure the same quantity (brightness), so it is customary to center the data by subtracting the “average” image from the data.

# compute "average" pet
pet0 <- rowMeans(pets)
cat0 <- rowMeans(pets[, 1:80])
dog0 <- rowMeans(pets[, 81:160])

So what does the average pet, the average cat, average dog look like?

# create grey scale color map
greys <- gray.colors(256, start = 0, end = 1)
# convenience function to plot pets
show_image <- function(v, n = 64, col = greys) {
# transform image vector back to matrix
m <- matrix(v, ncol = n, byrow = TRUE)
# invert columns to obtain right orientation
# plot using "image"
image(m[, nrow(m):1], col = col, axes = FALSE)
}
# plot average pets
for (i in list(pet0, cat0, dog0)) {
show_image(i)
}

As expected, the average pet has features of both cats and dogs, while the average cat and dog are quite recognizable as members of their respective species.

Let’s run PCA on the data set and see what an “eigenpet” looks like.

# subtract average pet
pets0 <- pets - pet0
# run pca
pc <- prcomp(pets0, center = FALSE, scale. = FALSE)

Ordinarily, we would find the eigenvector matrix in the “rotation” object return to us by “prcomp”. Remember, that we did PCA on the transpose of the data matrix, so we have to do some additional work to get to the eigenvectors of the original data. I have shown above that to get from the eigenvectors of $\boldsymbol A^T \boldsymbol A$ to the eigenvectors of $\boldsymbol A \boldsymbol A^T$, we just need to multiply by $\boldsymbol A$ on the left. $\boldsymbol A$, in this case, is our centered data matrix “pets0”.

Note that the unscaled eigenvectors of the eigenfaces are equivalent to the projection of the data onto the eigenvectors of the transposed data matrix. Therefore, we do not have to explicitly compute them but can use the “pc$x” object. # obtain unscaled eigenvectors of eigenfaces u_unscaled <- as.matrix(pets0) %*% pc$rotation
# this turns out to be the same as the projection of the data
# stored in "pc$x" all.equal(u_unscaled, pc$x)

Both “u_unscaled” and “pc$x” are unscaled versions of the eigenvectors, which means that they are not unitary matrices. For plotting, this does not matter because the images will be scaled automatically. If scaled eigenvectors are important, it is more convenient to use singular value decomposition and use the left eigenvalues stored in the matrix “u”. # singular value decomposition of data sv <- svd(pets0) # left eigenvalues are stored in matrix "u" u <- sv$u

Let’s look at the first couple of “eigenpets” (eigenfaces).

# display first 6 eigenfaces
for (i in seq(6)) {
show_image(pc$x[, i]) }  Some eigenfaces are definitely more cat-like and others more dog-like. We also see a common issue with eigenfaces. The directions of highest variance are usually associated with the lighting conditions of the original images. Whether they are predominantly light or dark dominates the first couple of components. In this particular case, it appears that the images of cats have stronger contrasts between foreground and background. If we were to do face recognition, we would either preprocess the images to have comparable lighting conditions or exclude the first couple of eigenfaces. ### Reconstruction of Pets using “Eigenpets” Using the eigenfaces we can approximate or completely reconstruct the original images. Let’s see how this looks like with a couple of different variance cut-offs. # a number of variance cut-offs vars <- c(0.2, 0.5, 0.8, 0.9, 0.98, 1) # calculate cumulative explained variance var_expl <- cumsum(pc$sdev^2) / sum(pc$sdev^2) # get the number of components that explain a given amount of variance npc <- sapply(vars, function(v) which(var_expl >= v)[1]) # reconstruct four cats and four dogs for (i in seq(79, 82)) { for (j in npc) { # project data using "j" principal components r <- pc$x[, 1:j] %*% t(pc$rotation[, 1:j]) show_image(r[, i]) text(x = 0.01, y = 0.05, pos = 4, labels = paste("v =", round(var_expl[j], 2))) text(x = 0.99, y = 0.05, pos = 2, labels = paste("pc =", j)) } }  Every pet starts out looking like a cat due to the dominance of lighting conditions. Somewhere between 80% and 90% of captured variance, every pet is clearly identifiable as either a cat or a dog. Even at 90% of capture variance, we use less than one third of all components for our approximation of the original image. This may be enough for a machine learning algorithm to tell apart a cat from a dog with high confidence. We see, however, that a lot of the detail of the image is contained in the last two thirds of the components. ### Reproducibility The full R code is available on Github. ### Further Reading Scholarpedia – Eigenfaces Jeff Jauregui – Principal Component Analysis with Linear Algebra ### PCA SERIES Part 1: An Intuition Part 2: A Look Behind The Curtain Part 3: In the Trenches Part 4: Potential Pitfalls Part 5: Eigenpets # PCA – Part 3: In the Trenches Now that we have an intuition of what principal component analysis (PCA) is and understand some of the mathematics behind it, it is time we make PCA work for us. Practical examples of PCA typically use Ronald Fisher’s famous “Iris” data set, which contains four measurements of leaf lenghts and widths of three subspecies of Iris flowers. To mix things up a little bit, I will use a data set that is closer to what you would encounter in the real world. The “Human Activity Recognition Using Smartphones Data Set” available from the UCI Machine Learning Repository contains a total of 561 triaxial acceleration and angular velocity measurements of 30 subjects performing different movements such as sitting, standing, and walking. The researchers collected this data set to ask whether those measurements would be sufficient to tell the type of activity of the person. Instead of focusing on this classification problem, we will look at the structure of the data and investigate using PCA whether we can express the information contained in the 561 different measurements in a more compact form. I will be using a subset of the data containing the measurements of only three subjects. As always, the code used for the pre-processing steps of the raw data can be found on GitHub. ### Step 1: Explore the data Let’s first load the pre-processed subset of the data into our R session. # read data from Github measurements <- read.table(text = getURL("https://raw.githubusercontent.com/bioramble/pca/master/pca_part3_measurements.txt")) description <- read.table(text = getURL("https://raw.githubusercontent.com/bioramble/pca/master/pca_part3_description.txt"))  It’s always a good idea to check for a couple of basic things first. The big three I usually check are: • What are dimensions of the data, i.e. how many rows and columns? • What type of features are we dealing with, i.e. categorical, ordinal, continuous? • Are there any missing values? The answer to those three questions will determine the amount of additional data munging we have to do before we can use the data for PCA. # what are the dimensions of the data? dim(measurements) # what type of data are the features? table(sapply(measurements, class)) # are there missing values? any(is.na(measurements))  The data contains 990 samples (rows) with 561 measurements (columns) each. Clearly too many measurements for visualizing on a scatterplot. The measurements are all of type “numeric”, which means we are dealing with continuous variables. This is great because categorical and ordinal variable are not handled well by PCA. Those need to be “dummy coded“. We also don’t have to worry about missing values. Strategies for handling missing values are a topic on its own. Before we run PCA on the data, we should look at the correlation structure of the features. If there are features, i.e. measurements in our case, that are highly correlated (or anti-correlated), there is redundancy within the data set and PCA will be able to find a more compact representation of the data. # feature correlation before PCA cor_m <- cor(measurements, method = "pearson") # use only upper triangular matrix to avoid redundancy upt_m <- cor_m[upper.tri(cor_m)] # plot correlations as histogram hist(upt_m, prob = TRUE) # plot correlations as image image.plot(cor_m, axes = FALSE)  The code was simplified for clarity. The full version can be found in the script. We see in the histogram on the left that there is a considerable number of highly correlated features, most of them positively correlated. Those features show up as yellow in the image representation to the right. PCA will likely be able to provide us with a good lower dimensional approximation of this data set. ### Step 2: Run PCA After all the preparation, running PCA is just one line of code. Remember, that we need to at least center the data before using PCA (Why? see Part 2). Scaling is technically only necessary if the magnitude of the features are vastly different. Note, that the data appears to be already centered and scaled from the get-go. # run PCA pc <- prcomp(measurements, center = TRUE, scale. = TRUE)  Depending on your system and the number of features of your data this may take a couple of seconds. The call to “prcomp” has constructed new features by linear combinations of the old features and sorted them by their and weighted by the amount of variance they explain. Because the new features are the eigenvectors of the feature covariance matrix, they should be orthogonal, and hence uncorrelated, by definition. Let’s visualize this directly. The new representation of the data is stored as a matrix named “x” in the list object we get back from “prcomp”. In our case, the matrix would be stored as “pc$x”.

# feature correlation before PCA
cor_r <- cor(pc$x, method = "pearson") # use only upper triangular matrix to avoid redundancy upt_r <- cor_r[upper.tri(cor_r)] # plot correlations as histogram hist(upt_r, prob = TRUE) # plot correlations as image image.plot(cor_r, axes = FALSE)  The new features are clearly no longer correlated to each other. As everything seems to be in order, we can now focus on the interpretation of the results. ### Step 3: Interpret the results The first thing you will want to check is how much variance is explained by each component. In PCA speak, this can be visualized with a “scree plot”. R conveniently has a built-in function to draw such a plot. # draw a scree plot screeplot(pc, npc = 10, type = "line")  This is about as good as it gets. A large amount of the variance is captured by the first principal component followed by a sharp decline as the remaining components gradually explain less and less variance approaching zero. The decision of how many components we should use to get a good approximation of the data has to be made on a case-by-case basis. The cut-offs for the percent explained variance depends on the kind of data you are working with and its inherent covariance structure. The majority of the data sets you will encounter are not nearly as well behaved as this one, meaning that the decline in explained variance is much more shallow. Common cut-offs range from 80% to 95% of explained variance. Let’s look at how many components we would need to explain a given amount of variance. In the R implementation of PCA, the variances explained by each principle component are stored in a vector called “sdev”. As the name implies, these are standard deviations or the square roots of the variances, which in turn are scaled versions of the eigenvalues. We will need to take the squares “sdev” to get back the variances. # calculate explained variance as cumulative sum # sdev are the square roots of the variance var_expl <- cumsum(pc$sdev^2) / sum(pc$sdev^2) # plot explained variance plot(c(0, var_expl), type = "l", lwd = 2, ylim = c(0, 1), xlab = "Principal Components", ylab = "Variance explained") # plot number of components needed to for common cut-offs of variance explained vars <- c(0.8, 0.9, 0.95, 0.99) for (v in vars) { npc <- which(var_expl > v)[1] lines(x = c(0, npc, npc), y = c(v, v, 0), lty = 3) text(x = npc, y = v - 0.05, labels = npc, pos = 4) points(x = npc, y = v) }  The first principle component on its own explains more than 50% of the variance and we need only 20 components to get up to 80% of the explained variance. Fewer than 30% of the components (162 out of 561) are needed to capture 99% of the variance in the data set. This is a dramatic reduction of complexity. Being able to approximate the data set with a much smaller number of features can greatly speed up downstream analysis and can help to visualize the data graphically. Finally, let’s investigate whether “variance” translates to “information”. In other words, do the prinicipal components associated with the largest eigenvalues discriminate between the different human activities? If the class labels (“activities” in our case) are known, a good way to do look at the “information content” of the principal components is to look at scatter plots of the first couple of components and color-code the samples by class label. This code gives you a bare bones version of the figure shown below. The complete code can be found on Github. # plot the first 8 principal components against each other for(p in seq(1, 8, by = 2)) { plot(pc$x[, p:(p+1)], pch = 16,
col = as.numeric(description$activity_name)) }  We have seen previously that the first component alone explains about half of the variance and in this figure we see why. It almost perfectly separates non-moving “activities” (“laying”, “sitting”, “standing”) from moving activities (various types of “walking”). The second component does a reasonable job at telling the difference between walking and walking upstairs. As we move down the list, there remains visible structure but distinctions become somewhat less clear. One conclusion we can draw from this visualization is that it will most likely be most difficult to tell “sitting” apart from “standing” as none of the dimensions seems to be able to distinguish red and green samples. Oddly enough, the fifth component does a pretty good job of separating “laying” from “sitting” and “standing”. ### Recap PCA can be a powerful technique to obtain low dimensional approximations of data with lots of redundant features. The “Human Activity Recognition Using Smartphones Data Set” used in this tutorial is a particularly good example of that. Most real data sets will not be reduced to a few components so easily while retaining most of the information. But even cutting the number of features in half can lead to considerable time savings when using machine learning algorithms. Here are a couple of useful questions when approaching a new data set to apply PCA to: 1. Are the features numerical or do I have to convert categorial features? 2. Are there missing values and if yes, which strategy do I apply to deal with them? 3. What is the correlation structure of the data? Will PCA be effective in this case? 4. What is the distribution of variances after PCA? Do I see a steep or shallow decline in explained variance? 5. How much “explained variance” is a good enough approximation of the data? This is usually a compromise between how much potential information I am willing to sacrifice for cutting down computation time of follow-up analyses. In the final part of this series, we will discuss some of the limitations of PCA. ### Addendum: Understanding “prcomp” The “prcomp” function is very convenient because it caclulates all the numbers we could possible want from our PCA analysis in one line. However, it is useful to know how those number were generated. The three most frequently used objects returned by “prcomp” are • “rotation”: right eigenvectors (“feature eigenvectors”) • “sdev”: square roots of scaled eigenvalues • “x”: projection of original data onto the new features #### Rotation In Part 2, I mentioned that software implementations of PCA usually compute the eigenvectors of the data matrix using singular value decomposition (SVD) rather than eigendecomposition of the covariance matrix. In fact, R’s “prcomp” is no exception. “Rotation” is a matrix whose columns are the right eigenvalues of the original data. We can reconstruct “rotation” using SVD. # perform singular value decomposition on centered and scaled data sv <- svd(scale(measurements)) # "prcomp" stores right eigenvectors in "rotation" w <- pc$rotation
dimnames(w) = NULL
# "svd" stores right eigenvectors in matrix "v"

#### x

The projection of the orignal data (“measurements”) onto its eigenbasis is automatically calculated by “prcomp” through its default argument “retx = TRUE” and stored in “x”. We can manually recreate the projection using matrix-matrix multiplication.

# manual projection of data
all.equal(pc$x, scale(measurements) %*% pc$rotation)

If we wanted to obtain a projection of the data onto a lower dimensional subspace, we just determine the number of components needed and subset the columns of matrix “x”. For example, if we wanted to get an approximation of the original data preserving 90% of the variance, we take the first 52 columns of “x”.

# projection of original data preserving 90% of variance
y90 <- pc$x[, 1:52] # note that this is equivalent matrix multiplication with # the first 52 eigenvectors all.equal(y90, scale(measurements) %*% pc$rotation[, 1:52])

### Reproducibility

The full R code is available on Github.

##### IRIS data set

Sebastian Raschka – Principle Component Analysis in 3 Simple Steps

### PCA SERIES

Part 1: An Intuition

Part 2: A Look Behind The Curtain

Part 3: In the Trenches

Part 4: Potential Pitfalls

Part 5: Eigenpets

format: plain


text:
Article Contents
Article Contents

# Stabilization of the simplest normal parabolic equation

• The simplest semilinear parabolic equation of normal type with periodic boundary condition is considered, and the problem of stabilization to zero of its solution with arbitrary initial condition by starting control supported in a prescribed subset is investigated. This problem is reduced to one inequality for starting control, and the proof of this inequality is given.
Mathematics Subject Classification: Primary: 37D10, 40H05; Secondary: 35K57, 35B38.

 Citation:

•  [1] V. Barbu, Feedback stabilization of Navier-Stokes equations, ESAIM: Control, Optimization and Calculus of Variation, 9 (2003), 197-205.doi: 10.1051/cocv:2003009. [2] V. Barbu and R. Triggiani, Internal stabilization of Navier-Stokes equations with finite-dimentional controllers, Indiana Univ. Math. J., 53 (2004), 1443-1494.doi: 10.1512/iumj.2004.53.2445. [3] V. Barbu, I. Lasiecka and R. Triggiani, Abstract setting of tangential boundary stabilization of Navier-Stokes equations by high-andlow-gain feedback controllers, Nonlinear Analysis, 64 (2006), 2704-2746.doi: 10.1016/j.na.2005.09.012. [4] V. Barbu, S. Rodrigues and A. Shirikyan, Internal exponential stabilization to a non-stationary solution for 3D Navier-Stokes equations, SIAM J. Control Optim., 49 (2011), 1454-1478.doi: 10.1137/100785739. [5] J. M. Coron, On null asymptotic stabilization of the two-dimensional incompressible Euler equations in a simply connected domains, SIAM J. ControlOptim., 37 (1999), 1874-1896.doi: 10.1137/S036301299834140X. [6] J. M. Coron, Control and Nonlinearity, Math.Surveys and Monographs, 136 AMS, Providence, RI, 2007. [7] A. V. Fursikov, On one semilinear parabolic equation of normal type, in Proceeding volume "Mathematics and life sciences", De Gruyter, 1 (2012), 147-160. [8] A. V. Fursikov, The simplest semilinear parabolic equation of normal type, Mathematical Control and Related Fields(MCRF), 2 (2012), 141-170.doi: 10.3934/mcrf.2012.2.141. [9] A. V. Fursikov, On the normal semilinear parabolic equations corresponding to 3D Navier-Stokes system, in CSMO 2011, IFIP AICT 391 (eds D.Homberg and F.Troltzsch), (2013), 338-347. [10] A. V. Fursikov, On parabolic system of normal type corresponding to 3D Helmholtz system, work in progress. [11] A. V. Fursikov, Stabilizability of quasi linear parabolic equation by feedback boundary control, Sbornik: Mathematics, 192 (2001), 593-639.doi: 10.1070/sm2001v192n04ABEH000560. [12] A. V. Fursikov, Stabilizability of Two-Dimensional Navier-Stokes equations with help of a boundary feedback control, J. of Math. Fluid Mech., 3 (2001), 259-301.doi: 10.1007/PL00000972. [13] A. V. Fursikov, Real process corresponding to 3D-Navier Stokes system and its feedback stabilization from boundary, Amer. Math. Soc. Transl. Series 2, 206, Advances in Math.Sciences-51. PDE M. Vishik seminar (2002), 95-123. [14] A. V. Fursikov, Real processes and realizability of a stabilization method for Navier-Stokes equations by boundary feedback control, Nonlinear Problems in Mathematical Physics and Related Topics II, In Honor of Professor O. A. Ladyzhenskaya, Kluwer/Plenum Publishers, New-York, Boston, Dordrecht, London, Moscow, (2002), 137-177.doi: 10.1007/978-1-4615-0701-7_8. [15] A. V. Fursikov, Stabilization for the 3D Navier-Stokes system by feedback boundary control, Discrete and Cont. Dyn. Syst., 10 (2004), 289-314.doi: 10.3934/dcds.2004.10.289. [16] A. V. Fursikov, Optimal Control of Distributed Systems. Theory and Applications, Translations of Mathematical Monographs, 187, Amer. Math. Society, Providence, Rhode Island, 2000. [17] A. V. Fursikov and A. V. Gorshkov, Certain questions of feedback stabilization for Navier-Stokes equations, Evolution equations and control theory (EECT), 1 (2012), 109-140.doi: 10.3934/eect.2012.1.109. [18] A. V. Fursikov and A. A. Kornev, Feedback stabilization for Navier-Stokes equations: theory and calculations, in Mathematical Aspects of Fluid Mechanics (LMS Lecture Notes Series), 402, Cambridge University Press, (2012), 130-172. [19] M. Krstic, On global stabilization of Burgers' equation by boundary control, Systems & Control Letters, 37 (1999), 123-141.doi: 10.1016/S0167-6911(99)00013-4. [20] J.-P. Raymond, Feedback boundary stabilization of the twodimensional Navier-Stokes equations, SIAM J. Control Optimization, 45 (2006), 709-728.doi: 10.1137/050628726. [21] J.-P. Raymond, Feedback boundary stabilization of the three-dimensional incompressible Navier-Stokes equations, J. Math. Pures Appl., 87 (2007), 627-669.doi: 10.1016/j.matpur.2007.04.002. [22] J.-P. Raymond and L. Thevenet, Boundary feedback stabilization of the two dimensional Navier-Stokes equations with finite dimensional controllers, Discrete and Continuous Dynamical Systems-A, 27 (2010), 1159-1187.doi: 10.3934/dcds.2010.27.1159. [23] M. Tucsnak and G. Weiss, Observation and Control for Operator Semigroups, Birkhauser Verlag AG, Basel, Boston, Berlin, 2009.doi: 10.1007/978-3-7643-8994-9. [24] V. I. Yudovich, Non-stationary flows of an ideal incompressible fluid, Zh. Vychisl. Mat. Mat. Fiz., 3 (1963), 1032-1066 (Russian).


text:
Heat Capacity and Microscopic Changes

Submitted by ChemPRIME Staff on Thu, 12/16/2010 - 15:05

Let us turn our attention from the macroscopic to the microscopic level. According to the first law of thermodynamicsA formal statement that energy can neither be created nor destroyed; as applied to chemical systems, the change in internal energy is equal to the heat energy transfer into the system plus the work energy transfer into the system., the heatEnergy transferred as a result of a temperature difference; a form of energy stored in the movement of atomic-sized particles. energyA system's capacity to do work. absorbed as we raise the temperatureA physical property that indicates whether one object can transfer thermal energy to another object. of a substanceA material that is either an element or that has a fixed ratio of elements in its chemical formula. cannot be destroyed. But where does it go? In the case of a monatomic gasA state of matter in which a substance occupies the full volume of its container and changes shape to match the shape of the container. In a gas the distance between particles is much greater than the diameters of the particles themselves; hence the distances between particles can change as necessary so that the matter uniformly occupies its container., like neon, this question is easy to answer. All the energy absorbed is converted into the kinetic energy of the neon molecules (atomsThe smallest particle of an element that can be involved in chemical combination with another element; an atom consists of protons and neutrons in a tiny, very dense nucleus, surrounded by electrons, which occupy most of its volume.). In other sections, we found that the kinetic energy of the molecules in a sample of gas is given by the expression

$E_{k}=\tfrac{\text{3}}{\text{2}}nRT$      (1)

Thus if the temperature of a sample of neon gas is raised from T1 to T2, the kinetic energy of the molecules increases from 3/2 nRT1 to 3/2 nRT2, a total change of

$\tfrac{3}{2}nR\left( T_{2}-T_{1}\right) =\left( \tfrac{3}{2}R\right) n\left( T_{2}-T_{1}\right)$       (2)

Inserting the value of R in appropriate units, we obtain

$\begin{matrix}\frac{3}{2}\left(8.314\frac{\text{J}}{\text{K mol}}\right)n\left(T_{2}-T_{1}\right)=\left(12.47\frac{\text{J}}{\text{K mol}}\right)n\left(T_{2}-T_{1}\right)\end{matrix}$

This is the same quantity that is obtained by substituting the experimental value of CV for neon (calculated in Example 2 from Heat Capacities) into Eq. (4) from Heat Capacities. In other words the quantity of heat found experimentally exactly matches the increase in kinetic energy of the molecules required by the kinetic theory of gases.

Table 1 lists the CV values not only for neon but for some other gases as well. We immediately notice that only the noble gases and other mon-atomic gases such as Hg and Na have molar heat capacities equal to 3/2R, or 12.47 J K–1 mol–1. All other gases have higher molar heat capacities than this. Moreover, as the table shows, the more complexA central metal and the ligands surrounding it; also called coordination complex. the molecule, the higher the molar heat capacityThe quantity of heat energy transfer needed to raise the temperature of a sample of matter by one unit. of the gas. There is a simple reason for this behavior.

TABLE 1. Molar Heat Capacities at Constant Volume (CV) for Various Gases (Values at 298 K Unless Otherwise Stated).

 Gas Cv /J K-1 mol-1 Gas Cv /J K-1 mol-1 Monoatomic Gases Triatomic Gases Ne 12.47 CO2 28.81 Ar 12.47 N2O 30.50 Hg 12.47 (700K) SO2 31.56 Na 12.47 (1200K) Diatomic Gases Alkanes N2 20.81 CH4 27.42 O2 21.06 C2H6 44.32 Cl2 25.62 C3H8 65.20 C4H10 89.94

A molecule which has two or more atoms is not only capable of moving from one place to another (translational motion), it can also rotate about itself, and it can change its shape by vibrating. When we heat a mole of Cl2 molecules, for example, we not only need to supply them with enough energy to make them move around faster (increase their translational kinetic energy), we must also supply an additional quantity of energy to make them rotate and vibrate more strongly than before. For a mole of more complex molecules like n-butane even more energy is required since the molecule is capable of changing its shape in all sorts of ways. In the butane molecule there are three C—C bonds around which segments of the molecule can rotate freely. All the bonds can bend or stretch, and the whole molecule can rotate as well. Such a molecule is constantly flexing and writhing at room temperature. As we raise the temperature, this kind of movement occurs more rapidly and extra energy must be absorbed in order to make this possible.

When we heat solids and liquids, the situation is somewhat different than for gases. The rapid increase of vapor pressureThe pressure (or partial pressure) exerted by the gaseous form of a substance in equilibrium with the liquid form. with temperature makes it virtually impossible to heat a solid or liquid in a closed container, and so heat capacities are always measured at constant pressure rather than at constant volume. Some Cp values for selected simple liquids and solids at the melting pointThe temperature at which a solid becomes a liquid. Also called freezing point. are shown in Table 2. In general the heat capacities of solids and liquids are higher than those of gases. This is because of the intermolecular forces operating in solids and liquids. When we heat solids and liquids, we need to supply them with potential energy as well as kinetic energy. Among the solids, the heat capacities of the metals are easiest to explain since the solid consists of individual atoms. Each atom can only vibrate in three dimensions. According to a theory first suggested by Einstein, this vibrational energy has the value 3RT, while the heat capacity is given by 3R = 24.9 J K–1 mol–1.

TABLE 2. Molar Heat Capacities at Constant Pressure Cp for Various Solids and Liquids at the MeltingThe process of a liquid forming from a solid. Point.

 Substance Cp (solid)/J K-1 mol-1 Cp (liquid)/J K-1 mol-1 Monoatomic Substances Hg 27.28 27.98 Pb 29.40 30.33 Na 28.20 31.51 Diatomic Substances Br2 53.8 75.7 I2 54.5 80.7 HCl 50.5 62.2 HI 47.5 68.6 Polyatomic Substances H2O 37.9 76.0 NH3 49.0 77.0 Benzene 129.0 131.0 n-Heptane 146.0 203.1

As can be seen from the table, most monatomic solids have Cp values slightly larger than this. This is because solids expand slightly on heating. The atoms get farther apart and thus increase in potential as well as vibrational energy.

Solids which contain molecules rather than atoms have much higher heat capacities than 3R. In addition to the vibration of the whole molecule about its site in the crystal latticeAn orderly, repeating arrangement of points in 3-D space in which each p;oint has surroundings identical to every other point. A crystal's constituent atoms, molecules, and ions are arranged about each lattice point., the individual atoms can also vibrate with respect to each other. Occasionally molecules can rotate in the crystalA solid with a regular polyhedral shape; for example, in sodium chloride (table salt) the crystal faces are all at 90° angles. A solid in which the atoms, molecules, or ions are arranged in a regular, repeating lattice structure., but usually rotation is only possible when the solid melts. As can be seen from the values for molecular liquids in Table 2, this sudden ability to rotate causes a sharp increase in the heat capacity. For monatomic substances, where there is no motion corresponding to the rotation of atoms around each other, the heat capacity of the liquid is only very slightly higher than that of the solid.


text:
# is M in beta-normal form?

Let $M \equiv \lambda z.zy$

is $M$ in $\beta$-normal form?

I know that the $\beta\text{-}nf$ class is defined as following:

(1) all atoms are in $\beta\text{-}nf$

(2) $M_1 ,...,M_n ∈ β\text{-}nf ⇒ aM_1 ...M_n ∈ β\text{-}nf\quad$ for all atoms $a$

(3) $M ∈ β\text{-}nf ⇒ λx.M ∈ β\text{-}nf$

So, by construction, I guess $M$ belongs to $β\text{-}nf$ by doing:

i) initialize a term as $y$ and call it $A_1$ (thus, $A_1 \equiv y$). By (1), $A_1 ∈ β\text{-}nf$

ii) by (2), let $n=1$ and $M_1 \equiv A_1$, so $zA_1$ should belong to $β\text{-}nf$. Let's say $A_2 \equiv zA_1$

iii) by (3), $\lambda z.A_2$ should belong to $β\text{-}nf$ since $A_2$ also does. Let's say $A_3 \equiv \lambda z.A_2$

as $A_2 \equiv zA_1$ and $A_1 \equiv y$, $A_2 \equiv zy$, thus $A_3 \equiv \lambda z.zy$

$M$ is obviously the same than $A_3$, so I guess $M$ belongs to $β\text{-}nf$. Is this right or I missed something in the way?

• $\beta$-normal form is usually defined as a lambda term for which no $\beta$-reductions apply. This is clearly the case for $M$. The $\beta$-$nf$ class you describe would normally be separately described and there would be a theorem stating that all irreducible lambda terms are in the $\beta$-$nf$ class. – Derek Elkins left SE Aug 29 '17 at 7:03
• I thought I could apply $y$ at the $\lambda z$ by doing $[y/z] z$ – Daniel Aug 29 '17 at 22:48
• If $\lambda z.zy$ means $(\lambda z.z)y$ then you would be correct, but it usually means $\lambda z.(zy)$ and this seems to be how you are interpreting it in your question (i.e. $A_2$). – Derek Elkins left SE Aug 29 '17 at 23:08

## 1 Answer

Indeed.   There is no need to introduce the $A_\star$ symbols though.

• Tokens $z$ and $y$ are atoms.

• Via (1), since they are atoms, therefore $z$ and $y$, are in $\beta$-nf.

• Via (2), since these atoms, $z$ and $y$, are in $\beta$-nf, therefore their product, $zy$, is too.

• Via (3), since such a thing as $zy$ is in $\beta$-nf, therefore the lambda expression $\lambda z {.} zy$ is too.

• Since $\bf M$ is that lambda expression, therefore $\bf M$ is in $\beta$-nf.

$\blacksquare$

• I was thinking that $\lambda z.zy$ wasn't $\beta$-normal because I thought $\lambda z.zy \rhd _{\beta} [y/z]z$, thus $\lambda z.zy \rhd _{\beta} y$. Why is this wrong? I guess that, by convention, $y$ is not applying to $\lambda z.z$ ? – Daniel Aug 29 '17 at 5:19
• Is there a condition missing from definition 3? – Graham Kemp Aug 29 '17 at 6:23
• No, all conditions are listed and no information was omitted – Daniel Aug 29 '17 at 6:29


text:
# Reasoning, Communication and Connections in Mathematics: Yearbook 2012, Association of Mathematics Educators

###### Berinderjeet Kaur and Toh Tin Lam, editors
Publisher:
World Scientific
Publication Date:
2012
Number of Pages:
326
Format:
Paperback
Price:
104.00
ISBN:
9789814405423
Category:
Anthology
[Reviewed by
Annie Selden
, on
04/23/2013
]

This fourth yearbook of the Singapore Association of Mathematics Educators contains fifteen chapters written by authors from various countries, mainly Singapore, Korea, Australia, and the U.S. The chapters stem from keynote lectures and workshops conducted during the 2011 Singapore Mathematics Teachers Conference. One of the reasons for the theme of this yearbook is that “After the curriculum review in 2006, the Singapore school mathematics framework expanded in scope to include reasoning, communication, and connections…” It may surprise U.S. readers that mathematics educators in Singapore, whose international test scores are always very high, while acknowledging that Singaporean students are very good at procedural tasks, also acknowledge that they are less good at conceptual reasoning and consider this is a matter of great concern.

The editors say that the yearbook is intended for teachers. However, it is a rather “mixed bag” in that some chapters report research studies in great detail, while others have very practical suggestions on how to modify textbooks tasks at both primary and secondary levels so they entail higher cognitive demand. One chapter describes numeracy in Australia and its importance, suggesting there might be opportunities for Singaporean teachers (of all school subjects) to promote literacy. While it is hard to see school teachers getting much out of the detailed research reports, they might well adopt some of the suggestions for modifying textbook tasks.

For example, in Chapter 4, Berinderjeet Kaur suggests that when dealing with the usual closed textbook tasks of primary school mathematics, a teacher might want to modify them by asking four “What?” questions: “What number makes sense?”, “What’s wrong?”, “What if?”, and “What’s the question, if you know the answer?”. This is illustrated with the following task: “Tickets to a concert cost $15 per adult and$8 per child. Mr. Wang bought tickets for 4 adults and 5 children. How much did he spend altogether? The suggestion is to modify this task as follows: Tickets to a concert cost ___ per adult and ___ per child. Mr. Wang paid ___ for ___ tickets. He bought tickets for ___ adults and ___ children. What numbers make sense? 4, 5, 9, $8,$15, \$100. Put the numbers in the boxes where you think they fit best.

From reading various chapters, one may learn some concepts that one perhaps did not know before, as well as some information about Singaporean mathematics classrooms. For example, in Chapter 9, titled, “Understanding Classroom Talk in Secondary Three Mathematics Classes in Singapore,” which reports the kinds of teacher questions focused upon and the relationships between different kinds of questions, one learns of the prevalence, in Singaporean mathematics classes, of IRE questions in which the teacher initiates (I), students respond (R), and the teacher evaluates (E) those responses. In general, it is thought that the primary function of IRE questions is evaluative or performative, rather than exploratory and constructive. Similarly, one can learn of “closed” known-answer test questions versus “open” questions, considered genuine, authentic, and information seeking, that do not seek one right answer or a limited range of acceptable answers.

Using data from a smaller, purposeful sample of a larger data set of 625 videographed lessons and transcriptions from over 1,000 Secondary 3 students in 30 Singaporean schools, the authors of Chapter 9 concentrated on three kinds of teacher questions: performative, procedural, and conceptual. Performative talk is talk that focuses on the use of closed questions to test student knowledge and generally entails IRE sequences. Procedural talk focuses on how students complete a procedure or algorithm. Conceptual talk is evidenced by classroom exchanges that focus on such areas as clarifying meaning, exploring how to solve problems, or offering reasons and explanations. The five authors conclude that “relationships between the three forms of talk are complementary rather than orthogonal: [Singaporean] teachers do not ask one kind of question and neglect others, but, up to a point, tend to ask all three kinds of questions.”

While one can get a lot from reading various chapters, a guide to the chapters would have been useful, so one would know which chapters to read depending on one’s interests. For example, it is clear that Chapters 2 and 11 report research studies; that Chapters 3, 5, 7, and 14 give practical suggestions for teachers; and that Chapters 13 and 15 give general information on numeracy in Australia. Some chapters are easy to read, whereas some are hard to read because of the technical terms and detailed analysis of data. In addition, there is no glossary and no index, so one cannot easily look up terms, such as “SEM model,” if one does not already know their meanings.

Annie Selden is Adjunct Professor of Mathematics at New Mexico State University and Professor Emerita of Mathematics from Tennessee Technological University. She regularly teaches graduate courses in mathematics and mathematics education. In 2002, she was recipient of the Association for Women in Mathematics 12th Annual Louise Hay Award for Contributions to Mathematics Education.

• Reasoning, Communication and Connections in Mathematics: An Introduction (Berinderjeet KAUR and TOH Tin Lam)
• The Epistemic Framing of Mathematical Tasks in Secondary Three Mathematics Lessons in Singapore (Ridzuan Abdul RAHIM, David HOGAN and Melvin CHAN)
• Modifying Textbook Exercises to Incorporate Reasoning and Communication into the Primary Mathematics Classroom (Denisse R THOMPSON)
• Some “What” Strategies that Advance Reasoning and Communication in Primary Mathematics Classrooms (Berinderjeet KAUR)
• Reasoning and Justification in the Secondary Mathematics Classroom (Denisse R THOMPSON)
• LOGO Project-Based Mathematics Learning for Communication, Reasoning and Connection (Hee-Chan LEW and In-Ok JANG)
• Reasoning, Communication and Connections in A-Level Mathematics (TOH Tin Lam)
• Visual and Spatial Reasoning: The Changing Form of Mathematics Representation and Communication (Tom LOWRIE)
• Understanding Classroom Talk in Secondary Three Mathematics Classes in Singapore (David HOGAN, Ridzuan Abdul RAHIM, Melvin CHAN, Dennis KWEK and Philip TOWNDROW)
• Mathematics Classroom Discourse Through Analogical Reasoning (Kyeong-Hwa LEE)
• Students' Reasoning Errors in Writing Proof by Mathematical Induction (Alwyn Wai-Kit PANG and Jaguthsing DINDYAL)
• Presenting Mathematics as Connected in the Secondary Classroom (LEONG Yew Hoong)
• Numeracy: Connecting Mathematics (Barry KISSANE)
• Making Connections Between School Mathematics and the Everyday World: The Example of Health (Marian KEMP)
• Mathematics, Astronomy and Culture: Helping Students See Connections (Helmer ASLAKSEN)


text:
ID 683823
Date 10/31/2022
Public

## 2.1.4. Creating a Signature Chain Public Key Entry

Create a new public key entry for a signature chain with the append_key operation. You specify the prior signature chain, the private key for the last entry in the prior signature chain, the next level public key, the permissions and cancellation ID you assign to the next level public key, and the new signature chain file.

Depending on your use of keys on the file system or in an HSM, you use one of the following example commands to append the design0_sign public key to the root signature chain created in the prior section:
quartus_sign --family=agilex --operation=append_key \
--previous_pem=root0_private.pem --previous_qky=root0.qky \
--permission=6 --cancel=0 --input_pem=design0_sign_public.pem \
design0_sign_chain.qky
quartus_sign --family=agilex --operation=append_key --module=softHSM \
--module_args="--token_label=agilex-token --user_pin=agilex-token-pin \
--hsm_lib=/usr/local/lib/softhsm/libsofthsm2.so" \
--previous_keyname=root0 --previous_qky=root0.qky \
--permission=6 --cancel=0 --input_keyname=design0_sign design0_sign_chain.qky

You may repeat the append_key operation up to two more times for a maximum of three public key entries between the root entry and header block entry in any one signature chain.

The following example assumes you created another authentication public key with the same permissions and assigned cancellation ID 1 called design1_sign_public.pem, and are appending this key to the signature chain from the previous example:
quartus_sign --family=agilex --operation=append_key \
--previous_pem=design0_sign_private.pem \
--previous_qky=design0_sign_chain.qky \
--permission=6 \
--cancel=1 \
--input_pem=design1_sign_public.pem design1_sign_chain.qky
quartus_sign --family=agilex --operation=append_key --module=softHSM \
--module_args="--token_label=agilex-token \
--user_pin=agilex-token-pin \
--hsm_lib=/usr/local/lib/softhsm/libsofthsm2.so" \
--previous_keyname=design0_sign \
--previous_qky=design0_sign_chain.qky \
--permission=6 \
--cancel=1 \
--input_keyname=design1_sign design1_sign_chain.qky

Intel® Agilex® devices include an additional key cancellation counter to facilitate the use of a key that may change periodically throughout the life of a given device. You may select this key cancellation counter by changing the argument of the --cancel option to pts:pts_value.


text:
💬 👋 We’re always here. Join our Discord to connect with other students 24/7, any time, night or day.Join Here!

# If $\displaystyle f(x) = \int^x_0 (1 - t^2) e^{t^2} \,dt$, on what interval is $f$ increasing?

## increasing when $|x|<1,$ decreasing otherwise

Integrals

Integration

### Discussion

You must be signed in to discuss.

Lectures

Join Bootcamp

### Video Transcript

Okay, The first thing you know is the directive one minus X squared times E to the X squared. Now we know that we have one month's ex, Corde said. Equal to zero axes, Juan or negative one cause one are negative on squared, sort of this positive one know either the export always has to be positive. Therefore, we know that when access between negative 11 the function is increasing, so it's increasing. The absolute value of axe is less than one. That's essentially this simplified form in which we can write this, otherwise it's decreasing.

Integrals

Integration

Lectures

Join Bootcamp


text:
# Mathematics Colloquium | C S Rajan

## August 31 @ 4:30 pm - 5:30 pm

• This event has passed.

### Event Details

Speaker: C S Rajan
School of Mathematics, Tata Institute of Fundamental Research, Mumbai

Title: From Clay tablets to Clay Prize: Journey of the local-global principle in number theory

Abstract: Examples of Pythagorean triplets like $3^2+4^2=5^2, ~5^2+12^2=13^2$, etc. were known to ancient Sumerians. Starting with the theorem of Pythagoras and a beautiful proof attributed to Baudhayana (200 years before Pythagoras), we will describe the general formula to get all Pythagorean triplets.
We will next discuss how to solve more general quadratic equations using geometry, making use of stereographic projections. We will also relate it to the famous $t=tan(\theta/2)$
substitution used in integrating trigonometric functions.
This leads us to a theorem of Legendre and the beginnings of the local-global principle in number theory. We conclude by stating some open questions.
The talk should be accessible to students.

About the Speaker: Professor Rajan finished his M. Sc at IIT Kanpur in 1984. Since 1984, he has been at TIFR, got his Ph.D. in 1992. He spent the years 1994-96 as a postdoc at McGill University, Montreal.
Research Interests: He is interested in arithmetic geometry, automorphic forms, and representation theory.
Two questions that he is currently interested in: the first one is on a conjectural theme that the geometry associated to canonical metrics (for example, the spectrum of Laplace type operators associated to the metric) on the complex points of a variety defined over a number field (for various embeddings of the number field into complex numbers) should determine the arithmetic of the variety and vice versa.
In representation theory, he is interested in the arithmetic properties of characters of irreducible representations of a simple algebraic group, especially in knowing whether it is irreducible as an element in the ring of conjugacy invariant regular functions on the group.

### Details

Date:
August 31
Time:
4:30 pm - 5:30 pm

### Organizer

Department of Mathematics

Online


text:
# Glossary

## Trivial split

A split $S \mid S^{\textrm{c}}$ for which one set contains only one element.