text:
# Basic Concepts of using Phyloseq

The phyloseq package provides many functions for exploring and visualising metagenomics data and we will work through two of the vignettes provided by the package authors today.

A copy of the R source code from the vignettes is available to you in the labs/5_Friday foler, so you can retrace the steps shown in the vignettes.

To find out more about the packge, have a look at the package landing page on the Bioconductor website.

## Set-Up

If we don’t have the appropriate packages intalled yet, we will do so now from the local repository (At home we can just use biocLite to install those).

source("http://192.168.0.9/setRepos.R")
install.packages(c("phyloseq", "metagenomeSeq"))

We can have a look at available vignettes by running the followign command:

vignette(package = "phyloseq")

## Analysis examples

I suggest that we go through the “Phyloseq-Analysis” vignette first, since it allows for a direct “hands-on” exploration of the things we can do with the phyloseq package.

vignette("phyloseq-analysis")

A .pdf copy of the paper correspoding to the GlobalPatterns example dataset is provided in the course materials today, it is referenced in the vignette from time to time and you can use it to compare your plots with the plots from the paper.

## DESeq Example

As a second step we can work through the phyloseq-mixture-models vignette from the phyloseq paper, which will give us an introduction on how to use DESeq2.

vignette("phyloseq-mixture-models")


text:
# arkane.common¶

Arkane common module

class arkane.common.ArkaneSpecies(species=None, conformer=None, author='', level_of_theory='', model_chemistry='', frequency_scale_factor=None, use_hindered_rotors=None, use_bond_corrections=None, atom_energies='', chemkin_thermo_string='', smiles=None, adjacency_list=None, inchi=None, inchi_key=None, xyz=None, molecular_weight=None, symmetry_number=None, transport_data=None, energy_transfer_model=None, thermo=None, thermo_data=None, label=None, datetime=None, RMG_version=None, reactants=None, products=None, reaction_label=None, is_ts=None, charge=None, formula=None, multiplicity=None)

A class for archiving an Arkane species including its statmech data into .yml files

as_dict(self) dict

A helper function for dumping objects as dictionaries for YAML files

Returns:

A dictionary representation of the object

Return type:

dict

Load the all statMech data from the .yml file in path into species pdep is a boolean specifying whether or not job_list includes a pressureDependentJob.

make_object(self, dict data, dict class_dict)

A helper function for constructing objects from a dictionary (used when loading YAML files)

Parameters:
• data (dict) – The dictionary representation of the object

• class_dict (dict) – A mapping of class names to the classes themselves

Returns:

None

save_yaml(path)

Save the species with all statMech data to a .yml file

update_species_attributes(species=None)

Update the object with a new species/TS (while keeping non-species-dependent attributes unchanged)

update_xyz_string()

Generate an xyz string built from self.conformer, and standardize the result

Returns:

3D coordinates in an XYZ format.

Return type:

str

arkane.common.check_conformer_energy(energies, path)

Check to see that the starting energy of the species in the potential energy scan calculation is not 0.5 kcal/mol (or more) higher than any other energies in the scan. If so, print and log a warning message.

arkane.common.clean_dir(base_dir_path: str = '', files_to_delete: Optional[List[str]] = None, file_extensions_to_delete: Optional[List[str]] = None, files_to_keep: Optional[List[str]] = None, sub_dir_to_keep: Optional[List[str]] = None) None

Clean up a directory. Commonly used for removing unwanted files after unit tests.

Parameters:
• base_dir_path (str) – absolute path of the directory to clean up.

• files_to_delete (list[str]) – full name of the file (includes extension) to delete.

• file_extensions_to_delete – extensions of files to delete.

• files_to_keep – full name of the file (includes extension) to keep, files specified here will NOT be deleted even if its extension is also in file_extensions_to_delete.

• sub_dir_to_keep – name of the subdirectories in the base directory to keep.

arkane.common.convert_imaginary_freq_to_negative_float(freq: Union[str, float, int])
Convert a string representation of an imaginary frequency into a negative float representation, e.g.:

‘635.0i’ -> -635.0 ‘500.0’ -> 500.0

Parameters:

freq (str) – The imaginary frequency representation.

Returns:

A float representation of the frequency value.

Return type:

float

arkane.common.get_center_of_mass(coords, numbers=None, symbols=None)

Calculate and return the 3D position of the center of mass of the current geometry. Either numbers or symbols must be given.

Parameters:
• coords (np.array) – Entries are 3-length lists of xyz coordinates for an atom.

• numbers (np.array, list) – Entries are atomic numbers corresponding to coords.

• symbols (list) – Entries are atom symbols corresponding to coords.

Returns:

The center of mass coordinates.

Return type:

np.array

arkane.common.get_element_mass(input_element, isotope=None)

Returns the mass and z number of the requested isotope for a given element. ‘input_element’ can be wither the atomic number (integer) or an element symbol. ‘isotope’ is an integer of the atomic z number. If ‘isotope’ is None, returns the most common isotope. Data taken from NIST, https://physics.nist.gov/cgi-bin/Compositions/stand_alone.pl (accessed October 2018)

arkane.common.get_moment_of_inertia_tensor(coords, numbers=None, symbols=None)

Calculate and return the moment of inertia tensor for the current geometry in amu*angstrom^2. If the coordinates are not at the center of mass, they are temporarily shifted there for the purposes of this calculation. Adapted from J.W. Allen: https://github.com/jwallen/ChemPy/blob/master/chempy/geometry.py

Parameters:
• coords (np.array) – Entries are 3-length lists of xyz coordinates for an atom.

• numbers (np.array, list) – Entries are atomic numbers corresponding to coords.

• symbols (list) – Entries are atom symbols corresponding to coords.

Returns:

The 3x3 moment of inertia tensor.

Return type:

np.array

Raises:

InputError – If neither symbols nor numbers are given, or if they have a different length than coords

arkane.common.get_principal_moments_of_inertia(coords, numbers=None, symbols=None)

Calculate and return the principal moments of inertia in amu*angstrom^2 in decending order and the corresponding principal axes for the current geometry. The moments of inertia are in translated to the center of mass. The principal axes have unit lengths. Adapted from J.W. Allen: https://github.com/jwallen/ChemPy/blob/master/chempy/geometry.py

Parameters:
• coords (np.array) – Entries are 3-length lists of xyz coordinates for an atom.

• numbers (np.array, list) – Entries are atomic numbers corresponding to coords.

• symbols (list) – Entries are atom symbols corresponding to coords.

Returns:

The principal moments of inertia. tuple: The corresponding principal axes.

Return type:

tuple

arkane.common.is_pdep(job_list)

A helper function to determine whether a job is PressureDependenceJob or not

arkane.common.replace_yaml_syntax(content, label=None)

PEP8 compliant changes to RMG objects could be backward incompatible with Arkane’s YAML files. Search for knows phrases which were replace, and fix the format on the fly.

Parameters:

content (str) – The content of an Arkane YAML file.

Returns:

The modified content to be processed via yaml.safe_load().

Return type:

str

arkane.common.str_repr(dumper, data)

Repair YAML string representation

format: plain


text:
# How to efficiently determine whether a relation is total?

I have a set $S$ of pairs $(x_1,x_2)$ with $x_1,x_2 \in X$ for some set $X$.

I want to know whether this defines a total relation on $X$. In other words, whether:

• If $(a,b)$ in $S$ and $(b,c)$ in $S$, then $(a,c)$ in $S$. (transitivity)
• Exactly one of $(a,b)$ and $(b,a)$ is in $S$ unless $a=b$, in which case they are both an element of $S$. (totality and antisymmetry)

Brute-force would take $O(|X|^3|S|)$ steps (I think), because there are $|X|^3$ triples $(a,b,c)$ and looking up whether something is an element of an array costs $O(|S|)$.

A good first step is to construct a certain matrix corresponding to your relation, which I will let you figure out. Constructing this matrix takes time $O(|X|^2 + |S|)$ (or just $O(|S|)$, depending on your exact model). Given this, you can check antisymmetry in time $O(|X|^2)$, and transitivity in time $O(|X|^3)$.
You can improve the running time of transitivity checking to $O(|X|^\omega)$, where $\omega$ is the matrix multiplication constant; I'll let you figure out how.
If $S$ is a total (order) relation, then $|S|=|X|(|X|+1)/2$. If you start by checking that $S$ has at least size $|X|(|X|+1)/2$, then you don't really lose anything by constructing a matrix corresponding to your relation as Yuval suggested. Checking antisymmetry (and reflexivity) is no issue either. You can then try to sort $X$ according to $S$ as represented by the matrix with a suitable well behaved sorting algorithm (for example the $n \log n$ algorithms merge sort or heap sort would work). We can check in time $O(|X|^2)$ whether the result is sorted. If that algorithm succeeded in sorting $X$, then $S$ is a total (order) relation, otherwise it is not. The total runtime is $O(|S|)$ if $|S|<|X|(|X|+1)/2$ and $O(|X| \log |X| + |S|+|X|^2) = O(|S|)$ otherwise. This is optimal, if $S$ is given as a list. (On the other hand, if $S$ is given as the transitive closure of a given DAG, then it is sometimes possible to do this faster.)
• Interesting approach. Do you have a proof or justification for the statement "If that algorithm succeeds in sorting X, then... otherwise..."? I'm skeptical. Your algorithm won't look at the entire matrix: it'll look at only $O(n \lg n)$ entries, out of the $n^2$ entries in the matrix (where $n=|X|$). Thus, if any of the entries it doesn't look at are wrong (inconsistent with transitivity), then it seems like your algorithm won't detect that. – D.W. Oct 12 '16 at 5:00
• @D.W. The check whether $|X|$ fails to be sorted has to be done after a suitable algorithm tried to sort it. This looks at all entries of the entire matrix, and takes $O(|S|)$ steps. Hence the total runtime is $O(|S|)$, as stated. – Thomas Klimpel Oct 12 '16 at 5:39


text:
# Orthographic projection in asymptote

I need assistance in understanding orthographic projection in asymptote.

currentprojection=orthographic(x,y,z);

Specifying x, y and z, one can rotate the figure in 3D but how do I decide on these numbers?

-

Changes in x, y and z will not rotate the 3d object, rather the camera position will be changed. A simple procedure can help to set up the projection parameters:

First, set the 2d size of the picture, e.g.

size(200);

Next, import some of the modules, that support 3d:

import three;

Start with some values for the camera position, imagine that this is a corner of the box, from which you are looking at the origin.

currentprojection=orthographic(2,2,2);

Place a simple object to start, e.g. a unit coordinate lines at the origin:

draw(O--(1,0,0),red);
draw(O--(0,1,0),green);
draw(O--(0,0,1),blue);

Now, you can run this sample.asy file:

size(200);
import three;
currentprojection=orthographic(2,2,2);
triple O=(0,0,0);
dot(O);
label("$O$",(0,0,0),N);
draw(O--(1,0,0),red);
draw(O--(0,1,0),green);
draw(O--(0,0,1),blue);

with asy -V sample.asy > ocamera.asy. An interactive viewer will let you change the view point as you like, and then right-double-click will bring a menu. Click Camera and current camera settings will be saved in ocamera.asy file, looking something like:

currentprojection=orthographic(
camera=(0.961388410434579,3.28630597183905,-0.564352559252),
up=(0.000558361334852193,0.00103708683243738,0.00699025170673149),
target=(7.76288755499621e-17,7.76288755499621e-17,7.76288755499621e-17),
zoom=0.505067952995518);

which can be copied into sample.asy and edited, for example, like this:

