text:
# Sample Size Matters: Design and Experiments

Previously, I introduced the idea that samples do not look exactly like the populations that they are drawn from, and had a closer look at what impact sample size has on our ability to estimate population statistics like mean, proportion or Cpk from samples. Here, I will have a closer look at how this uncertainty impacts our engineering process. In the next post, I will tie in the engineering impacts and decisions to the business value and costs.

### Difference to detect

When we are testing, we’re either testing to determine that the new product or process performs better than the old or, for cost reduction projects, that the cheaper product or process is at least as good as the existing one.

This means that we need to detect a difference between old and new values, such as a difference in the mean weight between the new and old parts. The larger the sample size, $n$ the smaller the difference, $\Delta$ that we can detect. The error, $\epsilon$, in our estimate of the differences gets smaller as sample size increases:

$\epsilon_{\Delta} \propto \frac{\sigma}{\sqrt{n}}$

Given the uncertainties in our estimate of $\mu$ and $\sigma$, illustrated above, it should be clear now that with small sample sizes we can only detect large differences of many multiples of the sample standard deviation, $S$.

### Mean

When trying to determine if a new product or process is better than an old one, we are usually interested in shifting the mean. We want a product to be lighter, provide more power, or a process to work faster. In such cases, we need to estimate the difference of the means, $\Delta = \mu_2 - \mu_1$ and ensure that it is different than 0 (or some other pre-determined value). The minimum difference that we can reliable detect is plotted below for different sample sizes.

### Standard deviation

In many Six Sigma projects, and any time we want to shift the mean closer to a specification limit, we need to compare the new population standard deviation with the old. The simplest way of making this comparison is by taking the ratio $F = \sigma_{2}^{2} / \sigma_{1}^{2}$, where $\sigma_{2}^{2}$ is the larger of the two variances. The dependence on sample size is illustrated below.

You can see from the inset plot, which includes sample sizes of 2 and 3, that small sample sizes really hurt comparisons of variance, and that interesting differences in variance can’t be detected until we have more than 10 samples.

### Proportions

Proportions, such as fraction of defective parts between a new and old design, can be compared by looking at the difference between the two proportions, $\Delta = \left| p_1 - p_0 \right|$.

You can see from this that proportions data provides much less information than variable data; we need much larger sample sizes to achieve usefully small $\Delta$.

### Summary and look forward

When designing experiments, the goal is to detect some difference between two populations. The uncertainty in our measurements and the variation in the parts has a big impact on how many parts we need to test, or greatly limits what we can learn from an experiment.

Next time, I’ll show how these calculations of sample size and uncertainty impact the busines.

# Sample Size Matters: Uncertainty in Measurement

In my previous post, I gave a brief introduction to populations and samples, and stated that sample size impacts our ability to know what a population really looks like. In this post, I want to show this relationship in more detail. In future posts, I will look at how sample size considerations impact our engineering process and what impacts this has on the business.

### Mean and sample size

The error in our estimate of the mean, $E$, is proportional to the standard deviation of the sample, $S$, and the sample size, $n$.

$E \propto \frac{S}{\sqrt{n}}$

We can visualize this easily enough by plotting the 95% confidence interval. When we sample and calculate the sample mean ($\overline{X}$), the true population mean, $\mu$, (what we really want to know) is likely to be anywhere in the shaded region of the graph below.

This graph shows the 95% confidence region for the true population mean, $\mu$; there’s a 95% chance that the true population mean is within this band. The “0” line on the y axis is our estimate of the mean, $\overline{X}$. We can’t know what the true population mean is, but it’s clear that if we use more samples, we can be sure that our estimate is closer to the true mean.

### Standard deviation and sample size

Likewise, when we calculate the sample standard deviation, $S$, the true standard deviation, $\sigma$ has a 95% chance of being within the confidence band below. For small sample sizes (roughly less than 10), the measured standard deviation can be off from the true standard deviation by several times. Even for ten samples, the potential error is nearly $\pm 1$ standard deviation.

### Proportion and sample size

For proportions, the situation is similar: there is a 95% chance that the true sample proportion, $p$, is within the shaded band based on the measured sample proportion $\hat{p}$. Since this confidence interval depends on $\hat{p}$ and cannot be standardized the way $\mu$ and $\sigma$ can be, confidence intervals for two different proportions are plotted.

For small $n$, proportions data tells us very little.

### Process capability and production costs

The cost of poor quality in product or process design can be characterized by the Cpk:

$Cpk = \mathrm{minimum} \begin{cases}\frac{USL - \mu}{3\sigma} \\\frac{\mu - LSL}{3\sigma}\end{cases}$

Where USL is the upper specification limit (also called the upper tolerance) and LSL is the lower specification limit (or lower tolerance).

We can estimate the defect rate (defects per opportunity, or DPO) from the Cpk:

$DPO = 1 - \Pr\left(X < 3 \times Cpk - 1.5\right)$

That probability function is calculated in R with pnorm(3 * Cpk - 1.5) and in Excel with NORMSDIST(3 * Cpk - 1.5). The 1.5 is a typical value used to account for uncorrected or undetected process drift.

Since we don’t know $\mu$ and $\sigma$, we have to substitute $\overline{X}$ and $S$. The uncertainty in these estimates of the population $\mu$ and $\sigma$ mean that we have uncertainty in what the true process Cpk (or defect rates) will be once we’re in production. When our sample testing tells us that the Cpk should be 1.67 (the blue line), the true process Cpk will actually turn out to be somewhere in the shaded band:

Below the blue line, our product or process is failing to meet customer expectations, and will result in lost customers or higher warranty costs. Above the blue line, we’ve added more cost to the production of the product than we need to, reducing our gross profit margin. Since that gray band doesn’t completely disappear, even at 100 samples, we can never eliminate these risks; we have to find a way to manage them effectively.

The impact of this may be more evident when we convert from Cpk to defect rates (ppm):

### Summary and a look forward

With a fair sampling process, samples will look similar to—and statistically indistinguishable from—the population that they were drawn from. How much they look like the population depends critically on how many samples are tested. The uncertainties, or errors in our estimates, resulting from sample size decisions have impacts all through our design analysis and production planning.

In the next post, I will explore in more detail how these uncertainties impact our experiment designs.

# Sample Size Matters

I find that Six Sigma and Design for Six Sigma courses are often eye-opening experiences for participants. There is an experience of discovering that there are tools available to answer problems that have vexed them, and learning that good engineering and science decisions can lead directly to good business outcomes through logical steps.

One of the most remarkable such moments is when students realize the importance of sample size. In the best cases, there is a forehead-slapping moment where the student realizes that much of the testing they’ve done in the past has probably been a complete waste of time; that while they thought they were seeing interesting differences and making good decisions, they were in fact only fooling themselves by comparing too-small data sets.

I want to show in the next few blog posts why sample size matters, both from a technical perspective and from a business perspective.

### Design example

Throughout the next few posts, I’ll use the example of a manufactured product which the customer requires weigh at least 100 kg, sells for about $140 and that costs$120 to manufacture and convert to a sale (the cost of goods sold, or COGS, is $120). Amount Sales 140 COGS 120 Material 60 Labor and Overhead 60 Gross Profit 20 We want to develop a new version of the product, using a modified design and a new process that, by design, will reduce the cost of material by 10%. The old cost of material was 50% of COGS, or$60. To achieve the material cost reduction of 10%, we have to remove $6 in material costs, improving gross profit to$26.

We believe that the current design masses 120 kg, so we estimate that our new part mass should be $120 - 0.1 \times 120 = 108$ kg.

Current Design New Design Target
Part Weight 120 108

Seems like we might be done at this point, and I’ve seen plenty of engineering projects that stop here. Unfortunately, this isn’t the whole story. Manufacturing will be unable to produce parts of exactly 108 kg, so they’ll need a tolerance range to check parts against. We have that customer requirement for at least 100 kg, so any variation has to stay above that. We also want to save money relative to the current design, so we don’t want many parts to weigh much more than this, especially since the customer isn’t really willing to pay us for the “extra” material beyond 100 kg.