currentprojection=orthographic(
camera=(1,3.3,-0.5),
up=(0,0,1),
target=(0,0,0),
zoom=0.5);

This will give you a starting point.

-
Excellent .. But this method is not working inside a latex document. For example \documentclass{article} \usepackage{asymptote} \begin{document} \begin{figure} \begin{asy}[width=10cm,height=10cm] THE ASY CODE \end{asy} \end{figure} \end{document} 1. It is working when the sample.asy consists of only THE ASY CODE. How to solve this issue ? 2. It would be nice to have that interactive viewer accessible from within Texmaker. –  cosmicraga May 4 at 10:20


text:
## 2018-03-11

### Performance-impacting postconditions

Declaring preconditions, postconditions, and invariants, and actually checking them at runtime are two different things.

For example Ada 2012 allows you to write:

   -- ...
procedure Sort (Data : in out Array_Of_Something)
with Post => (for all I in Data'First .. Data'Last - 1 =>
Data (I) < Data (I + 1)) is
begin
-- ... e.g. quicksort ...
end Sort;

So we know that when Sort ends, the array Data must be sorted in ascending order (the aspect Post says us so). This is the “contract” for the procedure. Performing this check is Θ(N), so after all we are making Sort less efficient (quicksort is Θ(nlog(n))).

Maybe we want to state that postcondition, but also we don't want the actual runtime check is done when the code is released.

Anyway, no checks are performed if you don't add the following pragma:

   pragma Assertion_Policy (Check);

Or use the correct switch on the command line (-gnata; the pragma overrides the switch).

Maybe having them checked makes sense during the verification/validation steps of the software; keeping them makes sense whenever it is needed and the performance impact is well known, negligible, and affordable (the lesser of several evils principle?). No reason to keep checking code which shouldn't intervene, though. So, when is whenever it is needed?

I suppose the answer is in the following section.

## Static and dynamic

The fact that specifications have the same meaning in proofs and during execution is very useful for debugging specifications: a run-time failure during testing might reveal that a precondition is wrong, and then classical debugging can be used to understand the failure. This perfect match between dynamic and static interpretation of specifications is also the basis for the combination of formal validation and testing. This allows discharging by testing the assumptions made during formal validation, when a program is only partially proved. These assumptions may be both contracts written by the user (preconditions and postconditions) that need to be exercised during testing, or implicit contracts added by the proof tools concerning initialization of subprogram inputs/outputs and non-aliasing properties. Under special switches, the GNAT compiler inserts the corresponding checks for these implicit contracts, so that they can too be verified dynamically during testing.

Then:

All the contracts have been checked by dynamic testing. This phase is quite classical, except for the fact that the testing includes the preconditions and the postconditions defined in the case study.

Taken from here.

## And after that…

Yet, a failure like the one of Schiaparelli may still happen, no matter what. The probability of something bad happening is reduced, but this doesn't mean that something bad won't happen. Once something happens, its probability in the past knowing the future is still 1. (What is it supposed to mean is left to the reader.)


text:
## The Chapman-Richards growth function

Published

${\LARGE y(t) =y_\text{max} [1 – e^{-kt}]^p}$   What does it mean? Growth functions in general describe the change in size of an individual or population with time (Burkhart and Tomé, 2012). Assume that $y(t)$ is a tree growth variable, e.g. tree total height or tree volume, and  $y_\text{max}$ is the maximum value this growth variable can… Continue reading The Chapman-Richards growth function


text:
# Homomorphism proof help

(A) f: Z -> Z with a function defined as f(x)=-x

1.) f(0)=0
2.) f(a)-f(b)=-a+b=-a+b=f(a-b)
3.) -f(a)=a=a=f(-a)

Conclusion: a homomorphism

(B) f: Z2 -> Z2 with a function defined as f(x)=-x
This one I'm not sure, I doubt it is a homomorphism though.

f: g -> g

Last edited:

Dick
Homework Helper

Z_s? s equal what? s=2 certainly is a homomorphism. s>2 may cause problems. But not with f(0).

Sorry, I didn't even realize all the things i left off. But anyway, are my three proofs correct?

Dick


text:
Outcome Transformations for Uplift Modeling and Treatment Effect Estimation

What’s the issue?

The outcome variable transformation approach to estimate observation-level uplift (a.k.a. the conditional average treatment effect CATE) is a transformation that turns the observed outcomes $Y_i \in {0;1}$ and the treatment indicator $T_i \in {0;1}$ into a single outcome. This single variable can the be used as a target variable for any popular machine learning model. That in itself is a great idea that has been shown to work well empirically and has been discussed and refined in a number of papers.

While the story is plausible and the empirical results are promising, the analytical discussion of the transformation approach is fragemented and, honestly, often confusing. An additional issue that the proposed transformation is only feasible for binary outcome variables, since it is explained as a recoding of profitable customers, (Converted$\land$Treated) $\lor$ (Not-Converted$\land$Not-Treated), as class 1 and unprofitable customers, (Non-Converted$\land$Treated) $\lor$ (Converted$\land$Not-Treated), as class 0.

However, there is general approach to transform the outcome variable in the literature on causal inference. This approach seems different at first glance as we will see below. The purpose of this post is to show that the uplift transformation is in fact a rescaled special case of the more general outcome transformation approach, for which we have a solid analytical foundations and which works for categorical and continuous outcomes.

Lai’s (Weighted) Outcome Transformation

The outcome transformation is introduced by Lai et al. (2006) as

$Y^{Lai} = \left\{\begin{array}{lr} 1, & \text{if } Y_i=1 \land T_i=1 \text{ or } Y_i=0 \land T_i =0\\ 0, & \text{if } Y_i=0 \land T_i=1 \text{ or } Y_i=1 \land T_i =0\\ \end{array}\right.$

or in words, the positive cases for targeting are those that convert under treatment and don’t convert when not under treatment.

We can summarize that as a formula

$Y^{Lai} = Y_i \cdot T_i + (1-Y_i) \cdot (1-T_i)$

Kane et al. (2014) note that this formula ignores the ratio at which customers are treated. They propose to weight the observations by the probability to fall into their observed group, but I find the paper confusing. I believe what they propose can be translated to

$Y^{Kane} = Y_i \cdot \frac{T_i}{p_T} + (1-Y_i) \cdot \frac{1-T_i}{1-p_T}$

where $1-p_T=p_C$ is the probability to be in the control group. The probability to receive treatment may dependent on characteristics $X$ as in $p_T=p(T=1 | X)$.

The CATE-generating Outcome Transformation

The statistics literature has long been aware of a general outcome transformation that holds in binary and continuous cases. Wooldridge’s (2001) book on panel data analysis has a decent treatment on propensity weighted estimation and its background starting in the 50s.

\begin{align*} Y^{TO} &= Y_i \cdot \frac{T_i}{p_T} - Y_i \cdot \frac{1-T_i}{1-p_T} \end{align*}

The big differene to Kane et al.’s approach is that the outcome can be a categorical or continuous variables which is transformed using $-Y_i$ instead of $+(1-Y_i)$. I find that a good way to think about the outcome transformation is that each converter in the treatment group increases the overall treatment effect, while each converter in the control group reduces the potential effect of the treatment. The latter is less obvious, but we can image a case where every individual in the control group converts naturally and the treatment effect is zero because no increase on conversion is possible.

The transformed outcome (TO) has the property that its expectation is equal to the true treatment effect and is therefore used to estimate models of the conditional average treatment effect or do model selection. Wooldridge’s (2010) Econometric Analysis of Cross Section and Panel Data discusses steps of the proof. It’s convenient to use an equivalent formulation of the TO for the proof and note that I’ll drop the index $i$ from here.

\begin{align*} Y^{TO} &= Y \cdot \frac{T}{p_T} - Y \cdot \frac{1-T}{1-p_T} \\ &= Y \cdot \frac{T(1-p_T)}{p_T(1-p_T)} - Y \cdot \frac{(1-T)p_T}{(1-p_T)p_T}\\ &= Y \cdot \left(\frac{T(1-p_T)-(1-T)p_T}{p(1-p_T)}\right)\\ &= Y \frac{T-p_T}{p_T(1-p_T)} \\ &= [T Y_1 + (1-T) Y_0] \frac{T-p_T}{p_T(1-p_T)} \end{align*}

In the last step, we’ve rewritten the vector of observed outcomes $Y$ as a sum of the potential outcomes $Y_0, Y_1$ as $Y=T Y_1 + (1-T) Y_0$.

Let’s confirm that the TO is equal to the true treatment effect in expectation conditional on $X$:

\begin{align*} E[Y^{TO}|X] &= E [ (T Y1 + (1-T) Y(0)) \frac{T-p_T}{p_T(1-p_T)} |X ] \\ &= \frac{1}{p_T(1-p_T)} E[ T Y_1 (T-p_T) + (1-T) Y_0 (T-p_T) |X ] \\ &= \frac{1}{p_T(1-p_T)} E[ Y_1 T (1-p_T) + Y_0 p_T (1-T) |X ] && | T^2=T \\ &= \frac{1}{p_T(1-p_T)} E[ Y_1 T (1-p_T) + Y_0 p_T - T Y_0 p_T |X ] \\ &= \frac{1}{p_T(1-p_T)} (E[Y_1|X]\; E[T|X] (1-p_T) + E[Y_0|X] p_T - E[T|X]\; E[Y_0|X] p_T ) && | \text{Unconfoundedness} \\ &= \frac{1}{p_T(1-p_T)} (E[Y_1|X] p_T (1-p_T) + E[Y_0|X] p_T (1-p_T) &&| E[T|X]=p_T )\\ &= E[Y_1|X] - E[Y_0|X] && | Overlap \\ &= E[Y_1 -Y_0|X] \end{align*}

So what’s the connection?

Let’s see that the expectation of the Lai transformed outcome is.

\begin{align*} E[Y^{Lai}|X] &= E[Y \cdot T + (1-Y) \cdot (1-T)|X] && | Y = TY_1 + (1-T)Y_0 \\ &= E[Y_1|X] \cdot E[T|X] + (1-E[Y_0|X]) \cdot (1-E[T|X]) && \textit{|Unconfoundedness}\\ &= (1-p_T)+ E[Y_1|X] p_T - E[Y_0|X](1-p_T) && |E[T|X]=p_T \\ \end{align*}

Only in the simplest case when $p_T=1-p_T=0.5$ can we further simplify this to

\begin{align} &= E[Y_1|X] p_T + (1-E[Y_0|X])(1-p_T) && |p_T=1-p_T=0.5 \\ &= \frac{E[Y_1|X] + (1-E[Y_0|X])}{2} &&\\ &= \frac{1+E[Y_1|X] -E[Y_0|X])}{2} &&\\ \end{align}

This is an intersting result, because papers discussing Lai’s transformation have noted that $2 \cdot p(Y^{Lai}=1)-1$ gives an estimate of the true treatment effect in expectation. We can now see exactly why this holds only when there is a 50:50 treatment control split in the data.

Let’s check the expectation of the Kane transformed outcome with an arbitrary probability of treatment:

\begin{align} E[Y^{Kane}|X] &= E[Y \cdot \frac{T}{p_T} + (1-Y) \cdot \frac{1-T}{1-p_T}|X] && \textit{|Unconfoundedness} \\ &= E[Y_1|X] \cdot \frac{E[T|X]}{p(T)} + (1-E[Y_0|X]) \cdot \frac{1-E[T|X]}{1-p(T)} && |E[T|X]=p_T \\ &= 1+E[Y_1|X] - E[Y_0|X] \end{align}