### Population versus sample statistics

Most of process or product improvement is concerned with reducing the standard deviation, $\sigma$, shifting the mean (a.k.a. average), $\mu$, or reducing a proportion, $p$, of a process or product characteristic. These summary statistics refer to the population characteristics—the mean, standard deviation or proportion of all parts of a certain design that will ever be produced, or all times that a production step will ever be completed in the intended manner.

Since we can’t measure the whole population up front—we will be producing parts for a long time—we have to draw a sample from the population, and use the statistics of that sample to gain insight into the total population. We can visualize this, somewhat crudely, with the following:

We can imagine that the blue circles are conforming parts, and the orange octagons are non-conforming parts. If the sampling process is fair, then the sample proportion $\hat{p}$ will be close to—and statistically indistinguishable from—the true population proportion $p$. In the population we have 44 parts total, 8 defective parts and 36 conforming parts. In the sample that we drew, we have 10 parts total, 9 conforming and 1 defective. While $(p = 8/36 = 1/4 \ne \hat{p} = 1/9$, statistically we have

matrix(c(1, 8, 10-1, 44-8), ncol=2) %>%
chisq.test(simulate.p.value = TRUE)

##
##  Pearson's Chi-squared test with simulated p-value (based on 2000
##  replicates)
##
## data:  matrix(c(1, 8, 10 - 1, 44 - 8), ncol = 2)
## X-squared = 0.3927, df = NA, p-value = 0.6692

With such a high p-value (0.67), we fail to reject the null hypothesis that $\hat{p} = p$; in more colloquial terms, we conclude that the apparent difference between 8/36 and 1/9 is only due to random errors in sampling. (For larger counts of successes and failures, prop.test() would also work and would be more informative.)

From our perspective, of course, we don’t know what the population looks like. We don’t have any way of knowing with certainty—or accessing data about—future performance, so there is no way for us to know what the total population looks like. In lieu of population data, we develop a sampling process that allows us to fairly draw a sample from that population.

While we want to know the true population mean, $\mu$, the true population standard deviation, $\sigma$, or the true population proportion $p$, we can only calculate the sample mean, $\overline{X}$, the sample standard deviation, $S$, or the sample proportion $\hat{p}$.

From the known sample, we then reason backward to what the true population looks like. This is where statistics comes into play; statistics allows us to place rigorous boundaries on what the population may look like, without fooling ourselves. Sample size is critical to controlling the uncertainty in these boundaries.

### Summary and a look forward

Testing in product development—and usually in production—involves sampling a product or process. Samples never look exactly like the population that we are concerned about, but if the sampling process is fair then the samples will be statistically indistinguishable from the population. With due awareness of the statistical uncertainties, we can use samples to make decisions about the population.

In the next post, I will look at how sample size impacts the uncertainty in our estimation of population statistics like the mean and standard deviation. In a later post, I will look at how this uncertainty impacts the business.

### A short aside on statistical tests for proportions

The usual way to compare two proportions would be a proportions test (prop.test() in R), but because we have so few samples to compare, the results may be unreliable and prop.test() generates an appropriate warning. fisher.test() provides an exact estimate of the p-value, but the assumptions are violated with data like this, where we are sampling a fixed number of parts (i.e. row sums are fixed, but column sums are not controlled). This leaves us with using a chi-squared test (chisq.test() in R) which is less informative but does the job. Either the Barnard test or Bayesian estimation based on Monte Carlo simulation would be more informative and possibly more robust.


text:
# Does it make sense to multiply slopes?

Multiplying fractions is a regular occurance. If those fractions are considered slopes, does it make any sense?

For example, if these fractions are slopes,$\frac{9}{8} \times \frac{49}{48},$ does the product have meaning in terms of slope?

-

## 1 Answer

Sure. Let $f(x)=ax+b, g(x)=cx+d$. Then the slope of $f(g(x))$ is $ac$.

-
Thanks, What would one be trying to show if one did this? In the example above, two rising slopes become one steeper rising slope. Does that have meaning anywhere? –  Fred Kline Apr 18 at 14:08
The product of two rising (i.e., positive) slopes isn't necessarily steeper: $\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}$. –  Joshua Taylor Apr 18 at 15:26
@FredKline If you remove the translation factor (so that you're dealing with functions whose graphs are lines through the origin), then this becomes a special case of what happens when you compose linear transformations. The phenomenon is that composing linear transformations is the same thing as multiplying numerical data describing those transformations in the appropriate way. The numerical data are the matrices corresponding to the transforms, and the correct notion of multiplication is matrix multiplication. In other words, what you've hit on runs deeper than one might originally expect. –  Nick Apr 18 at 18:29
This is related with the chain rule for differentation as well :) –  Mon Kee Poo Apr 18 at 18:52

format: plain


text:
Congruent and Similar Triangles

Congruent and Similar Triangles

Similar Triangles

Similar triangles are two triangles that have the same shape but not identical or not same size.

In 2 similar triangles, the corresponding angles are equal and the corresponding sides have the same ratio.

There are 3 ways of Similarity Tests to prove for similarity between two triangles:

1.     AAA (Angle, Angle, Angle)

If two angles are equal (which implies three angles of the two triangles are equal) then the triangles are similar.

2.    Equal ratio of 3 corresponding sides

$$\hspace{3em} {\large\frac{a_{1}}{a_{2}}} \ = \ {\large\frac{b_{1}}{b_{2}}} \ = \ {\large\frac{c_{1}}{c_{2}}} \ = \ k$$

3.    Equal ratio of 2 corresponding sides and equal angle in between the two sides

$$\\[20pt] \hspace{3em} {\large\frac{a_{1}}{a_{2}}} \ = \ {\large\frac{b_{1}}{b_{2}}} \ = \ k$$
$$\\[20pt] \hspace{2.9em} {\small \angle B_{1} \ = \ \angle B_{2} }$$

Congruent Triangles

Congruent triangles are two triangles that have the same shape and identical or same size.

In 2 congruents triangles, the corresponding angles and the corresponding sides are equal.

There are 4 ways of Congruence Tests to prove for congruence between two triangles:

1.     SSS (Side, Side, Side)

Each corresponding sides of congruent triangles are equal (side, side, side).

2.     SAS (Side, Angle, Side)

Two corresponding sides and the angle in between of two congruent triangles are equal (side, angle, side).

3.     AAS (Angle, Angle, Side)

Two angles and another opposide side of two congruent triangles are equal (angle, angle, side).

4.     RHS (Right Angle, Hypotenuse, Side)

The hypotenuse and one perpendicular side of two congruent right-angled triangles are equal (right angle, hypotenuse, side).

Try some of the examples below and if you need any help, just look at the solution I have written. Cheers ! =) .
$$\\[1pt]$$