There we are! The estimates from a $Y^{Kane}$-based model are not the true treatment effect, because they are shifted upwards by a constant of 1. The constant of 1 is a direct result of using $(1-Y)$ for outcomes in the control group instead of $-Y$ as proposed in the statistical literature.

Why does it matter?

The original Lai transformation has an interesting property. Because the transformed outcome is either 0 or 1, we can use a classifier as model to predict the treatment effect. After the correction $2 \cdot p(Y^{Lai}=1)-1$, the estimates of the treatment effect will be bounded in [-1;1] as they should be for a binary outcome variable. As we see above, however, this approach is helpful only when the treatment probability is exactly 0.5 for all observations.

In other cases, we are better off using the transformed outcome and train a regression model. The prediction of the regression model is not naturally bounded in [-1;1]. In practice, clipping the prediction to values within reasonable bounds may help to avoid implausible predictions, despite not being very elegant.


text:
# Find Coterminal Angles

 Find coterminal angles Ac to a given angle A. What are coterminal angles? If you graph angles x = 30° and y = - 330° in standard position, these angles will have the same terminal side. See figure below. Coterminal angles Ac to angle A may be obtained by adding or subtracting k*360 degrees or k* (2 π). Hence Ac = A + k*360° if A is given in degrees. or Ac = A + k*(2 π) if A is given in radians. where k is any negative or positive integer. Example 1: Find a positive and a negative coterminal angles to angle A = -200° Solution to example 1: There is an infinite number of possible answers to the above question since k in the formula for coterminal angles is any positive or negative integer. A positive coterminal angle to angle A may be obtained by adding 360°, 2(360)° = 720° (or any other positive angle multiple of 360°). A positive coterminal angle Ac may be given by Ac = -200° + 360° = 160° A negative coterminal angle to angle A may be obtained by adding -360°, -2(360)° = -720° (or any other negative angle multiple of 360°). A negative coterminal angle Ac may be given by Ac = -200° - 360° = -560° Example 2: Find a coterminal angle Ac to angle A = - 17 π / 3 such that Ac is greater than or equal to 0 and smaller than 2 π Solution to example 2: A positive coterminal angle to angle A may be obtained by adding 2 π, 2(2 π) = 4 π (or any other positive angle multiple of 2 π). A positive coterminal angle Ac may be given by Ac = - 17 π / 3 + 2 π = -11 π / 3 As you can see adding 2*π is not enough to obtain a positive coterminal angle and we need to add a larger angle but what is the size of the angle to add?. We need to write our negative angle in the form - n (2 π) - x, where n is positive integer and x is a positive angle such that x < 2 π. - 17 π /3 = - 12 π / 3 - 5 π / 3 = - 2 (2 π) - 5 π / 3 From the above we can deduce that to make our angle positive, we need to add 3(2*π) = 6 π Ac = - 17 π /3 + 6 π = π / 3 Example 3: Find a coterminal angle Ac to angle A = 35 π / 4 such that Ac is greater than or equal to 0 and smaller than 2 π Solution to example 3: We will use a similar method to that used in example 2 above: First rewrite angle A in the form n(2π) + x so that we can "see" what angle to add. A = 35 π / 4 = 32 π / 4 + 3 π / 4 = 4(2 π) + 3 π /4 From the above we can deduce that to make our angle smaller than 2 π we need to add - 4(2π) = - 8 π to angle A Ac = 35 π / 4 - 8 π = 3 π /4 Exercises: (see solutions below) 1. Find a positive coterminal angle smaller than 360° to angles a) A = -700° , b) B = 940° 2. Find a positive coterminal angle smaller than 2 π to angles a) A = - 29 π / 6 , b) B = 47 π / 4 Solutions to Above Exercises: 1. a) Ac = 20° , b) Bc = 220° 2. Find a positive coterminal angle smaller than 2 π to angles a) Ac = 7 π / 6 , b) Bc = 7 π / 4 More references on angles.


text:
## What Is an Action in WordPress?

In WordPress, an action is a PHP function that is registered for an action hook.

Actions provide a way for running a function at a specific point in the execution of WordPress Core, plugins, and themes.

Adding an action to an action hook is done in two steps:

• Creating a callback function
• Assigning your callback function to the action hook

### Creating a callback function

Before we can add an action to a hook, we need to create its callback function. This is the function that will execute when the action hook is fired.

The callback function is just a normal Php function, but however it should be prefixed uniquely and it should be somewhere callable. The number of parameters this function should accept are defined by the action hook you are hooking into.

Here is an example of a callback function:

<?php
function sc_sfm_footer_message(){
echo 'Hi, I am now a cool plugin developer';
}
?>

This function accepts no parameters and echoes a predefined message when called.

### Assigning your callback function to the action hook

After creating your callback function, what is left is to add your callback function to the hook using the add_action() function. add_action() requires a minimum of two parameters.

A plugin basically hooks into an action hook and provide actions that perform specific tasks when the action hook is fired. To achieve this, plugins use the add_action() function to add an action to the do_action() function in order to do the action.

This is what an action looks like:

<?php
add_action( $tag,$function, $priority,$accepted_args );
?>

• $tag — The name of the action hook where your function (action) is to be registered. • $function — The name of your function that is to be called when the action is fired.
• $priority — (Optional) An integer value that represents the order in which the action is fired. It defaults to 10 if no value is given. The lower the number, the earlier the function is called. The higher the number, the later it is called. • $accepted_args — (Optional) The number of parameters the action hook will pass to your function. It defaults to 1 if no value is given.
Your plugin can add as many actions to an action hook as is necessary to achieve whatever the plugin is meant to achieve. Other plugins, and even WordPress core, can also add actions to the same hook.

The following is an example of a callback function sc_sdc_callback() that is "hooked" to run when the init hook is fired by WordPress:

<?php

function sc_sdc_callback() {
// do something
}

### Example on how to add an action to an action hook

As an example on how to add an action to an action hook, let us look create a simple plugin that will add a custom message to the footer section of your website.

Create an empty php file named aca-sytech-plugin.php or whatever name you want, as long as it has a .php extension. Copy the following code into the file and save it. You can personalise the example plugin by changing the header information.

<?php
/*
Plugin Name: Sytech Footer Message
Version: 1.0
Description: Adds a simple text to the footer.
Author: Sydney Chako
Author URI: https://sytech.co.zw
Plugin URI: https://sytech.co.zw/footer-message/
*/

function sc_sfm_footer_message(){
echo 'Hi, I am now a cool plugin developer';
}

?>

• After saving your plugin file, upload it to the wp-content/plugins folder on your server using FTP.
• Go to your WordPress installed plugins on admin panel. If everything when well, you should now see your plugin listed among other plugins.
• Activate it.
• Then visit any page on your site, and you will see the message displayed in the footer as follows:

Now let us dissect the plugin code and see how it works:

• the plugin hooks up the sc_sfm_footer_message() function as an action to be executed when the wp_footer action hook is fired.
• first parameter of the add_action function is the name of the action hook, wp_footer, we are targeting.
• second parameter is a callback to your custom function (sc_sfm_footer_message).
• third parameter is the priority (50). Changing this number to 1 would cause the action to be called earlier.
• this action will execute every time the wp_footer hook is fired, ie, every time the footer is rendered.


text:
Please use this identifier to cite or link to this item: http://arks.princeton.edu/ark:/88435/dsp01wd375z77n
 Title: Representation of Control and its Influence on Semantic Representation Authors: Keung, Waitsang Advisors: Cohen, Jonathan D Contributors: Neuroscience Department Keywords: Cognitive controlfMRIHyperalignmentMVPASemantic representationTask representation Subjects: NeurosciencesCognitive psychology Issue Date: 2016 Publisher: Princeton, NJ : Princeton University Abstract: We tested predictions made by Guided Activation Theory (GAT) of cognitive control – that there are Task Specific Representations (TSRs) and that these representations effect goal-oriented behavior by modulating the activity of representations. We first investigated whether a common representation of control could be decoded across subjects using newly developed functional alignment tool, and whether our prediction of TSRs could be improved with the added power of more samples. In the second set of experiments, we showed that frontal areas in the brain modulate semantic representation to reflect similarity ratings of objects. In addition, we used a novel index of representational expression and its attention modulation — the spatial variance of patterns of activity identified using MVPA, for functional connectivity analysis. These results suggested that frontal cortex activity could be used to predict judgments of similarity by decoding representation of dimensions a subject was focusing on. To test this, we identified dimension-specific representations in neural data and looked at whether these representations could improve prediction of behavioral similarity judgments on a trial-by-trial basis. URI: http://arks.princeton.edu/ark:/88435/dsp01wd375z77n Alternate format: The Mudd Manuscript Library retains one bound copy of each dissertation. Search for these copies in the library's main catalog: catalog.princeton.edu Type of Material: Academic dissertations (Ph.D.) Language: en Appears in Collections: Neuroscience

Files in This Item:
File Description SizeFormat


text:
시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 35 12 10 41.667%

## 문제

It will soon be time to decorate the Christmas tree. The NWERC judges are already debating the optimal way to put decorations in a tree. They agree that it is essential to distribute the decorations evenly over the branches of the tree.

This problem is limited to binary Christmas trees. Such trees consist of a trunk, which splits into two subtrees. Each subtree may itself split further into two smaller subtrees and so on. A subtree that does not split any further is a twig. A twig may be decorated by attaching at most one ball to it.

Figure 1 – Example of a tree with subtrees, twigs and one ball.

A decorated tree has an even distribution of balls if and only if the following requirement is satisfied:

At every point where a (sub)tree splits into two smaller subtrees t1 and t2, the total number of balls in the left subtree N(t1) and the total number of balls in the right subtree N(t2) must either be equal or differ by one. That is: | N(t1) − N(t2) | ≤ 1.

In their enthusiasm, the judges initially attach balls to arbitrary twigs in the tree. When they can not find any more balls to put in the tree, they stand back and consider the result. In most cases, the distribution of the balls is not quite even. They decide to fix this by moving some of the balls to different twigs.

Given the structure of the tree and the initial locations of the balls, calculate the minimum number of balls that must be moved to achieve an even distribution as defined above.

Note that it is not allowed to add new balls to the tree or to permanently remove balls from the tree. The only way in which the tree may be changed is by moving balls to different twigs.

## 입력

For each test case, the input consists of one line describing a decorated tree.

The description of a tree consists of a recursive description of its subtrees. A (sub)tree is represented by a string in one of the following forms:

• The string ‘()’ represents a twig without a ball.
• The string ‘(B)’ represents a twig with a ball attached to it.
• The string ‘(t1 t2)’ represents a (sub)tree that splits into the two smaller subtrees represented by t1 and t2, where t1 and t2 are strings in one of the forms listed here.

A tree contains at least 2 and at most 1000 twigs.

## 출력

For each test case, print one line of output.

If it is possible to distribute the balls evenly through the tree, print the minimum number of balls that must be moved to satisfy the requirement of even distribution.

If it is not possible to distribute the balls evenly, print the word ‘impossible’.

## 예제 입력

((B)())
((((B)(B))((B)()))(B))
(()(((B)(B))(B)))

## 예제 출력

0
impossible
1

## 힌트

Figure 2 – Trees corresponding to the example input cases.


text:
# Geometry Challenge 37

Geometry Level 2

$ABCD, DCFE,$ and $BCHG$ are squares.

If $EF + BF = 15,$ what is the area of the red region?

×


text:
# Open two instances of Notepad++

I want to run Notepad++ twice. Like in this paint printscreen.

How I want it:

Not what I want:

Is this possible?

Hit Alt+F6. This opens the current tab in a new window.

If you don't feel keyboard-y, going to Run, Open in another instance has the same effect.

• @JochemTheSchoolKid If you're lazy, like me, you can also re-map the shortcut in Settings -> Shortcut Mapper -> Run commands (tab) -> Open in another instance. I have mapped mine to simply F6. Aug 9, 2012 at 22:13
• Or right click a tab and then Open in New Instance Sep 29, 2014 at 12:53
• Note that Open in another instance (Alt+F6) does not open the current tab in a new window, but tries to open the current text selected (wether it is a valid file path or not) in a new window. If the selection is blank, it has the advantage of simply opening another instance with a new empty tab. It works - but it's not the initial function of this menu. See @Ochado answer for a more "proper" way of doing it. Apr 7, 2016 at 13:45
• PITFALL: tabs in the windows open with Alt-6 are not backed up. Only the method with -multiInst (see another answer) results in a window whose tabs are backed up (except tabs with the same name open within a second from each other -- such as a new tab automatically named "new 1" in two windows). In other words: do not use tabs named "new 1" when there are different instances of Notepad++; these tabs are likely to be lost when Windows reboots for updates. Mar 21, 2019 at 16:59
• PITFALL: And even when you open the new instance with -multiInst, after a crash, only one windows is restored, though you possibly can find the backups of the files open in other windows manually in the Notepad++ backup filder. Mar 21, 2019 at 17:04

Other than opening another instance with Alt+F6 (as in @qweet's answer), if you already have the file open in the first instance of Notepad++, here are some alternatives:

• Click on the tab for the file and then drag it outside the Notepad++ window and drop it anywhere outside; this will open a new instance with the desired file. For this to work, the first instance should not be maximized so that you have space to drop the tab outside of the window.
• Right-click on the tab for the file and choose one of the following options:
• Move to new instance: opens new window with the file in it; removes file from original instance.
• Open in new instance: opens new window with the file in it; retains same file in the original instance.
• Move/Clone to other view: opens split window in the same instance with the file in the split window.

The advantage of all of these approaches is that the new instance already includes the file that you had open in the original instance.

• The new instance menus were greyed out for me, which is why i searched the web and found the Alt F6. Jul 7, 2016 at 3:03
• If the tab is unsaved, then the move to new instance option in tab context menu is greyed out. So an alternate keyboard / menu / toolbar button to start a new instance is helpful @corsiKa May 8 at 10:47

From Matt Refghi site How to Launch Multiple Instances of Notepad++:

2. Select Properties.
3. Move to the Shortcut tab.
4. In the end of the Target field, add ” -multiInst”.
• The linked howto shows the  -multiInst being outside the quotes around the executable path in the Target field. This is working for me on Windows 10. Nov 4, 2016 at 14:28
• -multiInst and -nosession opens a new instance with only one tab, if you want a completely separate instance. Aug 15, 2018 at 10:50
• PITFALL: it seems that only the first window is restored at session restore after a crash (i.e., after each Windows update!). You might be able to find backups manually in the Notepad++ backup folder. In any case, avoid tabls with the same name in different instances: they may not backup properly. Mar 21, 2019 at 17:06

firstly you have to have the file saved and then use the right-click for the file tab and choose - Open in new instance show picture... otherwise use CTRL+F6 best regards

Converting demoncodemonkey comment into an answer:

On Windows Environment

I just did this:

1. Normally created a short cut for Notepad++ on my desktop
2. Right clicked on the shortcut > Properties
3. Under the Shortcut tab in the "C:\Path\to\Notepad++\notepad++.exe" -multiInst -nosession
4. Save the changes, close the dialog and use!

I needed a solution that integrated with Windows Explorer's rt-click popup menu. To accomplish this I edited the registry and used the -multiInst.

Added key to registry: Computer\HKEY_CLASSES_ROOT\*\shell\Edit with Notepad++ (New Instance)\command

Then under the new key edited the (Default) field to be the desired commandline: C:\Program Files\Notepad++\notepad++.exe" -multiInst %1

See image links (sorry, not enough rep to embedded)

references:


text:
# Posts Tagged ‘ science ’

## How to train undergraduate psychologists to be post hoc BS generators

April 3, 2016
By

Teaching undergraduate psychology is difficult for a variety of reasons. Students come in with preconceived notions about what psychological research is and are sometimes disappointed with the mismatch between their preconceptions and reality. Much of ...

## How to check Likert scale summaries for plausibility

March 30, 2016
By

Suppose you are reading a paper that uses Likert scale responses. The paper reports the mean, standard deviation, and number of responses. If we are -- for some reason -- suspicious of a paper, we might ask, "Are these summary statistics possible for t...

## Sitting still against the myth that sitting kills

March 23, 2016
By

The fad of standing while working may die hard but science is catching up to it. The idea that standing at work will make one healthier has always been a tough one to believe. It requires a series of premises: Using a standing desk increases the amount of standing Standing longer improves one's health The health improvement is measurable using a well-defined metric The incremental standing is of sufficient amount…

## The state of the art of interactive graphics

March 10, 2016
By

Scott Klein's team at Propublica published a worthy news application, called "Hell and High Water" (link) I took some time taking in the experience. It's a project that needs room to breathe. The setting is Houston Texas, and the subject...

## Continuum between anecdote and data

March 4, 2016
By

The difference between anecdotal evidence and data is overstated. People often have in mind this dividing line where observations on one side are worthless and observations on the other side are trustworthy. But there’s no such dividing line. Observations are data, but some observations are more valuable than others, and there’s a continuum of value. I believe […]

## Showing three dimensions using a ternary plot

February 4, 2016
By

Long-time reader Daniel L. isn't a fan of this chart, especially when it is made to spin, as you can see at this link: Like other 3D charts, this one is hard to read. The vertical lines are both good...

## Reproducible randomized controlled trials

February 1, 2016
By

“Reproducible” and “randomized” don’t seem to go together. If something was unpredictable the first time, shouldn’t it be unpredictable if you start over and run it again? As is often the case, we want incompatible things. But the combination of reproducible and random can be reconciled. Why would we want a randomized controlled trial (RCT) to […]

## New digital feature editorship at the Psychonomic Society

January 19, 2016
By

As of January 1, 2016, I am the new methods editor for the Psychonomic Society digital features. Steve Lewandowsky has written an introductory post with a bit of background, and my first post -- about Arsenault and Buchsbaum's recent article in Psychon...

## The failure to replicate scientific findings

January 19, 2016
By

Andrew Gelman and I have published a piece in Slate, discussing the failure to replicate scientific findings, using the recent example of the so-called power pose. The idea of the "power pose" is that people develop psychological and hormonal changes by making this "power pose" before walking into business meetings, whereupon these changes make them more powerful. As you often read here and at Gelman's blog, the fact that someone…

## Asymmetric funnel plots without publication bias

January 9, 2016
By

In my last post about standardized effect sizes, I showed how averaging across trials before computing standardized effect sizes such as partial $$\eta^2$$ and Cohen's d can produce arbitrary estimates of those quantities. This has drastic implications...


text:
# Confused about the concept open set

Because I read different book find there are two definition and they aren't look like a same thing.

Definition 1 from GTM27

A set is open if it's a member of a topology,

and topology is a family of sets which satisfies:

1)the intersection of any two members is still a member.

2)the union of any two members is still a member

Definition 2 from baby rudin

Let X be a metric space. All points and sets mentioned below are understood to be elements and subsets of X.

A set S is open if every point of S is an interior point of S.

and a point p is an interior point of X if there is a neighborhood N of p such that N is contained by X.

A neighborhood of a point p is a set N(P) consisting of all points q such that d(p,q)< r.

definition 2 is complex.

So I try to make it become simpler to find the relation between the two concept.

I thought a set S is open if for every point p of S there is a set N such that N is the subset of X and consist of all points q that d(p,q)

But I still don't find any similarities between the two concept.

In first definition,we know the definition of open set only depends on the concept of set.

But the second definition tell us the definition depends on point and the set.

This is what I am confused now.

-
A set S is open if every point of S is an interior point of S means that every point in the set has a neighborhood lying in the set. – Sanath K. Devalapurkar Feb 22 '14 at 1:11

The two definitions are slightly different in the sense that they refer to different contexts. Definition 1 is for open sets in a topological space, while definition 2 is for open sets in a metric space. But it turns out that each metric on a space can define a topology on it such, that open sets of the metric space satisfy the properties of definition 1 (for open sets in topological spaces).

-

@frabala's answer above is adequate enough according to me but I wish to clarify the following:

"I thought a set S is open if for every point p of S there is a set N such that N is the subset of X and consist of all points q that d(p,q)"

The argument is not entirely wrong. But this is what you should instead gather. A set $S$ is open iff for every point $p \in S$, there is a neighbourhood of $p$ (i.e. a set $N$ - which though should contain an open set in itself for it to be a neighbourhood) entirely contained in $S$ - not $X$. But such a set $N$ is definitely a subset of $X$ too as it is a member of the Topology.

To further cement the distinction between the definitions might want to read this question and its answer.

-


text:
# What is  3^(3/2) in radical form?

Apr 10, 2018

The answer is $\sqrt{{3}^{3}}$, or to simplify it even further, $\sqrt{27}$.

#### Explanation:

Say we have a whole number c, raised to the power of a fraction n over d, with n being the numerator and d being the denominator (${c}^{\frac{n}{d}}$).

You can rewrite ${c}^{\frac{n}{d}}$ as ${c}^{n \cdot \frac{1}{d}}$. When a number is raised to a fractional exponent, it is equivalent to taking the ${d}^{t h}$ root of that number.

For example, say we have ${16}^{\frac{1}{4}}$. This is the same as taking the fourth root of 16, which can be written as $\sqrt[4]{16}$, whose answer is equal to 2 (${2}^{4}$ = 16).

Apr 10, 2018

$3 \sqrt{3} = \sqrt{27}$

#### Explanation:

When using indicies, ${x}^{\frac{1}{2}} = \sqrt{x}$.

I think the easiest way to solve this is probably to split it up using our Index Laws:

${a}^{n} + {a}^{m} = {a}^{n + m}$

Hence:

${3}^{\frac{3}{2}} = {3}^{1} \times {3}^{\frac{1}{2}}$

And this is obviously the same as:

$3 \times \sqrt{3} = 3 \sqrt{3}$

Then if you want it entirely as a radical, you must "insert" the 3 under the radical sign which is done by taking the square of the number in front of the radical (as this is the inverse operation of taking the square root of something), and placing it under the root sign:

$3 \sqrt{3} = \sqrt{9 \times 3} = \sqrt{27}$


text:
### Off-Specular

Off-specular scattering from a monodisperse distribution of long boxes.

• The sample is made of very long boxes with length equal to $1000$ nm, width $20$ nm and height $10$ nm.
• The particles are distributed along a one-dimensional lattice with a lattice spacing of $100$ nm in the $x$-direction.
• The particles are rotated around the $z$-axis by $90^{\circ}$ so that their “infinite” dimension is parallel to the $y$-direction.
• The incident wavelength is equal to $1$ $\unicode{x212B}$.
• The output intensity is the result of an average over $\phi_i$ comprised between $-1^{\circ}$ and $1^{\circ}$ and of a scan of $\alpha_i$ and $\alpha_f$ between $0^{\circ}$ and $10^{\circ}$.

Note:

The two-dimensional output intensity is plotted as a function of $\alpha_i$ and $\alpha_f$.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77  """ Long boxes at 1D lattice, ba.OffSpecular simulation """ import bornagain as ba from bornagain import deg, angstrom, nm phi_f_min, phi_f_max = -1.0, 1.0 alpha_f_min, alpha_f_max = 0.0, 10.0 alpha_i_min, alpha_i_max = 0.0, 10.0 # incoming beam def get_sample(): """ Returns a sample with a grating on a substrate, modelled by infinitely long boxes forming a 1D lattice. """ # defining materials m_ambience = ba.HomogeneousMaterial("Air", 0.0, 0.0) m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8) m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8) # collection of particles lattice_length = 100.0*nm lattice_rotation_angle = 0.0*deg interference = ba.InterferenceFunction1DLattice( lattice_length, lattice_rotation_angle) pdf = ba.FTDecayFunction1DCauchy(1e+6) interference.setDecayFunction(pdf) box_ff = ba.FormFactorBox(1000*nm, 20*nm, 10.0*nm) box = ba.Particle(m_particle, box_ff) transform = ba.RotationZ(90.0*deg) particle_layout = ba.ParticleLayout() particle_layout.addParticle(box, 1.0, ba.kvector_t(0.0, 0.0, 0.0), transform) particle_layout.setInterferenceFunction(interference) # assembling the sample air_layer = ba.Layer(m_ambience) air_layer.addLayout(particle_layout) substrate_layer = ba.Layer(m_substrate) multi_layer = ba.MultiLayer() multi_layer.addLayer(air_layer) multi_layer.addLayer(substrate_layer) return multi_layer def get_simulation(): """ Returns an off-specular simulation with beam and detector defined. """ simulation = ba.OffSpecSimulation() simulation.setDetectorParameters(20, phi_f_min*deg, phi_f_max*deg, 200, alpha_f_min*deg, alpha_f_max*deg) # define the beam with alpha_i varied between alpha_i_min and alpha_i_max alpha_i_axis = ba.FixedBinAxis( "alpha_i", 200, alpha_i_min*deg, alpha_i_max*deg) simulation.setBeamParameters(1.0*angstrom, alpha_i_axis, 0.0*deg) simulation.setBeamIntensity(1e9) return simulation def run_simulation(): """ Runs simulation and returns intensity map. """ sample = get_sample() simulation = get_simulation() simulation.setSample(sample) simulation.runSimulation() return simulation.result() if __name__ == '__main__': result = run_simulation() ba.plot_simulation_result(result, intensity_min=1.0)
OffSpecularSimulation.py


text:
# MC3002¶

MC3002 outputs high if and only if all connected inputs are high.

Equivalent Perlstone script: ABC&&r

A B C Output
0 0 0 0
0 0 1 0
0 1 1 0
0 1 0 0
1 1 0 0
1 0 0 0
1 0 1 0
1 1 1 1

1. AND
2. [MC3002]
3. Blank
4. Blank

## IC Pins¶

• AND operand

### Outputs¶

• Outputs high if all inputs are high

## Permissions¶

Node Description Default Role
craftbook.ic.safe.mc3002 Allows creation of the And Gate (MC3002) IC. user


text:
non-linear optimization for a linear classifier? (scikit-learn)

Using scikit-learn, why would you use bfgs optimization which is non-linear for a linear classifier as logistic regression? I am confused. Does the optimization method finds the optimum of the chosen score function? if so, which one? I can't choose it when defining the estimator. does the linearity or non-linearity of the score function depend on the model (whether it is linear or non-linear)?


text:
# Potential Energy of a compressed gas cylinder

1. Oct 18, 2007

### Sean Powell

Hello,

This is not a homework problem, but an engineering office problem.

I’m looking to replace a steel compression spring with a gas cylinder. The spring is presently designed to absorb a known amount of kinetic energy which it ideally converts to potential energy (neglecting friction, yadda yadda) and compression is solvable by a simple formula. PE = ½*K*dL assuming the spring was fully relaxed to start.

When I impact a closed gas cylinder the force response is governed by PV=nRT and we can generally assume no major temperature changes during impact. That means force doubles at half stroke, quadruples at ¾ stroke, is 10 times at 90% stroke etc. I know enough to subtract ambient air pressure to get a correct baseline. My problem is the force is so low for the first half of the stroke and climbs so rapidly for the last 20% or so that I’m having a tough time predicting the response of stopping a rolling vehicle impact.

Ideally I need a formula for potential energy in a compressed gas cylinder if I know: Diameter, L1 (usually free length), P1 (usually atmospheric), L2 (new compressed length) and some basic assumptions like human breathable atmosphere not too far from sea level.

From here I think I can calculate peak force so I know how to design the ratchet mechanism so the car isn’t rebounded. Yes, I know I could probably do this better with a dampened spring but there are other design issues (and patents to get around).

Sean

2. Oct 18, 2007

### rbj

whether it's a spring or an isothermal (or adiabatic) gas cylinder being compressed, the general formula for work done in compressing is:

$$W = \int_{x_1}^{x_2} F(x) dx$$

which for a relaxed spring is

$$W = \int_{x_1}^{x_2} K \cdot (x-x_1) dx = \frac{1}{2} K (x_2-x_1)^2$$.