EXAMPLE:

$${\small 1.\enspace}$$ In the diagram, $${\small P\hat{Q}R}$$ = $${\small Q\hat{R}S}$$ = $${\small R\hat{S}T}$$ = $${\small 90^{\large{\circ}}}$$, $${\small PQ}$$ = $${\small QR}$$ = $${\small RS}$$ = 5 cm and $${\small ST}$$ = 1cm. Find the length of $${\small QU}$$.
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$
$${\small 2.\enspace}$$ Name the triangle which is similar to triangle PQR and calculate the values of the unknown lengths.
$$\\[1pt]$$
$${\small\hspace{1.2em}(\textrm{a}).\hspace{0.8em}}$$
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em}(\textrm{b}).\hspace{0.8em}}$$
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em}(\textrm{c}).\hspace{0.8em}}$$
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em}(\textrm{d}).\hspace{0.8em}}$$
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$
$${\small 3.\enspace}$$ In the diagram, AB = 5 cm, BD = 12 cm and DE = 7 cm. Calculate BC.
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$
$${\small 4.\enspace}$$ In the diagram shown, PQ, LM and RS are parallel. If PQ = 6 cm, RS = 10 cm, calculate the length of LM.
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$
$${\small 5.\enspace}$$ Given that $${\small \triangle AED}$$ and $${\small \triangle BEC}$$ are isosceles triangles, prove that $${\small \triangle ABE}$$ and $${\small \triangle EDC}$$ are congruent.
$$\\[1pt]$$