for the gas cylinder, you have to define what the dimensions of it are (the radius of the cross section, call it $r_0$, and its length $L$. i'm setting $x_1$ to zero, with no loss of generality. the ambient pressure is $P_0 = nRT/(\pi r_0^2 L)$

$$W = \int_{0}^{X} F(x) dx = \int_{0}^{X} \frac{P(x)-P_0}{\pi r_0^2} dx = \int_{0}^{X} \frac{nRT/\left(V(x)\right) - P_0}{\pi r_0^2} dx$$

$$= \int_{0}^{X} \frac{nRT/\left(\pi r_0^2 \cdot(L-x)\right)-P_0}{\pi r_0^2} dx$$

someone's gotta blast out that integral for me. it has a log() in it, that's all that i know. everything other than x is constant.

Last edited: Oct 18, 2007
3. Oct 18, 2007

### Shooting Star

When a volume of gas is compressed suddenly, it is generally an adiabatic process, and no heat is exchanged with the environment. But the temperature will change, and that has to be taken into account.

I have given a simple and rough treatment for another situation much like this in another thread. It's nothing but work done during adiabatic expansion. Perhaps you can have a look at it.

Last edited: Oct 18, 2007
4. Oct 22, 2007

### Sean Powell

Hello Shooting Star.
Thanks for the input. You are correct, while system transfers no heat to the surroundings there probably is a sudden increase in temperature. That was something I did not consider.

****
Since the process is quick, we’ll consider it to be adiabatic. Then, PV^g=K, where I am writing ‘g’ for gamma. For air, g=7/5. The value of K can be obtained by putting in the initial values of P and V, which you had given.

Work done= integral (P-Pa)dV between V1 and V2, where V1 is the volume of the compression chamber and V2 is (V1+volume of barrel), and Pa is the outside pressure.

After integrating, W=K[V2^(-g+1)-V1^(-g+1)]/(-g+1) – Pa(V2-V1).
****
Which I think I follow fairly well and have all of the relavent information to fill out and calculate... but the units don't seem to be working out for me. Assuming gamma is unitless, P is N/m^2 & V is m^3 then K has the units of N*m^21/10??? The (-g+1) term becomes -2/5 and after a bunch of crunching I see N*m^1.5 for the first chunk of the equation while the right hand portion is N/m^2*m^3 => N*m (please excuse my sloppy shorthand as I convert my hand scribbles into a post) Was the first part of the equation supposed to condense to N*m as well?

Am I making a math error or am I missing something more important here?

Sean

5. Oct 22, 2007

### Shooting Star

If you follow a consistent sytem of units, then there is no need to worry about the unit of K -- both sides will ultimately give you the dimension of energy. Just find the values, after converting everything to same units like kg, m ,s.

You have done some math error. I am getting that K has unit of Nm^(11/5). On the RHS inside the bracket it is v2^(-2/5). After multiplying by K, the unit is simply Nm. Both sides should have units of N*m, since that is the unit of energy.


text:
Select Page

Donald R. Van Deventer, Ph.D.

Don founded Kamakura Corporation in April 1990 and currently serves as its chairman and chief executive officer where he focuses on enterprise wide risk management and modern credit risk technology. His primary financial consulting and research interests involve the practical application of leading edge financial theory to solve critical financial risk management problems. Don was elected to the 50 member RISK Magazine Hall of Fame in 2002 for his work at Kamakura.

# Citigroup Inc. Bonds: A Prince of an Investment After Many Pandit

08/26/2013 10:08 AM

The management changes at Citigroup Inc. since the events of the credit crisis have been very dramatic, perhaps more so than for any of the other firms we have analyzed in recent weeks. We did an extensive analysis of the credit crisis history of Citigroup borrowings from the Federal Reserve and the events leading up to those borrowings on June 6, 2011. Citigroup Inc. consolidated borrowings during the credit crisis peaked at $24.2 billion on March 5, 2009, and the firm had borrowings outstanding on 211 days according to Federal Reserve reports. Today’s study incorporates Citigroup bond price data as of August 23, 2013 to analyze the potential risk and return to bondholders of Citigroup Inc., which announced a tender offer on August 14, 2013 for 7 different bond issues with total principal outstanding of$11.5 billion. The offer expires on September 11, 2013.

Institutional investors around the world are required to prove to their audit committees, senior management, and regulators that their investments are in fact “investment grade.” Interest rate risk managers at major firms like Citigroup Inc. use the marginal cost of funds reflected in the bond market to centralize interest rate risk and to measure internal profitability based on this “transfer pricing yield curve.” For many investors, “investment grade” is an internal definition; for many banks and insurance companies “investment grade” is also defined by regulators. In this note we analyze the updated current levels and past history of default probabilities for Citigroup Inc. We also measure the reward, in terms of credit spread, for taking on the default risk of Citigroup Inc. bonds. On August 23, a slow summer Friday, Citigroup Inc. non-call fixed rate bonds were traded 505 times for $184.7 million in volume. After eliminating outliers, we used 479 trades on 43 Citigroup Inc. bonds with a trade volume of$184.6 million in this study.

Assuming the recovery rate in the event of default would be the same on all bond issues, a sophisticated investor who has moved beyond legacy ratings seeks to maximize revenue per basis point of default risk from each incremental investment, subject to risk limits on macro-factor exposure on a fully default-adjusted basis. We analyze the maturities where the credit spread/default probability ratio is highest for Citigroup Inc. We also consider whether or not a reasonable U.S. bank investor would judge the firm to be “investment grade” under the June 13, 2012 rules mandated by the Dodd-Frank Act of 2010, which requires that credit rating references be eliminated.  The new rules delete references to legacy credit ratings and replace them with default probabilities as explained here.

Term Structure of Default Probabilities

Maximizing the ratio of credit spread to matched maturity default probabilities requires that default probabilities be available at a wide range of maturities. The graph below shows the current default probabilities for Citigroup Inc. ranging from one month to 10 years on an annualized basis.  The default probabilities range from 0.02% at one month to 0.01% at 1 year and 0.08% at ten years.

We explain the source and methodology for the default probabilities below.

Summary of Recent Bond Trading Activity

The National Association of Securities Dealers launched the TRACE (Trade Reporting and Compliance Engine) in July 2002 in order to increase price transparency in the U.S. corporate debt market. The system captures information on secondary market transactions in publicly traded securities (investment grade, high yield and convertible corporate debt) representing all over-the-counter market activity in these bonds. We used the bond data mentioned above for 43 Citigroup Inc. fixed rate non-call issues in this analysis.

The graph below shows 5 different yield curves that are relevant to a risk and return analysis of Citigroup Inc. bonds. These curves reflect the noise in the TRACE data, as some of the trades are small odd-lot trades. The lowest curve, in dark blue, is the yield to maturity on U.S. Treasury bonds, interpolated from the Federal Reserve H15 statistical release for that day, which matches the maturity of the traded bonds of Citigroup Inc. The second lowest curve, in the lighter blue, shows the yields that would prevail if investors shared the default probability views outlined above, assumed that recovery in the event of default would be zero, and demanded no liquidity premium above and beyond the default-adjusted risk-free yield.  The third line from the bottom (in orange) graphs the lowest yield reported by TRACE on that day on Citigroup Inc. bonds. The fourth line from the bottom (in green) displays the average yield reported by TRACE on the same day.  The highest yield is obviously the maximum yield in each Citigroup Inc. issue recorded by TRACE.

Note that the longest maturity Citigroup Inc. bond has a maturity of 84.5 years. We used the 30 year U.S. Treasury yield as a proxy for a matched maturity U.S. Treasury rate and we assumed that the annualized 84.5 year default probability for Citigroup Inc. would be at the same level as the 10 year default probability. The data makes it clear that there is a sizable liquidity premium built into the yields of Citigroup Inc. above and beyond the “default-adjusted risk free curve” (the risk-free yield curve plus the matched maturity default probabilities for the firm).  The credit spreads are relatively erratic for maturities under 7 years. The credit spreads generally widen with maturity, the normal pattern for a high quality credit, with the exception of three bonds with maturities between 20 and 30 years.

The high, low and average credit spreads at each maturity are graphed below.  Credit spreads are gradually increasing with the maturity of the bonds, with the exception of the longest maturities. We have done nothing to smooth the data reported by TRACE, which includes both large lot and small lot bond trades. For the reader’s convenience, we fitted a cubic polynomial that explains the average spread as a function of years to maturity.  This polynomial explains 55% of the variation in the average credit spread over the maturity term structure:

Using default probabilities in addition to credit spreads, we can analyze the number of basis points of credit spread per basis point of default risk at each maturity.  This ratio of spread to default probability is shown in the following table for Citigroup Inc. At almost all maturities under 2.5 years, the reward from holding the bonds of Citigroup Inc., relative to the matched maturity default probability, is more than 40 basis points of credit spread reward for every basis point of default risk. The ratio of spread to default probability decreases with maturity once the maturity of the bonds exceeds 2.5 years, falling to a spread to default ratio between 19 and 35 times.  This reward to risk ratio is among the highest of any firm analyzed in this series of bond studies.

The credit spread to default probability ratios are shown in graphic form here. We have again added a cubic polynomial relating the credit spread to default probability ratio to the years to maturity on the underlying bonds.  The smoothed line explains about 44% of the variation in the risk-reward ratio.

The Depository Trust & Clearing Corporation reports weekly on new credit default swap trading volume by reference name.  For the week ended August 16, 2013 (the most recent week for which data is available), the credit default swap trading volume on Citigroup Inc. was 10 trades with $114.5 million of notional principal, a small fraction of the daily bond trading volume on August 23. The number of credit default swap contracts traded on Citigroup Inc. in the 155 weeks ended June 28, 2013 is summarized in the following table: Citigroup Inc. ranked 35th among all reference names in weekly credit default swap trading volume during this period, which is graphed below: On a cumulative basis, the default probabilities for Citigroup Inc. range from 0.01% at 1 year to 0.77% at 10 years, as shown in the following graph. Over the last decade, the 1 year and 5 year default probabilities for Citigroup Inc. have varied as shown in the following graph. The one year default probability peaked at just under 40% in the first half of 2009 during the worst part of the credit crisis. The 5 year default probability (annualized) peaked at just over 10%. The legacy credit ratings [those reported by credit rating agencies like McGraw-Hill (MHFI) unit Standard & Poor’s and Moody’s (MCO)] for Citigroup Inc. have changed four times during the decade. The macro-economic factors driving the historical movements in the default probabilities of Citigroup Inc. have been derived using historical data beginning in January 1990. A key assumption of such analysis, like any econometric time series study, is that the business risks of the firm being studied are relatively unchanged during this period. This assumption is certainly false in the case of Citigroup Inc., where the new management team has dramatically reduced the firm’s exposure to U.S. home price risk. With that caveat, the historical analysis shows that Citigroup Inc. default risk responds to changes in the following factors among those listed by the Federal Reserve in its 2013 Comprehensive Capital Analysis and Review: • Change in real gross domestic product • Change in nominal gross domestic product • Change in real disposable income • Change in nominal disposable income • Unemployment rate • 3 month U.S. Treasury bill rates • BBB rated corporate bond yield • The VIX volatility index • Home price index • Commercial real estate prices • 2 international macro factors These macro factors explain 89.7% of the variation in the default probability of Citigroup Inc. Citigroup Inc. can be compared with its peers in the same industry sector, as defined by Morgan Stanley (MS) and reported by Compustat. For the USA “diversified financials” sector, Citigroup Inc. has the following percentile ranking for its default probabilities among its 218 peers at these maturities:  1 month 57th percentile 1 year 34th percentile 3 years 36th percentile 5 years 13th percentile 10 years 10th percentile Even after the significant capital injections into Citigroup Inc. by the U.S. government and documented by the Inspector General of the Troubled Asset Relief Program on October 5, 2009, the percentile ranking of Citigroup Inc. default probabilities at one month is in the riskiest half of the diversified financial peer group. This fact has a simple and important explanation. Even with a 1 month annualized default probability of 0.02%, Citigroup Inc. and the other diversified financials are enjoying a corporate credit risk environment which ranks at the 91st percentile (with 100 being best) over the period from 1990 to the present. The percentile ranking for Citigroup Inc. at 10 years is in the safest decile of credit risk among diversified financial firms. This is an impressive improvement from the Citigroup Inc. of 2009. A comparison of the legacy credit rating for Citigroup Inc. with predicted ratings indicates that the statistically predicted rating is one notch lower than the actual credit rating. Both the actual and predicted ratings are “investment grade” by traditional credit rating standards of Moody’s Investors Service and the Standard & Poor’s affiliate of McGraw-Hill. Conclusions Citigroup Inc. is a dramatically transformed institution, compared to the Citigroup Inc. of 2007, when key director Robert Rubin confessed he was unaware of$50 billion of liquidity puts that bank traders had given clients who purchased risky tranches of collateralized debt obligations on mortgage-backed securities. The billions of capital injected into Citigroup Inc. by the U.S. government is concrete evidence of two things: the firm was considered “too big to fail” and the firm was very likely to fail (see the Inspector General’s report above) without such support. We believe that most analysts would predict that the U.S. government would again rescue the bank if necessary. The Kamakura default probabilities used above do NOT make this assumption.  The probability of rescue is ignored; the Kamakura default probabilities are the probability of failure. We believe most analysts feel the probability of rescue is embedded in the current legacy ratings for Citigroup Inc. That being said, the default risk of Citigroup Inc. has fallen to very low levels and market participants have responded with stock prices, bond spreads and credit derivative spreads that are consistent with a firm that has renewed strength.

The bonds of Citigroup Inc. provide a very attractive ratio of credit spread to default probability, with the short maturity reward for bearing credit risk totaling more than 40 basis points of credit spread for every basis point of default risk.  This is among the most attractive reward-to-risk ratios analyzed in this series of bond studies.  We believe a strong majority of analysts would judge the bank to be investment grade, thanks to the aggressive efforts of the new management team.

Background on Default Probabilities Used

The Kamakura Risk Information Services version 5.0 Jarrow-Chava reduced form default probability model makes default predictions using a sophisticated combination of financial ratios, stock price history, and macro-economic factors. The version 5.0 model was estimated over the period from 1990 to 2008, and includes the insights of the worst part of the recent credit crisis. Kamakura default probabilities are based on 1.76 million observations and more than 2000 defaults. The term structure of default is constructed by using a related series of econometric relationships estimated on this data base. An overview of the full suite of related default probability models is available here.

General Background on Reduced Form Models

For a general introduction to reduced form credit models, Hilscher, Jarrow and van Deventer (2008) is a good place to begin. Hilscher and Wilson (2013) have shown that reduced form default probabilities are more accurate than legacy credit ratings by a substantial amount. Van Deventer (2012) explains the benefits and the process for replacing legacy credit ratings with reduced form default probabilities in the credit risk management process. The theoretical basis for reduced form credit models was established by Jarrow and Turnbull (1995) and extended by Jarrow (2001). Shumway (2001) was one of the first researchers to employ logistic regression to estimate reduced form default probabilities. Chava and Jarrow (2004) applied logistic regression to a monthly database of public firms. Campbell, Hilscher and Szilagyi (2008) demonstrated that the reduced form approach to default modeling was substantially more accurate than the Merton model of risky debt. Bharath and Shumway (2008), working completely independently, reached the same conclusions. A follow-on paper by Campbell, Hilscher and Szilagyi (2011) confirmed their earlier conclusions in a paper that was awarded the Markowitz Prize for best paper in the Journal of Investment Management by a judging panel that included Prof. Robert Merton.


text:
Find the min value of $x^2+2y^2$ if x and y are related by the equation $x+2y=1$.

My attempt,

$$x+2y=1$$

$$2y=1-x$$

$$y=\frac{1-x}{2}$$

$$x^2+2y^2=x^2+2(\frac{1-x}{2})^2$$

$$=x^2+2(\frac{1-2x+x^2}{4})$$

$$=\frac{4x^2+2-4x+2x^2}{4}$$

$$=\frac{6x^2-4x+2}{4}$$

Let $y=\frac{6x^2-4x+2}{4}$

$$\frac{dy}{dx}=3x-1$$

When $\frac{dy}{dx}=0$

$3x-1=0$ $$x=\frac{1}{3}$$

When $x=\frac{1}{3},y=\frac{1}{3}$

Therefore, $x^2+2y^2=\frac{1}{3}$

Am I correct?

• Are x and y natural, integer or just rational? – ghosts_in_the_code Mar 19 '15 at 5:45
• @Mathxx: From line #5 to #6, were is your fraction gone? – Frieder Mar 19 '15 at 5:58
• @Frieder I've edited the post. Am I correct? – Mathxx Mar 19 '15 at 6:07
• @ghosts_in_the_code the question doesn't mention that – Mathxx Mar 19 '15 at 6:14

$$=x^2+2(\frac{1-2x+x^2}{4})$$
$$=4x^2+2-4x+2x^2$$
• @Mathxx Yes ${}$ – Jack Mar 19 '15 at 6:10


text:
# Friction: Blocks and Pulley

## Homework Statement

http://img41.imageshack.us/img41/589/showmepl.gif [Broken]

Masses m1 and m2 rest on a table 1.2 meters above the floor and are attached to m3 via a very light string and a frictionless pulley as shown above. The coefficient of static friction between the m2 and the table is μs = 0.21 and their coefficient of kinetic friction is μk = 0.14. m2 = 56 kg and m3 = 28 kg.
a) What is the minimum mass that m1 can have to keep the two blocks from sliding off the table?
b) m1 is completely removed. What will be the acceleration of m3? (assume up to be the positive direction).

## The Attempt at a Solution

I havn't gotten to b yet only attempted a so far.

a) i make the free body diagram and end up with the following equations.
for m1 $$\Sigma$$ Fy = N1-m1*g=0

for m2 $$\Sigma$$ Fy= N2-N1-m2*g=0
and $$\Sigma$$ Fx= T-$$\mu$$s*N2=0

and for m3 $$\Sigma$$ Fy= T-m3*g=0

From there i solve the m3 for T then m2 Fx for N2 then Fy2 for N1 and finally the first for m1. But that doesnt work at all. So if anyone can point out what goes wrong id be glad to hear it.

Last edited by a moderator:


text:
# diameter of a wheel formula

The RPM (revolutions per minute) is of the wheel, not the engine. Change unitsto that of the radius. Customizable. Calculate the circumference of the wheel in feet from the diameter. 0000269767 00000 n 0000263346 00000 n �����!�'���ĮxvE��]r��s��s��s��s��s��s��s��s��s������=�v�a�؏|?��E���Gu���o��θ�M�Z��j�u�% L[%� endstream endobj 919 0 obj<>stream Also keep in mind that there are often very slight variations in tire sizes between different brands and also between used tires and tires that have differing amount of wear. 0000255006 00000 n There is always a Hamiltonian cycle in the Wheel graph. 0000270377 00000 n �)�� h�����@� Circle Circumference by Diameter (results are rounded) Diameter ft in m; 0000279546 00000 n -�E�C'���}д����P�Bv��*�!� Formula for Calculating Tire Dimensions. Chromatic Number is 3 and 4, if n is odd and even respectively. 0000007794 00000 n 0000004967 00000 n x�bf����� ^� ̀ ��@����ۀ����i��q�o���ɲ{*��i=�N��f>�8��1��,��l'�p��sV���p ��I�:b�x��f�|�����|�i���*�;�r��N�Z�X2�V8W������:($��S�D�J���F�\�Y��� ���\X��s�աQ"_� �I����йL����mkO�x\��4:p�~��N�t�]"�m{'��2i� m|T�:��6{1S�b�{��z�&����V{�P�,���Q�M����㽜QK�Ŷ̩x����v6!����Dq[��92��QX����P���̒��AY+7]=g{���.���^с!�dllZށ � (�"@�q�&���Ŷ��:��!�f�͢�ͯ�Of�\\_��2�����t�;ЏM�t},kH���[�����ݦ�1�7��Q!� If you draw two opposing line segments from the circle's origin to the edge, you just drew the diameter. H�*��w6PH/�554Գ4R0 B3=Sc3s�Xr.��g���K>o /@� � Wheel and axle is a simple machine where wheel is attached to an axle both rotating together transferring a force from one to another. Number of edges in Wheel Graph. Multiply 3.24 (section height) x 2 then add rim diameter. Circumference to diameter You have probably noticed that, since diameter is twice the radius, the proportion between the circumference and the diameter is equal to π: C/D = 2πR / 2R = π This proportion (circumference to diameter) is the definition of the constant pi. 0000003513 00000 n The easiest way to calculate the PCD is as follows: Identify the size of the rim or tyre size. H�\��j�0E�� 0000002309 00000 n Required link back. The most popular wheel size in the U.S. is the R15 (380 mm). 0000007108 00000 n It is twice the radius. Solution. 0000254937 00000 n 0000281273 00000 n ,4,�ZCxZ< f���L03� f3��&��3��fp\:h��A��f頣�3����af1s�Y�f���֓V��)���jzj (�~�t?���������" ) �������hxL�'�q��Zz��g��S"�#�XӨ�M��)k¢A$�l�����S�8h�&���D�/k.�\�Yp���q�È�J{ƗОӃ#��@����E��_�h�t$�-s��ػCs�2_��O|�)gL"�i�u�&�[��A����������ee�=�Ч65+�\�9�>v�t�G;�����1A��#��̖�M��BfZ|uA�V��e��q�ޘ ��' endstream endobj 920 0 obj<>stream !��O�Z��ۮ�=>�i�D���� 6� endstream endobj 902 0 obj<> endobj 903 0 obj<> endobj 904 0 obj<> endobj 905 0 obj<> endobj 906 0 obj<> endobj 907 0 obj<> endobj 908 0 obj[0.0 0.0 0.0] endobj 909 0 obj<>/ProcSet[/PDF/ImageB]/ExtGState<>>>/Subtype/Form/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/Group 952 0 R>>stream Then the tire diameter formula is as follows: (((Width x (Ratio/100)) x 2)/ 25.4) + Rim = Tire Diameter However, if you don't have a calculator handy, you can simply fill in the information here and we will calculate the tire diameter for you: 0000281342 00000 n The front tire must be between 305 and 355 mm wide, and the rear tyre must be between 365 and 380 mm wide. Diameter to Circumference Calculator. H�\��j�0���s�{��X�D(v^��>@LF�1�x��7fH��́33���jk�w?�t�j��8{��bo,9h�ү�X�6�p�m7�� ��)�v�zlq������a�U5{����hdP���c�z��U��� �!z�:>��'�E�''zi{dE���9V�����\m���ߺ�,��D7�["A�iB �#ё�Dt":��.D�+�5���Xs�m¶5{�O+O��#��U�� ���~ �]�� endstream endobj 912 0 obj<> endobj 913 0 obj[936 0 R] endobj 914 0 obj<> endobj 915 0 obj[935 0 R] endobj 916 0 obj[947 0 R] endobj 917 0 obj<>stream 0000003654 00000 n 0000003801 00000 n We’ll send you an email report with contact information each time your calculator is used. The third number generally preceded by an "R" is the wheel diameter. The wheel diameter d w [mm] is the sum between the rim diameter and twice the height of the tire: $d_{w} = D + 2 \cdot H \tag{3}$ The (free static) wheel radius r w [mm] is half the wheel diameter: $r_{w} = \frac{d_{w}}{2} \tag{4}$ To take into account the deformation of the tire, we can apply a coefficient of 0.95, which means that the free static radius will decrease with approx. Wheel graphs are Planar graphs. 0000011680 00000 n l8HsuM\����3��ݨO4��7��i�:M�L��Di��^�w If the two wheels are front and rear wheel, both distances should be equal. Revolutions specifies, how often the wheel turns around at the covered distance. Tire Diameter Formula: Tire Diameter = 2*(Tire Width/25.4)*(Aspect Ratio/100)-(Wheel Size*-1) You can get a free online tire diameter calculator for your website and you don't even have to download the tire diameter calculator - you can just copy and paste! 0000004092 00000 n 0000010922 00000 n But if you want to know the exact formula for calculating tire diameter then please check out the "Formula" box above. 72868 Z%�tPt��(R$)���S+��HѤT̩��bN͜4*�D�C�"Ő�H1�(R)�9 s*l �����z�02�7� �w������6�&���,��q�8h,�����q�8h,����.�Z��ﶠ�3���. Circumference is the distance a wheel covers at one revolution. 0000004608 00000 n Anyone who uses your calculator must enter an email address or phone number. H��U�n�0��@�,.��C�h���! Conveniently, it is twice as long as the radius of a circle. Jess Hoodenpyle demonstrates how to measure wheel diameter simply. The diameter of a circle is the distance from edge to edge of a circle passing through its origin or center. It is actually the distance covered in one revolution. You chose the *Basic version of the Tire Diameter Calculator. 0000005713 00000 n Circumference of a Circle Formula. %PDF-1.4 %���� Diameter of a Circle. 0000281942 00000 n And so does this calculator. 0000002473 00000 n Note: Most other calculators and programs use scientific notation for too large and too small results. If using the radius the formula is C = 2 x pi x radius If using circumference the formula is C = pi x diameter. Similarly, if you enter the area, the radius needed to get that area will be calculated, along with the diameter and circumference. 0000279180 00000 n The 255 is the tire width in millimeters, measured from the bottom of the bead to the bottom of the bead, the 60 is the sidewall aspect ratio (the tire width factor), the ratio of sidewall height to tire width at the tread (indicating that the sidewall height is 70% of the tread width), and the 17 is the wheel rim diameter … For example, if the wheel is 30 inches in diameter the circumference would be 94.248 inches. The diameter of a circle can be calculated using the formula d = 2r, where "d" indicates the diameter and "r" denotes the radius of the circle. ! 0000011057 00000 n Calculations - 100/month. Divide by 12 to get 7.854 feet. Solve for Vehicle Speed: Vehicle Speed: [in/sec] Motor Speed: The task is to find: The Number of Cycles in the Wheel Graph. )))��mH�XZ:�4Z� +���@����"BM��W���'0�0h206.�4esP�abh�r����ư�A����'�� From this formula, you can calculate RPM in any situation and even if you’ve been recording the number of revolutions for less than (or more than) a minute. For example, if a wheel completes 30 revolutions in 45 seconds (i.e. Enable SSL loading and calculation to keep all information 100% secure, and guarantee highest availability with access to our multi-region API servers. 897 0 obj <> endobj xref 897 63 0000000016 00000 n Calculations - unlimited. 5% under load (vehicle weight). (Inch Units Applicable for Constants) Spur Gear Design Calculator. ��*P�����J���3 0.75 minutes), the result is: 30 ÷ 0.75 = 40 RPM. Gain valuable insights with real-time statistics and analytics for your calculator. =46�e�i�M7FE���7�naO�v��U�V,>]������V���.���ƾ6�8��������5'>K,��E�-M���s��H�*Yq���ȴ��9Gٹ�ߍ{O�,)e�t @G�1P�:��4� �p��$A 0000004272 00000 n ... To find the outside diameter. The first number on a metric tire is the width in millimeters. … The radius is 1/2 the diameter of the wheel. 0000010590 00000 n All calculated values in Table 4.1 are based upon given module m and number of teeth (z 1 and z 2).If instead, the modulem, center distance a and speed ratio i are given, then the number of teeth, z 1 and z 2, would be calculated using theformulas as shown in Table 4.2.. Table 4.2 The Calculations for Number of Teeth 0000279293 00000 n Diameter. (adsbygoogle=window.adsbygoogle||[]).push({}); © 2020 Calculator Pro Calculators All Rights Reserved. 0000004302 00000 n RPM formula = linear distance traveled divided by linear distance per wheel RPM. Find x, given that the distance traveled by a point on the circumference of the wheel is 23169 ft. … 0000240823 00000 n Remove calculation limits and start customizing your calculator! 0000269979 00000 n 0000005269 00000 n 0000279367 00000 n 0000270579 00000 n 0000004634 00000 n Rim Width Minimum tyre width Ideal tyre width Maximum tyre width; 5.0 Inches: 155 mm: 165 or 175 mm: 185 mm: 5.5 Inches: 165 mm: 175 or 185 mm: 195 mm: 6.0 Inches The circumference of a circle is calculated using the formula: 2 x π x radius, where π is a mathematical constant, equal to about 3.14159.It was originally defined as the ratio of a circle's circumference to its diameter (see second formula below on why) and appears in many formulas in mathematics, physics, and everyday life. ... All Wheel & Tire Packages are Mounted & Balanced for FREE and include our Nitrogen Airfill for Max Tire Life! It is generally recommended that when you want to change the size of the tires on your vehicle that you stay within approximately 3% of the diameter and height of the current tires on your vehicle so that the brakes on the vehicle will work properly. (This helps to narrow down the likely PCD sizes) Let's be honest - sometimes the best tire diameter calculator is the one that is easy to use and doesn't require us to even know what the tire diameter formula is in the first place! 0000006310 00000 n The Pitch Circle Diameter (PCD) is the diameter of the circle which passes through the centre of all the studs, wheel bolts or wheel rim holes. Divide this number by 25.4 to get the inch equivalent as there is 25.4 mm in 1 inch. There are a lot of questions on Quora based on this, but I am pleased to see you asking about the method. No link. 0000003018 00000 n 0000005106 00000 n 60 miles per hour = one mile per minute = 5,280 feet per minute linear velocity. Speed and RPM Gauge Use this tools to compute, the resulting robot speed, the required motor RPM, and the corresponding wheel diameter. The diameter of a circle is the straight line passing through the center of the circle. 0000005217 00000 n This means one revolution of a wheel covers 132 cm. 0000253723 00000 n v = (100 rad/s)(0.220 m) ∴v = 22.0 m/s Diameter = C/π =. 0000240915 00000 n H��V�n�0���~�YK����-�S}+����Z��OՃ�(�f#i����(Ό8��ӷ? For radius ‘r’, circumference is 2*pi*r. For 21 cms, circumference will be 2* (22/7)*21= 132 cms. It is also called as the longest chord of the circle. Skip the support lines and receive priority one-on-one support from our customer service team. 0000263498 00000 n For example, 17x8.5 in +35 designates a wheel's diameter of 17 inches, width of 8.5 inches, and that it has a +35 mm positive offset (432 × 216 mm +35 mm in fully metric numbers). If you want to customize the colors, size, and more to better fit your site, then pricing starts at just$29.99 for a one time purchase. 0000005080 00000 n 0000269952 00000 n Circumference of a circle formula. Pi is a mathematical constant and is 3.1416 to four places. 0000253930 00000 n Wheel circumference in feet = diameter times pi = 27inches/12 inches per foot times 3.1416 = 7.068 feet wheel circumference. 0000009168 00000 n ?�y>=-_�B�����q�N��C )��N*1��0-���9�����>�Z}o¨/��a4:���/�UZ/�1�G�n�s�Ce^���9�Q1�?o_�u�֧���.�\��eH\4. See exactly what users have submitted and also view summary statistics. H�\�_��0G��)�8�0�In��u����mt trailer <<34951e6c223711daa032003065fa5064>]>> startxref 0 %%EOF 899 0 obj<>stream Problem Statement: Given the Number of Vertices in a Wheel Graph. 0000263150 00000 n Spur Gear design formula for geometry, pitch, tooth clearance and critical functional data. The minimum wheel thickness is 3.0 mm, the minimum bead thickness is 4.0 mm (measured from hump to outer edge of the lip), and the wheel … �(�� d*d c[j}��o���pHss~7M�b�ٵͨҟCW�㨎M[��]�*�C<5m����j|��_��>���o�1�w��K�K����.�pS/��;��$�1�qhړz�S�_U����W���{y�*�����i�ooӜo���Q��5.UW�K_Vq(�SL����j������z��,��@ The ideal mechanical advantage formula of wheel and axle is the ratio of the wheel and axle radius. In terms of circumference, the diameter can be computed using the equation d = c/pi, where "c" represents the circumference and pi is approximately equivalent to 3.142. 0000240536 00000 n 0000010616 00000 n 0000245205 00000 n The Tire Diameter Calculator will instantly calculate the diameter of a tire if you enter in the tire width (in millimeters), the tire aspect ratio (also known as the tire series), and the wheel size (in inches). Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. The formula for circumference is the diameter times pi. ��T觀����K �..9\$:���ϸ}� �}�����d���W��@��t����c��h���}ѯ �zƃ endstream endobj 918 0 obj<>stream 0000269836 00000 n Use the calculator above to calculate the properties of a circle. 0000279754 00000 n NOTE 1 : The subscripts 1 and 2 of z 1 and z 2 denote pinion and gear. The sidewall or aspect ratio are used in metric tire sizes to determine the overall height of a tire. 0000270053 00000 n 5=5����� This means that for your 20.832 diameter tire the circumference is actually 65.41248". 0000005243 00000 n ! If there were a wheel that had a circumference of 12.36375 cm, what would the diameter be? The area, radius and circumference will be calculated. Well done. Circumference or perimeter of a circle is defined as the distance around it. H�\��j�0F�~ Radius of a wheel is the span between center and edge, diameter ist twice the radius, the span from edge to opposite edge. while complete wheel diameter must not exceed 660mm when fitted with dry-weather tires, or 670mm when fitted with wet-weather tires. Click the "Customize" button above to learn more! ,�S��c�apa�jz�t�qC���-�;�8�0�2�300��a�i���!����s��I�L8���,�0�0�B�H�3*:0mP�J0fa(�m_*���ї!ف��%�! 0000281204 00000 n 0000254727 00000 n ��( ���Tn�B� ��� endstream endobj 898 0 obj<>/StructTreeRoot 90 0 R/Metadata 895 0 R/MarkInfo<>>> endobj 900 0 obj<>/XObject<>/ProcSet[/PDF/Text/ImageC]/ExtGState<>/Properties<>>>>>/Group 959 0 R/StructParents 0>> endobj 901 0 obj<>stream 0000009946 00000 n �L�C��;�+��@�����v&��յ�4���E[�B � y�C � endstream endobj 910 0 obj[953 0 R] endobj 911 0 obj<>stream Calculators » Informative » Tire Diameter Calculator. �e"� �8�mA[���q�� ))� XKXx*x Enter any single value and the other three will be calculated.For example: enter the diameter and press 'Calculate'. The diameter of a circle is the distance from one edge to the other, passing through the center. 0000004207 00000 n USING SIZE 235/35-19 FOR EXAMPLE. Since we already know the C (circumference ) = π x D (diameter), all we have to do is solve the equation for diameter by dividing both sides by π. 0000008514 00000 n The tire diameter calculator exactly as you see it above is 100% free for you to use. �f]�n�+�+F�E����w�-�݀yx�.�nq _���uk��C�}��� ��oV=��:�R�.$���eϑ̸� (���[���Z�^�q��&��κ�d�@au�� V8��N#�+�/�ވ3�V2ح�]$E��G��a�4�b���z�Pn�g!kdҸ,\)L���7�M �[�B6�����*R�Y���:>�N���J�@a/FXm���2��r��u�Tϩ�A��?^7�˥0�v �z���ߧ���_��h}�V-k�hܩh�W�f,8�!�3�D�57>��֗��!�P�l�A�3�[���ͫ>P�a�ހ�����Vd�J��䓣ґ6Frf�i��V�E-g�ADG��C 6&/e Question 110618: A wheel 4 ft. in diameter makes x revolutions. ie foot, meter, inch, etc. Where: φ = Pressure Angle a = Addendum a G = Addendum of Gear a P = Addendum of Pinion b = Dedendum c = Clearance C = Center Distance D = Pitch Diameter D G = Pitch Diameter of Gear Once we do that we ﬁnd out … 0000254378 00000 n 0000270648 00000 n 0000001556 00000 n -�E�-링H����Lf����a"�Y��G� )�!��|�{�Λ�z�Y�_a�vn������K�ػ��R�~��;����NY��]ϳ;m�a̖K���g�9\�Ӫ��9�?C������w�{��2M���Y��E�Y��h����D��^�}��K��~��urB&.��{w��΅�]�,�S��&>u�|�߹Ҕ�ݟ6j�w�=QI]E]YB%DJEJYA� iHC2� 0000003947 00000 n The formula v = ωr can be rearranged to solve for the angular speed ω: This is also the angular speed at the outer edge of the wheel, where the radius is r = 0.220 m. The formula v = ωr can be used again to solve for the linear speed at that radius: v = ωr. It is installed on 50% of U.S. passenger cars and light SUVs. 4, if the wheel turns around at the covered distance users submitted! Calculating tire diameter calculator tire must be between 365 and 380 mm wide, the... The area, radius and circumference will be calculated and critical functional data, passing through its origin center. 2020 calculator Pro calculators All Rights Reserved ) ( 0.220 m ) ∴v = 22.0 m/s is... Api servers anyone who uses your calculator =-_�B�����q�N��C ) ��N * 1��0-���9����� > �Z } o¨/��a4: ���/�UZ/�1�G�n�s�Ce^���9�Q1�?.... Circumference is the straight line passing through the center of the wheel in feet = diameter times pi = inches. Linear distance traveled divided by linear distance per wheel RPM an  R '' is the distance it. Feet = diameter times pi = 27inches/12 inches per foot times 3.1416 = 7.068 feet circumference! Turns around at the covered distance or perimeter of a circle is defined as radius... And 355 mm wide ) spur Gear design formula for calculating tire diameter calculator exactly as you see it is! 12.36375 cm, what would the diameter '' is the distance around it then add rim diameter 670mm fitted... Wheel circumference, radius and circumference will be calculated.For example: enter the diameter a! ÷ 0.75 = 40 RPM the diameter calculator exactly as you see it above 100. How often the wheel is attached to an axle both rotating together transferring a force from one edge the... To an axle both rotating together transferring a force from one edge to edge of a circle is diameter... With contact information each time your calculator is used Given the number of in. Times pi = 27inches/12 inches per foot times 3.1416 = 7.068 feet wheel circumference and. Too small results have submitted and also view summary statistics result is: 30 ÷ =. * Basic version of the rim or tyre size calculator Pro calculators All Rights Reserved 30 revolutions 45... Exactly as you see it above is 100 % secure, and guarantee highest with... Cm, what would the diameter ) ∴v = 22.0 m/s it is actually the a! Be calculated.For example: enter the diameter times pi = 27inches/12 inches per foot times 3.1416 = 7.068 wheel. Inches in diameter the circumference would be 94.248 inches must not exceed 660mm when fitted with tires! Note: most other calculators and programs use scientific notation for too large too. ).push ( { } ) ; © 2020 calculator Pro calculators All Rights Reserved Speed [! Through the center the two wheels are front and rear wheel, not the engine highest availability access. Pro calculators All Rights Reserved per foot times 3.1416 = 7.068 feet wheel.. That for your 20.832 diameter tire the circumference is the diameter of a circle time your calculator o¨/��a4 ���/�UZ/�1�G�n�s�Ce^���9�Q1�! In feet from the diameter of a circle is defined as the chord. And guarantee highest availability with access to our multi-region API servers tyre must be between 365 and 380 mm.. Enter the diameter of a wheel that had a circumference of the circle the number of Cycles in wheel. Scientific notation for too large and too small results functional data, tooth clearance and critical functional data }... To find: the number of Vertices in a wheel covers at one revolution opposing. Completes 30 revolutions in 45 seconds ( i.e circle is the distance a completes... 30 inches in diameter the circumference of the rim or tyre size, the result is: 30 0.75... Defined as the distance covered in one revolution of a circle access to multi-region... Light SUVs edge of a circle and is 3.1416 to four places �y > )... { } ) ; © 2020 calculator Pro calculators All Rights Reserved enter the diameter ( section height x... Origin or center two wheels are front and rear wheel, not the engine wheel.. Gain valuable insights with real-time statistics and analytics for your calculator = ( rad/s! Aspect ratio are used in metric tire sizes to determine the overall height of circle. Highest availability with access to our multi-region API servers of Vertices in a wheel Graph per hour = one per... From our customer service team ∴v = 22.0 m/s it is installed on 50 % U.S.! Our Nitrogen Airfill for Max tire Life n is odd and even respectively even respectively three will be example! Mathematical constant and is 3.1416 to four places is as follows: Identify the size of the turns. V = ( 100 rad/s ) ( 0.220 m ) ∴v = 22.0 m/s is... ( revolutions per minute ) is of the wheel Graph the task is to find: the of! Foot times 3.1416 = 7.068 feet wheel circumference in feet from the diameter of a circle passing the... Note: most other calculators and programs use scientific notation for too large and too diameter of a wheel formula.... Or perimeter of a tire and axle is a simple machine where wheel is attached to an axle rotating...? o_�u�֧���.�\��eH\4 information 100 % secure, and guarantee highest availability with access to our multi-region API.... Long as the distance a wheel Graph or perimeter of a circle is the diameter times pi = 27inches/12 per!