$$\\[1pt]$$

$$\\[1pt]$$

PRACTICE MORE WITH THESE QUESTIONS BELOW!

$${\small 1.\enspace}$$ In the diagram, $${\small AG \parallel BE \ }$$ and $${\small CG \parallel DE}$$, $${\small AB \ = \ CD \ = \ 10 \ }$$ cm and $${\small BC \ = \ 5 \ }$$ cm.
$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em}(\textrm{a}).\hspace{0.8em}}$$ Name a pair of congruent triangles.

$${\small\hspace{1.2em}(\textrm{b}).\hspace{0.8em}}$$ Show that the triangles in (a) are congruent.

$${\small\hspace{1.2em}(\textrm{c}).\hspace{0.8em}}$$ Name one triangle that is similar to $${\small \triangle BCF}$$.

$${\small\hspace{1.2em}(\textrm{d}).\hspace{0.8em}}$$ If $${\small DE \ = \ 6 \ }$$ cm, find If $${\small CF }$$.

$${\small 2. \enspace}$$ In the diagram, ABCD is a quadrilateral. Point X is the intersection of AC and BD. AX = XC and BX = DX.
$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em}(\textrm{a}).\hspace{0.8em}}$$ Name a pair of congruent triangles.

$${\small\hspace{1.2em}(\textrm{b}).\hspace{0.8em}}$$ Prove that the pair in (a) is congruent.

$${\small\hspace{1.2em}(\textrm{c}).\hspace{0.8em}}$$ What is the name given to the quadrilateral ABCD? Explain your answer.

$${\small 3. \enspace}$$ Are the triangles below congruent? Explain your answer.

$$\\[1pt]$$

$$\\[1pt]$$

$${\small 4. \enspace}$$ ABCD is a parallelogram. M is the midpoint of AB and N is the point of intersection betweeen BD and MC.
$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em} (\textrm{a}).\hspace{0.8em}}$$ Name a triangle which is similar to $${\small \triangle MNB }$$ and show that they are similar.

$${\small\hspace{1.2em} (\textrm{b}).\hspace{0.8em}}$$ Find $${\small {\large \frac{MB}{DC} } }$$.

$${\small\hspace{1.2em} (\textrm{c}).\hspace{0.8em}}$$ Find area of $${\small \triangle DNC }$$ : area of $${\small \triangle BNM }$$.

$${\small 5. \enspace}$$ In the diagram, PR = QS, QO = PO and $${\small \angle PSQ \ = \ 32^{\large{\circ}}}$$.
$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em} (\textrm{a}).\hspace{0.8em}}$$ Show that $${\small \triangle POS }$$ and QOR are congruent, stating your reasons clearly.

$${\small\hspace{1.2em} (\textrm{b}).\hspace{0.8em}}$$ Name another pair of congruent triangles.

$${\small 6. \enspace}$$ In the diagram, AD is parallel to BC. AD = 9 cm, BC = 15 cm, EC = 8 cm and DC = 7 cm.
$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em} (\textrm{a}).\hspace{0.8em}}$$ Prove that $${\small \triangle ADE }$$ is similar to $${\small \triangle CBE }$$.

$${\small\hspace{1.2em} (\textrm{b}).\hspace{0.8em}}$$ Calculate the length of AE.

$${\small\hspace{1.2em} (\textrm{c}).\hspace{0.8em}}$$ Calculate the ratio of $${\small {\large \frac{\textrm{Area of} \ \triangle ADE}{\textrm{Area of} \ \triangle ADC} }}$$.

$${\small 7. \enspace}$$ ABCD is a rectangle. M is the midpoint of AB and N is a point on CD. MC and BN meet at X.
$$\\[1pt]$$

$$\\[1pt]$$
$${\small\hspace{1.2em} (\textrm{a}).\hspace{0.8em}}$$ Prove that $${\small \triangle CXN }$$ and $${\small \triangle MXB }$$ are similar.

$${\small\hspace{1.2em} (\textrm{b}).\hspace{0.8em}}$$ Given that the ratio of the area of $${\small \triangle CXN }$$ and $${\small \triangle MXB }$$ is 9 : 4. Find the following ratios

$${\small\hspace{2.8em}(\textrm{i}).\hspace{0.7em}}$$ CN : MB,

$${\small\hspace{2.8em}(\textrm{ii}).\hspace{0.7em}}$$ CN : ND,

$${\small\hspace{2.8em}(\textrm{iii}).\hspace{0.5em}}$$ area of $${\small \triangle BXC }$$ : area of $${\small \triangle BXM }$$.

$${\small 8. \enspace}$$ In the diagram, ABCD is a rectangle and DEFG is a square. AEB and BCG are straight lines. Show that $${\small \angle ADE \ }$$ is equal to $${\small \angle CDG}$$ .
$$\\[1pt]$$

$$\\[1pt]$$

As always, if you have any particular questions to discuss, leave it in the comment section below. Cheers =) .


text:
Question: SomaticSignatures: Compare my datas with validated mutational signatures
3
5.1 years ago by
France
muller.etienne30 wrote:

Hi,

I'm currently using SomaticSignatures package to extract signatures from my NGS datas.

I wanted to compare it to validated mutational signatures published by Alexandrov et al. (ALEXANDROV, Ludmil B., NIK-ZAINAL, Serena, WEDGE, David C., et al. Signatures of mutational processes in human cancer. Nature, 2013.) , to evaluate the implication of each validated profile in my datas.

I got their profiles on their server (ftp://ftp.sanger.ac.uk/pub/cancer/AlexandrovEtAl) and included them in the matrix obtained from mutationContextMatrix function (= sca_occurence in tutorial).
Then I applied the 3 statistical methods (nmf, pca and kmeans). But the tool pools and calculates again all the mutational profiles.

Is there a method to fix validated profiles and just having an estimation of their implication in my datas?

Thanks

modified 4.4 years ago by chang02_2320 • written 5.1 years ago by muller.etienne30
Answer: SomaticSignatures: Compare my datas with validated mutational signatures
3
5.1 years ago by
Julian Gehring1.3k
Julian Gehring1.3k wrote:

The next release of the SomaticSignatures package contains the 21 mutational signatures of the Alexandrov paper as a data set. This version will be part of the upcoming Bioconductor release which will come out this month.

Currently, I am not aware of a stable out-of-the-box method for identifying a set of signatures in the observed data.  I have been working on this over the last months.  This will need further testing, and I expect to included them officially in the package soon (this fall or winter).

I've just updated to v2 along with BioC v3 and thought this is a superb package.  I would like to analyse my data using the new "21 signatures" data but could you confirm the only way of doing so is using them as described by Muller in his original question please?

Best,
Dave

The approach described in the original question is not really a way to do it at all, and you should not use for this purpose. Estimating the existing of already signatures requires a different approach. As I wrote in the answer to Etienne's question, this will be available in the future.

is the comparison available in the current release 2.4.5?

A comparison to published signatures should be fairly easy if one has defined a suitable measure for comparing the identified signatures. If we go with your example of the KLD, we can compare the matrix we get from samples(sigs) to the 21 signatures published first on this. They are included in the package and you can access them with data(signatures21).

Do you mean to compare signatures(sigs) to data(signatures21) because both will return mutation motifs (e.g. CA A.A) as rows and signatures as columns?

Yes, both matrices have the same structure and one can e.g. use a reasonable distance measure to compare the two.

Any update on this? I'd like to compare my signatures with the 30 COSMIC signatures found here:

http://cancer.sanger.ac.uk/cosmic/signatures

When I use SomaticSignatures on my dataset, I see a difference between the signatures determined with the methods of the package and the signatures from Alexandrov: the sum of each Alexandrov signature is 1 but the sum of each determined signature is between 18 and 22 (sum(as.numeric(sigs_nmf@signatures[,1]))).
It is probably not a good idea to compare such different vectors.

Is it normal to get sum beyond 1? Should I normalize the vectors by their sum?

Answer: SomaticSignatures: Compare my datas with validated mutational signatures
0
5.1 years ago by
France
muller.etienne30 wrote:

Thanks for your response. I look forward to the next version!

Answer: SomaticSignatures: Compare my datas with validated mutational signatures
0
4.4 years ago by
chang02_2320
United States
chang02_2320 wrote:

I also read in a paper (http://www.nature.com/ng/journal/v47/n7/full/ng.3335.html) by Katenin et al, in the methods section - mutation signature analysis, They compare their signature to Alexaddrov using Kullback-leibler divergence. Maybe this a viable way to compare.

From the paper

"The final signatures were extracted as in Alexandrov et al. This process yielded three mutational signatures. The signatures p obtained were compared to the published signatures q of Alexandrovet al. by mean Kullback-Leibler divergence (DKL(p||q) + DKL(q||p) ]/2."


text:
×

# awesome Answers In IAS Examination

Q. How can you drop a raw egg onto a concrete floor without cracking it? A. Concrete floors are very hard to crack! (UPSC Topper)

Q. If it took eight men ten hours to build a wall, how long would it take four men to build it? A. No time at all it is already built. (UPSC 23rd Rank Opted for IFS)

Q. If you had three apples and four oranges in one hand and four apples and three oranges in the other hand, what would you have? A. Very large hands. (Good one) (UPSC 11 Rank Opted for IPS)

Q. How can you lift an elephant with one hand? A. you will never find an elephant with one hand. (UPSC Rank 14 Opted for IES)

Q. How can a man go eight days without sleep? A. No Probs, He sleeps at night. (UPSC IAS Rank 98)

Q. If you throw a red stone into the blue sea what it will become? A. It will Wet or Sink as simple as that. (UPSC IAS Rank 2)

Q. What looks like half apple ? A: The other half. (UPSC - IAS Topper )

Q. What can you never eat for breakfast? A: Dinner.

Q. Bay of Bengal is in which state? A: Liquid (UPSC 33 Rank)

Interviewer said "I shall either ask you ten easy questions or one really difficult question. Think well before you make up your mind!" The boy thought for a while and said, "my choice is one really difficult question." "Well, good luck to you, you have made your own choice! Now tell me this. "What comes first, Day or Night?" The boy was jolted into reality as his admission depends on the correctness of his answer, but he thought for a while and said, "It's the DAY sir!" "How" the interviewer asked. "Sorry sir, you promised me that you will not ask me a SECOND difficult question!" He was selected for IIM!

Note by Pratik Raj
2 years, 7 months ago

Sort by:

i had already read all dese nd i had read another with these.. it was.. a boy was asked in examination "write an essay on courage" in a 10 page answer book.. the boy left the whole answer book blank but wrote on the last line of the last page "this is courage' .. how clever!! · 2 years, 7 months ago

Heyy! nice · 2 years, 7 months ago

That is true courage. · 2 years, 7 months ago

This is the talent we are having here in India. I bet we cannot get anything better than this. Jai Hind! · 2 years, 7 months ago

Incredible India!! · 2 years ago

Nice thinking by our great INDIA!! · 2 years, 7 months ago

Simply Superb!! · 2 years, 7 months ago

thnxxx frnds · 2 years, 6 months ago

Only students, with good presence of mind can tackle such questions · 2 years, 7 months ago

Amazing hatsoff · 2 years, 6 months ago

Old one... but its really nice ... · 2 years, 7 months ago

This is awesome :) · 2 years, 7 months ago

Okay I was really surprised by this... Great job to whoever answered these questions! :D Amazing! · 2 years, 7 months ago

Extremely awesome :) !!! · 2 years, 7 months ago

they are really awesome bro lol................. · 2 years, 7 months ago

Ha Ha... These are just great! · 2 years, 7 months ago

This i true Indian talent. · 2 years, 7 months ago


text: JFIF>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality C    \$.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR\$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr \$4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 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# Use of Helmholtz free energy in problem involving spring-gas subsystem in thermal contact with a reservoir

I have come across a problem from "Biological Physics" by Philip Nelson (pg212) which involves finding the equilibrium position of a spring, $x_{eq}$, which is compressing an ideal gas whilst in contact with a heat reservoir of temperature, $T_{res}$. A diagram of the setup is shown below:

I believe that solving it involves the minimisation of the system's free energy $F$:

$$F = U - TS$$ $$dF = dU - TdS - SdT$$

which simplifies to

$$dF = -SdT -pdV$$

using $dU = TdS - pdV$.

Since the system is at thermal equilibrium with a head bath, $dT = 0$. Also, the pressure and volume can be written in terms of the spring extension and constant: $V = A(L-x_{1})$ and $pA = \frac{1}{2} kx^{2}$ (when at equilibrium) so that $dV = -Adx_{1}$ and $dp = \frac{k}{A}x$.

However, setting the equilibrium condition $dF=0$ leaves me with

$$dF (=0) = dW = -pdV = \frac{1}{2}kx^{3}dx$$

which gives an extension of 0 as a (somewhat unhelpful) result.

A second attempt involved writing $dW$ as

$$dW = fdx_{1}$$ where $f$ is the force on the compression plate so that

$$f(x_1) = \frac{1}{2}x_{1}^{2} - pA$$

with the solutions of $f(x_1) = 0$ giving the equilibrium position of the plate assuming the ideal gas law $pV = pA(L-x_{1}) = nRT$. I believe this involves solving

$$x_{eq}^{3} - Lx_{eq}^{2} - \frac{2nRT}{k} = 0$$

However, this solution appears to avoid all thermodynamic arguments, and just simplify to solving a simple mechanical problem assuming ideal gas behavior, which makes me believe I have make a mistake somewhere along the derivation.

Any advice with the exercise, and on understanding the application of free energies to thermodynamic problems would be much appreciated.

---------------------EDIT-----------------------

I realise that I erred on the penultimate equation ( $f(x_{1}) = kx_{1} - pA$), which then leads to the equation $kx_{eq}(L - x_{eq}) = nRT$. This seems to suggest that the total internal energy of the system can be split into the energy of the spring, and the energy of the gas so that $$dU_{total} = dU_{gas} +dU_{spring} = -pdV + kxdx$$ It appears that my mistake was to treatthe spring as a seperate entity, and forgetting its energy addition to the total internal energy of the system

If $V_{total}$ is the total volume of the system, then in the final equilibrium state: $x_{eq}A+V_{gas}=V_{total}$. Since the gas is ideal and at temperature $T_{res}$, $V_{gas}=\frac{p_{gas}}{m_{gas}RT_{res}}$, where $p_{gas}=k(x_{eq}-x_0)/A$, where $x_0$ is the spring length when there is no load on it. You may now get $x_{eq}$.
• I don't see why the volume $x_{eq}A$ needs to be considered. There is no gas present in that section; the only thing that matters there is the presence of the spring, which is independent on whether the box contains it or not. – Stev1234 Oct 24 '16 at 15:06
• Also unsure why you defined $p_{gas}$ in the way you did. Wouldn't it be easier to define it as $mRTA(L-x)$ instead? Your equation seems to only specify what it will be at the equilibrium condition. – Stev1234 Oct 25 '16 at 8:55
If you wish to solve this via thermodynamic arguments, you are on the right track by minimizing the Helmholtz free energy. In your edit, you correctly identify the error of not accounting for the spring's compression in the total internal energy. So, you can start with $$U(S,V,x) = U_{\mathrm{gas}}+U_{\mathrm{spring}} = TS - pV + \frac{1}{2}k (x-x_0)^2$$ where $x$ is the position of the wall, $x_0$ is the unstretched length of the spring, and $V(x)=A(L-x)$ is the gas volume. Variations in $U$ are described by $$dU = TdS - pdV + k(x - x_0)dx$$ so that variations in the free energy $F(T,V,x) = U - TS$ are described by $$dF = -SdT - pdV + k(x-x_0)dx = [pA + k(x-x_0)] dx$$ Minimizing $F$ with respect to the wall position $x$ then returns you to the same equation you arrived at from force-balance arguments.