text:
We can classify experimental designs into two broad categories, viz., informal experimental designs and formal experimental designs. Authors: Le Cam, Lucien, Lo Yang, Grace Free Preview. ... A Descriptive Statistics. Coefficient of variation = Standard Deviation / Mean. The ... the F statistic has an F distribution with k 1 and n k degrees of Correlation: Measure the relationship between two variables and ranges from -1 to 1, the normalized version of covariance. © 2020 Exploring your mind | Blog about psychology and philosophy. International: Português | Türkçe | Deutsch | 日本語 | Italiano | Español | Suomi | Français | Polski | Dansk | Norsk bokmål | Svenska | Nederlands | 한국어. According to Professor Ignacio Cascos of Charles III University of Madrid, these are some of the basic statistics concepts everybody should know: A population is a well-defined set of similar items with certain characteristics that are of interest to the observers. An independent variable is a variable that is controlled in a scientific experiment to test the effects on the dependent variable. A Z-test is any statistical test for which the distribution of the test statistic under the null hypothesis can be approximated by a normal distribution and tests the mean of a distribution in which we already know the population variance. In fact the role played by probability in modern science is that of a substitute for certainty. Thus, this means you can measure them in numbers. The content in this publication is presented for informative purposes only. The test statistic depends fundamentally on the number of observations that are being evaluated. Explain why correlation does not imply causation. P robability Probability is the measure of the likelihood that an event will occur in a Random Experiment. Probability is the measure of the likelihood that an event will occur in a Random Experiment. Normal/Gaussian Distribution: The curve of the distribution is bell-shaped and symmetrical and is related to the Central Limit Theorem that the sampling distribution of the sample means approaches a normal distribution as the sample size gets larger. The probability theory is very much helpful for making prediction. An ‘A’ is better than a ‘B’. Data (r) is the value that can change within a variable (hence the name). Variance: The average squared difference of the values from the mean to measure how spread out a set of data is relative to mean. The general topic here is of comparative experiments and then some basic statistical methods that are used to analyze the data from those types of experiments. Social movements, industrialization, increased school attendance, and…, Attachment theory centers around the psychological phenomena that occur when we establish affective bonds with other people. if you are using and applying a statistical method with your data collections already, the CV value is what it is and part of the study. “Extreme” in the sense of the alternative hypothesis H1. García Pérez, A. Variation, in biology, any difference between cells, individual organisms, or groups of organisms of any species caused either by genetic differences (genotypic variation) or by the effect of environmental factors on the expression of the genetic potentials (phenotypic variation). This experiment aimed at applying statistical concepts in the weight variation in one-peso coins using an analytical balance. Fernández, S. F., Sánchez, J. M. C., Córdoba, A., Cordero, J. M., & Largo, A. C. (2002). Although many more concepts are used in statistics, these are perhaps the most basic ones. The distinction between a population together with its parameters and a sample together with its statistics is a fundamental concept in inferential statistics. summarize the basic concepts of traditional experimental design that would apply to a Six Sigma project. In engineering, science, and statistics, replication is the repetition of an experimental condition so that the variability associated with the phenomenon can be estimated. Analysis: (1) Data collection and processing (2) Computation of test statistics (3) Preparation of graphics and tables (4) Interpretation of results for the primary investigator The 3 components of a clinical trial Ø If possible, use the ‘local-control’ to reduce extraneous factors. 50 pieces of leaves of random length and width was divided into a set of tens and later measured When the goal in a statistical study is to understand cause and effect, experiments are the only way to obtain convincing evidence for causation. Using a clever design, we can ﬁnd out the important process factors with the lowest possible eﬀort. Independent sample implies that the two samples must have come from two completely different populations. Probability Density Function (PDF): A function for continuous data where the value at any given sample can be interpreted as providing a relative likelihood that the value of the random variable would equal that sample. Mutually Exclusive Events: Two events are mutually exclusive if they cannot both occur at the same time. Predictive Analytics predicts what is most likely to happen in the future and provides companies with actionable insights based on the information. Averages or measures of central tendency are typical or representative values of a data set. In our example, the population is the set of all students, that is, the 200 students. Chi-Square Distribution: The distribution of the sum of squared standard normal deviates. Basic Concepts of ANCOVA In some experiments where we use ANOVA some of the unexplained variability (i.e. Conditional Probability: P(A|B) is a measure of the probability of one event occurring with some relationship to one or more other events. If we want to know and interpret the conclusions of academic psychology, it's necessary to have minimum knowledge of statistics and methodology. If the sample size reflects the characteristics of the population, then the sample is representative. Percentiles, Quartiles and Interquartile Range (IQR). You experience it as remorse, self-blame, and a feeling of personal indignity.…, Even today, we shudder at the memory of the outrageous experiments carried out on human beings by the Nazis. The chapter reviews the differences between nonexperimental and experimental research and the differences between descriptive and inferential analyses. Dark Data: Why What You Don’t Know Matters. Read on! Shewhart said that this random variation is caused by chance causes—it is unavoidable and statistical methods can be used to understand them. This particular situation is of importance in mathematical statistics since it provides a basic exemplar case in which the $\text{F}$ distribution can be derived. The main role of statistics in biology is to test hypotheses. The various treatment groups are selected at random from the population. in the experiment are due only to change, and (2) whether the size of these differences is of practical importance. If you were to have qualitative variables, you could rank them. Sample and sampling: A portion of the population used for statistical analysis. We denote sample size n. If the sample and population size coincide, then it’s a census. One-way ANOVA compares two means from two independent groups using only one independent variable. Variations on the Milgram Experiment . Uniform Distribution: Also called a rectangular distribution, is a probability distribution where all outcomes are equally likely. Theoretical distributions discrete For example, think about school grades. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); By subscribing you accept KDnuggets Privacy Policy, Beginners Learning Path for Machine Learning. Bayes’ Theorem describes the probability of an event based on prior knowledge of conditions that might be related to the event. Articles and opinions on happiness, fear and other aspects of human psychology. P values Fig. ATQ Experiment 1.pdf - APPLICATION OF STATISTICAL CONCEPTS IN DETERMINATION OF WEIGHT VARIATION IN SAMPLES THE N PADUA1 AND H SUPERAL2 1Department of. Therefore, researchers usually select a few elements from the population or a sample. The chapter reviews the differences between nonexperimental and experimental research and the differences between descriptive and inferential analyses. Paired sample means that we collect data twice from the same group, person, item, or thing. This design is not suitable when there is fertility variation in the field because no local control is provided in this design. You can have it in the simple decimal form or multiply it by 100% to get a percentage value. This is known as the "prior probability." Statistics is a study of data: describing properties of data (descriptive statistics) and drawing conclusions about a population based on information in a sample (inferential statistics). Buy this book eBook 106,99 ... "It is a very valuable book giving a coherent view of the basic concept and tools of the asymptotic theory in statistical inference." Such an experiment needs many mice, is time-intensive and usually costs a lot of money. Cumulative Density Function (CDF): A function that gives the probability that a random variable is less than or equal to a certain value. Diagnostic Analytics takes descriptive data a step further and helps you understand why something happened in the past. Prescriptive Analytics provides recommendations regarding actions that will take advantage of the predictions and guide the possible actions toward a solution. Basic Probability Concepts Definition 1 : Typically in the field of statistics we study data that results from experiments . Population and Sample Variance and Standard Deviation. Statistical inference reaches these decisions by comparing the variation in response among those experimental units exposed to the same treatment (experimental error) with that variation among experimental units exposed to different Ø In his classic book entitled ‘The Design of Experiments’ deals with many statistical experimental designs and its applications. By the way, the last one (the helicopter experiment) was used in the first class I took (in the University, several good years ago) in the course "design of experiments and ANOVA". A basic box plot. An example of this type of variable could be gender. Statistical analysis is based on this valuable concept. Significance Level and Rejection Region: The rejection region is actually dependent on the significance level. This experiment also was carry out to determine and applying the basic concept of statistic and variation in population. 1.4.2 Probability of getting different numbers of males out of 48, if the parametric proportion of males is 0.5. Statistical variance gives a measure of how the data distributes itself about the mean or expected value. Statistics is a branch of mathematics that studies variability as well as the process that calculates it by following the laws of probability and using its models. The term is generally associated with experiments in which the design introduces conditions that directly affect the variation, but may also refer to the design of quasi-experiments, in which natural conditions that influence the variation … Sampling is the process by which numerical values will be selected from the population. Experimental unit: The object to which treatments are applied or basic objects on which the experiment is conducted is known as experimental unit. Design of Experiments in Agriculture. Although the results were encouraging, for some strange…, Santiago Genovés was a Spanish man who immigrated to Mexico when he was 15 to flee from the Spanish Civil…, Guilt is a complex feeling, influenced by many factors. statistics. There are two types: In descriptive statistics, you can determine the position of your data by using measures of position. Two-way ANOVA is the extension of one-way ANOVA using two independent variables to calculate the main effect and interaction effect. Milgram and other researchers conducted numerous versions of the experiment over time. i. Ø Try to reduce extraneous factors as possible. Pages 3. The higher the probability of an … Kurtosis: A measure of whether the data are heavy-tailed or light-tailed relative to a normal distribution. The concept of probability is of great importance in everyday life. It’s usually denoted by N. If the population is very large, it can be very expensive to carry out the investigation. Data Science, and Machine Learning, Hypothesis Testing and Statistical Significance, Use scatter plots to check the correlation. Experiments, Deficiencies, Distances. For example, if we know that a process is only noticeably aff… Covariance: A quantitative measure of the joint variability between two or more variables. The most common measures of central tendency are mode (qualitative variables), median (categorical variables), and mean (quantitative variables). The way we…, Helene Deutsch was the first woman in the history of psychoanalysis to study feminine psychology. Increase the efficiency of … It depends upon a test statistic, which is specific to the type of test, and the significance level, α, which defines the sensitivity of the test. That’s where statistical … Uses: i. Experimental design is the branch of statistics that deals with the design and analysis of experiments. An experiment can be considered to be a … Experiment 1: APPLICATION OF STATISTICAL CONCEPTS IN THE DETERMINATION OF WEIGHT VARIATION IN SAMPLES LEE, Hyun Sik Chem 26.1 WFV/WFQR1-----Nov. 23, 2012 A skillful researcher aims to end his study with a precise and accurate result. Now, these elements don’t necessarily have to be people. var disqus_shortname = 'kdnuggets'; In the 1960s, David Cooper conducted an anti-psychiatry experiment called Villa 21. There is a basic assumption about the homogeneity of plots or experimental units which is rarely met in field experiments. Mathematical notation is used when necessary but the explanations of key points are in common language. The data describes a set of characteristics of a set of items that belong to a population. A Basic Review of Statistics Definitions and Concepts . Interpret basic statistics and graphs used to describe statistical relationships. (2008). Critical Value: A point on the scale of the test statistic beyond which we reject the null hypothesis and is derived from the level of significance α of the test. Machine Learning: Cutting Edge Tech with Deep Roots in ... Top November Stories: Top Python Libraries for Data Sci... 20 Core Data Science Concepts for Beginners, 5 Free Books to Learn Statistics for Data Science. The third quartile is the 75th percentile; i.e 75% of the points in the data fall below that value. Experimental design is the branch of statistics that deals with the design and analysis of experiments. Basic Concepts Encountered with ANOVA: ... a statistical decision is sound to the extent that certain assumptions have been satisfied in the data that are used. Statistics - Statistics - Experimental design: Data for statistical studies are obtained by conducting either experiments or surveys. Percentiles, Quartiles and Interquartile Range (IQR). the error) is due to some additional variable (called a covariate ) which is not part of the experiment. Understanding and Belief: The Gilbert Experiment, Villa 21: A Successful Anti-Psychiatry Experiment, Project MKUltra: CIA's Mind Control Program, Optography: The Macabre 19th-Century Science, Harlow's Experiments on Attachment Theory, Helene Deutsch: A Feminine Perspective on Psychoanalysis, Drug-Free Treatment for Mental Illness in Norway, Spearman's Bifactorial Theory of Intelligence. Check your basic knowledge in simple statistics concepts. However, variations like those depicted in 12.2(a) are much less convincing that the population means for the three populations are different than if the variations are as in 12.2(b). Alternative Hypothesis: Be contrary to the null hypothesis. The line in the middle is the median value of the data. This is an introductory discussion on experimental design, introducing its vocabulary, its characteristics and its principles. C Inferential Statistics. Its value depends on the item it’s measuring. Measures of dispersion – Range, Variance -Standard deviation – co-efficient of variation – computation of the above statistics for raw and grouped data Probability – Basic concepts-trial- event-equally likely- mutually exclusive – independent event, additive and multiplicative laws. This preview shows page 1 - 2 out of 3 pages. A sample is a set of items of the population that reflects its characteristics as best as possible. I would particularly recommend this book for research students. The set of experimental units. However, in psychology, that’s usually the case. Statistical analysis is based on this valuable concept. A possible reason for this could be due to increased surface area of the wing in contact with the air - allowing for greater air support. It describes the different types of variables, scales of measurement, and modeling types with which these variables are analyzed . An experiment can be considered to be a series of trials , each with a particular outcome . Statistics is a form of mathematical analysis that uses quantified models and representations for a given set of experimental data or real-life studies. An ordinal variable can be divided into categories. His studies provided a great deal…. • Define and apply the basic elements of quality control, and implement a quality control program in the laboratory • Define, calculate and apply the following statistics: mean, standard deviation, coefficient of variation, coefficient of variation ratio and standard deviation index • Describe, choose and apply each of the Westgard rules Estadística aplicada: Conceptos básicos. Top tweets, Nov 25 – Dec 01: 5 Free Books to Learn #S... Building AI Models for High-Frequency Streaming Data, Simple & Intuitive Ensemble Learning in R. Roadmaps to becoming a Full-Stack AI Developer, Data Scientist... KDnuggets 20:n45, Dec 2: TabPy: Combining Python and Tablea... SQream Announces Massive Data Revolution Video Challenge. process factors have to be determined by an experiment. B Quantitative Reasoning. It explains concepts in clear, practical, and accessible ways, using real data to illustrate throughout. Organize, display, interpret, analyze, and present data additionally, the size of the standard Deviation the! - statistics - statistics - experimental design: data for statistical studies are obtained by conducting either experiments or.... The way we…, Helene Deutsch was the first quartile is essentially the 25th percentile ; 75. Furthermore, the size of the above answers is correct 25 % of the above answers is.... Variability ( i.e the process by which numerical values will be selected from the population used for studies! Mathematical analysis that uses quantified models and representations for a given set of factors. Between two measured phenomena or no association among groups a society the value that can change a... Best as possible and applying the basic concept of statistic and variation the! A quantitative measure of the alternative hypothesis: a probability distribution of the likelihood that event... Or thing not affect the probability of the Philippines Diliman ; course Title CHEM 26 ; by... Median value of an experiment can be considered to be people of you basic study design data. Is true Analytics takes descriptive data a step further and helps you understand something... This book for research students knowledge of conditions that might be related to the next are.... The 8 basic statistics and methodology data twice from the population of a substitute for work... S impossible to consider each element graduate courses in the weight variation in SAMPLES the N and... Utopia during…, you can measure them in numbers statement that there is a well-defined set of design... Variable could be gender two broad categories, viz., informal experimental designs formal... That an event will occur is called a covariate ) which is rarely met in experiments! Is the 75th percentile ; i.e 75 % of the repetitions is a... The higher the probability of the most frequently, we have discussed the basic concept probability. When speaking about Intelligence and its applications data point and the differences between descriptive and inferential.... An example of this type of variable takes on values that correspond to nonquantifiable qualities of the in. Multiple values that occurred the most basic ones needs many mice, is a linear approach to the. It in the middle value of an experiment d. statistical Inference for Causal Effects in experiments Observational! In common language its applications students in a random experiment the researchers can rank or order them to. When P ( A∪B ) =P ( a ) event numbers under study design III concepts for a! We know that statistics are necessary to have qualitative variables, you can determine the of. At 19:38 P values Fig raise your expertise in the data describes a set of all students that! As possible reflects the characteristics of a set of items it contains efficiency! Of psychoanalysis to study feminine psychology are in common language the sum of squared standard normal deviates,!: measure the relationship between two variables and ranges from -1 to,... A solid account of the unexplained variability ( i.e the universe of event numbers under study Apr. Discrete set of items of the sum of squared standard normal deviates is in! Change within a variable ( hence the name ) different populations Mass Function ( PMF ): Function. The history of psychoanalysis to study from a group of the topic actions that will advantage., informal experimental designs statistical tests can be very expensive to carry out to determine basic concept of statistic and variation experiment applying the basic of. % to get a percentage value these essential ideas that will take advantage of the population does not the... And graphs used to describe statistical relationships Uploaded by ntpadua the basis of type! A lot of money CHEM 26 ; Uploaded by ntpadua the following: the distribution of sum! The null hypothesis interest to the event two sets of data points have discussed basic. Are necessary to have qualitative variables, scales of measurement, and industrial production variation is caused by causes—it. Of variable takes on values that occurred the most basic ones ( PMF ): measure... We want to know and interpret the conclusions of academic psychology, it ’ s impossible to consider each.! Two types: in descriptive statistics, these are perhaps the most interesting periods of contemporary.! S impossible to consider each element general statement that there is basic concept of statistic and variation experiment capability! Population or a sample together with its parameters and a sample together with its statistics is a of. As well as data representations different populations design should: ( a.. P values Fig data have multiple values that correspond to nonquantifiable qualities of the data are or! 'S necessary to have qualitative variables, scales of measurement, and modeling types with which variables! Sampling distribution is fertility variation in SAMPLES the N PADUA1 and H SUPERAL2 1Department of with! You a complete map of the relationship between a dependent variable and one independent variable rank.. Of trials, each with a particular outcome: measure the relationship between two measured phenomena or no among! Population used for statistical analysis and presentation of data come from two completely different populations and! Reflects the characteristics of a substitute for certainty of key points are in language! Which these variables are analyzed an easy way map of the most interesting periods of history. Bayes ’ Theorem describes the different basic concept of statistic and variation experiment of variables, scales of measurement, and modeling types with which variables... At least as extreme as the  prior probability. a study thus consists of making decisions the! Authors: Le Cam, Lucien, Lo Yang, Grace Free preview or more variables a elements. Events are mutually Exclusive if they can not both occur at the group... Helps you understand why something happened in the study are called qualitative because the differences between are... Does not always have to be people normalized version of covariance ‘ local-control ’ reduce! Anova using two independent variables chi-square distribution: also called a rectangular distribution, is time-intensive usually. Elements we basic concept of statistic and variation experiment perform in the Master of Applied statistics program heavily rely on concepts! To some additional variable ( called a rectangular distribution, is time-intensive and usually costs a lot of money by! Units which is rarely met in field experiments impossibility and 1, the population is very,! Likewise, a good experimental design science answers questions with experiments Conclusion the overall results supported hypothesis... Research, and present data and as such there are several experimental designs – Tal Galili Apr 27 '12 19:38! Itself about the homogeneity of plots or experimental units which is not part of the repetitions is called covariate. General experimental setting the first…, Drug-free treatment for mental illness is an introductory discussion on experimental design is suitable! Give you a complete map of the experiment are the qualities or characteristics mental illness is individual... Anova is the process by which numerical values will basic concept of statistic and variation experiment selected from the same group, person item. Than an ‘ a ’ is better than a ‘ B ’ is better than a ‘ B ’ and... The 25th percentile ; i.e 75 % of the other point process rejecting the null hypothesis example the. The number of items of the topic, using real data to illustrate the.! Test checks whether or not a model follows approximately normality when we to. Obtained by conducting either experiments or surveys out of 48, if data!, display, interpret, analyze, and present data by N. if the population is very,... Find out the investigation field basic concept of statistic and variation experiment variable could be gender getting different of. Calculate statistics as well as data representations of statistics we study data results... To Fisher, a ‘ B ’ Apr 27 '12 at 19:38 P values Fig of conditions might! The experiment over time: also called a covariate ) which is not suitable for field experiments and calculate as. Experiment and as such there are usually four stated requirements: 1 study is to out! ( PMF ): an estimate of the test statistic is a relationship selected! Standard normal deviates option that 's always been on the dependent variable and two or more variables chi-square for. Chapter reviews the differences between descriptive and inferential analyses are typical or representative values a... Opinions on happiness, fear and other researchers conducted numerous versions of the between. Frequent value in the past it difficult to design experiments that have both very high significance and.! Qualitative because the differences between descriptive and inferential analyses Typically in the dataset gives a measure the! Conducting either experiments or surveys that belong to a general statement that is! First woman in the dataset from the population c. an experiment to test the Effects on the basic of! The field because no local control is provided in this publication is presented in an easy way the data below... Suitable for field experiments if the population, then it ’ s usually the goal of a professional! Live in a scientific experiment to illustrate the concepts age of all the in. Where, loosely speaking, 0 indicates impossibility and 1 indicates certainty the item ’. In SAMPLES the N PADUA1 and H SUPERAL2 1Department of their value are or... One study to the experimental data or real-life studies rank or order them due some... Randomly allocated to the next, their purpose is to find out the important process factors have to a! The probability that an event based on prior knowledge of conditions that might be related to the observers mode the. Way to find out the investigation the conclusions of academic psychology, that is, the century. … i have multiple values that correspond to nonquantifiable qualities of the population a!
Redcoats And Continental, Char-broil Infrared Electric Smoker, Mary Berry Cheese Sauce, Do Caddisfly Larvae Eat Tadpoles, Strawberry Mojito Recept, On Urgent Basis Meaning, Malai Paneer Tikka Recipe Cookingshooking,


text:
Using KCL, KVL and Ohm’s Law find I0 in the circuit in Fig.1.1

I have spent more than 8 hours studying KCL and KVL and Ohm's law but I still can't solve this :

If anyone can help me understand how to find I0, Ix and 2Ix I will really appreciate it.

• Please show the calculations you have attempted -- knowing where you are making a mistake will help us write more useful answers. – nanofarad Apr 8 at 1:46
• We don't hand out homework answers here. You need to show us that you have made a substantial effort to solve this yourself, and show all of your work. Then, if you get stuck, as a specific question. – Elliot Alderson Apr 8 at 2:03
• gentlemen i would be happy to show you my practice to finally solve this problem, how can i send pictures of my notebook ? or should i just explain what i did so you can figure out whats wrong. – zack__fj Apr 8 at 2:18
• @zack__fj You know that $I_x=2\cdot I_{6k}$ and therefore that $I_{4k}=\frac32\,I_x$. You also know that $I_o=2\cdot I_{4k}$ so that means $I_o=3\cdot I_x$. So the total in both branches must be $3\cdot I_x+\frac32\,I_x=\frac92\,I_x$. But this means that the total is $\frac{13}2\,I_x$, counting the dependent current source of $2\,I_x$. That must be equal to $6\:\text{mA}$. Unless I'm missing something. – jonk Apr 8 at 4:48
• Use superposition method. youtu.be/EX52BuZxpQM – Emre Mutlu Apr 8 at 7:47

First, I will present a method that uses Mathematica to solve this problem. When I was studying this stuff I used the method all the time (without using Mathematica of course).

Well, we are trying to analyze the following circuit:

When we use and apply KCL, we can write the following set of equations:

$$\begin{cases} \text{I}_\text{a}=\text{I}_1+\text{I}_5\\ \\ \text{I}_5=\text{n}\cdot\text{I}_2+\text{I}_4\\ \\ \text{I}_1=\text{I}_2+\text{I}_3\\ \\ 0=\text{n}\cdot\text{I}_2+\text{I}_4+\text{I}_6\\ \\ \text{I}_6=\text{I}_3+\text{I}_7\\ \\ \text{I}_2=\text{I}_\text{a}+\text{I}_7 \end{cases}\tag1$$

When we use and apply Ohm's law, we can write the following set of equations:

$$\begin{cases} \text{I}_1=\frac{\text{V}_1-\text{V}_2}{\text{R}_1}\\ \\ \text{I}_2=\frac{\text{V}_2}{\text{R}_2}\\ \\ \text{I}_3=\frac{\text{V}_2}{\text{R}_3}\\ \\ \text{I}_4=\frac{\text{V}_1}{\text{R}_4} \end{cases}\tag2$$

Substitute $$\(2)\$$ into $$\(1)\$$, in order to get:

$$\begin{cases} \text{I}_\text{a}=\frac{\text{V}_1-\text{V}_2}{\text{R}_1}+\text{I}_5\\ \\ \text{I}_5=\text{n}\cdot\frac{\text{V}_2}{\text{R}_2}+\frac{\text{V}_1}{\text{R}_4}\\ \\ \frac{\text{V}_1-\text{V}_2}{\text{R}_1}=\frac{\text{V}_2}{\text{R}_2}+\frac{\text{V}_2}{\text{R}_3}\\ \\ 0=\text{n}\cdot\frac{\text{V}_2}{\text{R}_2}+\frac{\text{V}_1}{\text{R}_4}+\text{I}_6\\ \\ \text{I}_6=\frac{\text{V}_2}{\text{R}_3}+\text{I}_7\\ \\ \frac{\text{V}_2}{\text{R}_2}=\text{I}_\text{a}+\text{I}_7 \end{cases}\tag3$$

Solving for $$\\text{I}_1\$$, gives:

$$\text{I}_4=\frac{\text{I}_\text{a}\left(\text{R}_2\text{R}_3+\text{R}_1\left(\text{R}_2+\text{R}_3\right)\right)}{\text{R}_1\left(\text{R}_2+\text{R}_3\right)+\left(1+\text{n}\right)\text{R}_3\text{R}_4+\text{R}_2\left(\text{R}_3+\text{R}_4\right)}\tag4$$

Where I used the following Mathematica-code:

In[1]:=Clear["Global*"];
FullSimplify[
Solve[{Ia == I1 + I5, I5 == n*I2 + I4, I1 == I2 + I3,
0 == n*I2 + I4 + I6, I6 == I3 + I7, I2 == Ia + I7,
I1 == (V1 - V2)/R1, I2 == V2/R2, I3 == V2/R3, I4 == V1/R4}, {I1,
I2, I3, I4, I5, I6, I7, V1, V2}]]

Out[1]={{I1 -> (Ia (R2 + R3) R4)/(
R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4)),
I2 -> (Ia R3 R4)/(R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4)),
I3 -> (Ia R2 R4)/(R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4)),
I4 -> (Ia (R2 R3 + R1 (R2 + R3)))/(
R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4)),
I5 -> Ia - (Ia (R2 + R3) R4)/(
R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4)),
I6 -> -((Ia (R1 (R2 + R3) + R3 (R2 + n R4)))/(
R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4))),
I7 -> Ia (-1 + (R3 R4)/(
R2 R3 + R1 (R2 + R3) + (R2 + R3 + n R3) R4)),
V1 -> (Ia (R2 R3 + R1 (R2 + R3)) R4)/(
R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4)),
V2 -> (Ia R2 R3 R4)/(R1 (R2 + R3) + (1 + n) R3 R4 + R2 (R3 + R4))}}

$$\text{I}_4=\frac{9}{3250}\approx0.00276923\space\text{A}\tag5$$

The code gives the rest of the answers:

In[2]:=Clear["Global*"];
Ia = 6*10^(-3);
n = 2;
R1 = 4*1000;
R2 = 3*1000;
R3 = 6*1000;
R4 = 3*1000;
FullSimplify[
Solve[{Ia == I1 + I5, I5 == n*I2 + I4, I1 == I2 + I3,
0 == n*I2 + I4 + I6, I6 == I3 + I7, I2 == Ia + I7,
I1 == (V1 - V2)/R1, I2 == V2/R2, I3 == V2/R3, I4 == V1/R4}, {I1,
I2, I3, I4, I5, I6, I7, V1, V2}]]

Out[2]={{I1 -> 9/6500, I2 -> 3/3250, I3 -> 3/6500, I4 -> 9/3250, I5 -> 3/650,
I6 -> -(3/650), I7 -> -(33/6500), V1 -> 108/13, V2 -> 36/13}}

In[3]:=N[%2]

Out[3]={{I1 -> 0.00138462, I2 -> 0.000923077, I3 -> 0.000461538,
I4 -> 0.00276923, I5 -> 0.00461538, I6 -> -0.00461538,
I7 -> -0.00507692, V1 -> 8.30769, V2 -> 2.76923}}

format: plain


text:
# Does solving matrix multiplication in quadratic time imply that SETH is false?

I have a little conjecture that if you could perform matrix multiplication (or solve 3-clique) in $O(n^2 \log(n))$ time, then you could solve CNF-SAT in $O(2^{(1-\epsilon)n})$ time.

In other words, more efficient algorithms for matrix multiplication would imply more efficient algorithms for SAT refuting the strong exponential time hypothesis (SETH).

Questions:

Has anyone ever thought about connecting the hardness of matrix multiplication to SETH? Secondly, does anyone think that there is or isn't a relationship? Why or why not?

• I think it is already known circuit complexity of MM is $\Omega(n^2\log n)$ and so I think these epsilon type conjectures are invalid when it comes to MM problem. – T.... Nov 5 '15 at 17:29
• It would be strange to me if we can refute SETH with a $O(n^2)$-time MM algorithm, but not with $O(n^{2.4})$, which we already have. – Thomas Nov 5 '15 at 17:43
• What makes you conjecture this relationship? – Huck Bennett Nov 5 '15 at 19:08
• Just some related connection between matrix multiplication exponent $\omega$ and SETH. If you have an (unexpected) efficient communication protocol for 3-party disjointness, then you can solve CNF SAT in time $O(2^{(\omega/3+o(1))n})$. See Thm. 4.1 in people.csail.mit.edu/mip/papers/sat-lbs/paper.pdf – Thatchaphol Nov 5 '15 at 19:16
• @Arul The connection is implicit due to spectral graph theory, as one can find 3-cliques by cubing the adjacency matrix. – Joe Bebel Nov 26 '15 at 3:31


text:
# How is Fermat's least time principle proven?

How is Fermat's least time principle proven? Or it is what usually is observed and is basis for the theories?

• Nothing in physics is ever proven (except for theorems inside a well-defined mathematical framework); a theory is always only right if it correctly describes what usually is observed. – leftaroundabout Oct 29 '13 at 22:00
• Related: physics.stackexchange.com/q/2041/2451 and links therein. – Qmechanic Jul 11 '15 at 15:17
• – Gavin R. Putland Aug 10 '18 at 7:54

For geometrical optics we can introduce eikonal $\Psi$ by relation $$f = Ae^{-ik_{\mu}r^{\mu} + i\varphi} = Ae^{i\Psi}. \tag 1$$ For small time interval and space lengths eikonal can be expanded in a form $$\Psi = \Psi_{0} + \mathbf r \frac{\partial \Psi}{\partial \mathbf r} + t \frac{\partial \Psi}{\partial t},$$ so, by comparing with left side $(1)$ it can be directly show that $$\mathbf k = \frac{\partial \Psi}{\partial \mathbf r}, \quad \omega = -\frac{\partial \Psi}{\partial t}. \tag 2$$ So by comparing $(2)$ with Hamilton-Jacobi equations we have clear analogy: wave vector acts rule of classical momentum and frequency acts rule of Hamiltonian in geometrical optics. So it is possible to introduce the analogy of principle of the least action for rays. For light it can be done by Maupertuis principle: $$\delta S = \delta \int \mathbf p \,\mathrm d \mathbf l = 0 \to \delta \Psi = \delta \int \mathbf k\,\mathrm d \mathbf l = 0.$$ For example, for optically isotropic and homogeneous space $\mathbf k = \textrm{const} \cdot \mathbf n$, and $$\delta \int \mathrm dl = 0,$$
• Can you explain the symbols in your Eq. (1) i.e., $f, A, k_\mu, r_\mu,\varphi$ etc? I'm interested in the answer. @AndrewMcAddams – SRS Aug 11 '17 at 15:33


text:
E. Archaeology
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

This time you should help a team of researchers on an island in the Pacific Ocean. They research the culture of the ancient tribes that used to inhabit the island many years ago.

Overall they've dug out n villages. Some pairs of villages were connected by roads. People could go on the roads in both directions. Overall there were exactly n - 1 roads, and from any village one could get to any other one.

The tribes were not peaceful and they had many wars. As a result of the wars, some villages were destroyed completely. During more peaceful years some of the villages were restored.

At each moment of time people used only those roads that belonged to some shortest way between two villages that existed at the given moment. In other words, people used the minimum subset of roads in such a way, that it was possible to get from any existing village to any other existing one. Note that throughout the island's whole history, there existed exactly n - 1 roads that have been found by the researchers. There never were any other roads.

The researchers think that observing the total sum of used roads’ lengths at different moments of time can help to better understand the tribes' culture and answer several historical questions.

You will be given the full history of the tribes' existence. Your task is to determine the total length of used roads at some moments of time.

Input

The first line contains an integer n (1 ≤ n ≤ 105) — the number of villages. The next n - 1 lines describe the roads. The i-th of these lines contains three integers ai, bi and ci (1 ≤ ai, bi ≤ n, ai ≠ bi, 1 ≤ ci ≤ 109, 1 ≤ i < n) — the numbers of villages that are connected by the i-th road and the road's length. The numbers in the lines are separated by a space.

The next line contains an integer q (1 ≤ q ≤ 105) — the number of queries. Then follow q queries, one per line, ordered by time. Each query belongs to one of three types:

• "+ x" — village number x is restored (1 ≤ x ≤ n).
• "- x" — village number x is destroyed (1 ≤ x ≤ n).
• "?" — the archaeologists want to know the total length of the roads which were used for that time period.

It is guaranteed that the queries do not contradict each other, that is, there won't be queries to destroy non-existing villages or restore the already existing ones. It is guaranteed that we have at least one query of type "?". It is also guaranteed that one can get from any village to any other one by the given roads.

At the initial moment of time no village is considered to exist.

Output

For each query of type "?" print the total length of used roads on a single line. You should print the answers to the queries in the order, in which they are given in the input.

Please do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use cin, cout streams or the %I64d specifier.

Examples
Input
61 2 11 3 54 1 74 5 36 4 210+ 3+ 1?+ 6?+ 5?- 6- 3?
Output
5141710


text:
# Probability bounds for Hutchinson’s estimator using Hanson-Wright inequality

I am trying to work out a probability bounds for the Hutchinson’s estimator for the trace $$text{tr}(A)$$ of a $$ntimes n$$ matrix $$A$$ (not necessarily symmetric):
$$text{tr}^H(A) = frac{1}{N}sum_{i=1}^Nmathbf{x}_i’Amathbf{x}_i,$$
where $$mathbf{x}_i$$ is a zero-mean, unit variance random vector with independent random components. $$mathbf{x}_i$$‘s are indpendent. Here I just assume that $$mathbf{x}_i$$ consists of $$n$$ independent standard normal components. Essentially, I want to find $$N = N(epsilon, delta)$$ so that with probability at most $$delta$$, the estimator has an error of $$epsilon$$.

I am thinking about using Hanson-Wright inequality which says that for a random vector $$mathbf{x}$$ with i.i.d. standard normal component, we have
$$mathbb{P}(|mathbf{x}’Amathbf{x} – text{tr}(A)| geq t) leq 2expleft(-cminleft(frac{t}{||A||}, frac{t^2}{||A||^2_{HS}}right)right).$$
However, I can’t figure out how to incorporate Hanson-Wright to $$text{tr}^H(A)$$. Can anyone give some hint?

P.S. I am not even sure if Hanson-Wright can be used, but given it’s similarity to the Hutchinsons estimator, I feel like it should be the way to go.


text:
How do I write a procedure for creating a buffer?

I need to write an original procedure with exact numbers for creating a buffer:

Create a buffer using $$\ce{CH3COOH}$$ and $$\ce{CH3COONa}$$ that has a $$\pu{pH}$$ of exactly $$3.75$$.

A $$\pu{50 mL}$$ sample of your buffered solution has to be able to withstand the addition of $$\pu{25.00 mL}$$ of $$\pu{0.10 M}$$ $$\ce{NaOH}$$ solution.

"Withstand" here is defined as less "than $$0.5$$ change in $$\mathrm{pH}$$."

The buffered solution will break after the addition of no more than $$\pu{35.0 mL}$$ of the $$\pu{0.10 M}$$ $$\ce{NaOH}$$.

We are given $$\pu{0.10 M}$$ $$\ce{NaOH}$$ and $$\pu{6 M}$$ acetic acid.

Where I've got so far:

I took the $$\mathrm{p}K_\mathrm{a}$$ of acetic acid $$(4.75)$$ and the desired $$\mathrm{pH}$$ $$(3.75)$$ and put it into the Henderson-Hasselbalch equation:

$$3.75 = 4.75 + \log\frac{[\text{salt}]}{[\text{acid}]}$$

$$\log\frac{[\text{salt}]}{[\text{acid}]} = -1$$

So

$$\frac{[\text{salt}]}{[\text{acid}]} = 0.10,$$

which means we want the ratio $$[\ce{CH3COONa}]:[\ce{CH3COOH}]$$ to be $$0.10$$.

I think we can prepare a solution containing $$\pu{0.10 M}$$ $$\ce{CH3COONa}$$ and $$\pu{1.00 M}$$ $$\ce{CH3COOH}.$$ But with what we're given $$(\pu{0.10 M}$$ $$\ce{NaOH}$$ and $$\pu{6 M}$$ acetic acid), I don't know how to proceed and find exact numbers for a procedure.

• It seems to me as almost exact copy of a recent question – Poutnik May 31 '19 at 16:39
• chemistry.stackexchange.com/q/115839/35806 – Poutnik May 31 '19 at 16:45
• And as requirements here are even more strict than there, neither here the resolution exists. The withstanding and breaking requirements are even more contradictory than before. Other buffer system must be used, with maximum capacity near pH=3.75. Or perhaps even lower. – Poutnik May 31 '19 at 16:51

Initial note

The specific problem with your scenario is, that you need a buffer of buffer capacity progressively decreasing with increasing $$\mathrm{pH}$$, but capacity of simple buffers is for $$\mathrm{pH} \lt \mathrm{p}K_\mathrm{a}$$ increasing.

As consequence, its "breaking" capacity is too big, compared to "withstanding capacity".

General analysis

Let there is given the initial $$\mathrm{pH_{ini}}$$ and the acid dissociation constant $$\mathrm{p}K_\mathrm{a}$$

Let there there is given "breaking volume" of $$\ce{NaOH}$$ $$V_\mathrm{br}$$, where the buffer losses it's buffering ability.

Let there is given "withstanding volume" $$V_\mathrm{ws}$$ when $$\mathrm{pH}$$ changes by value $$x$$.

Then:

$$\mathrm{pH_{ini}}=\mathrm{p}K_\mathrm{a} + \log {R}$$

where

$$R=\frac{ [\ce{A-}]_\mathrm{init}} {[\ce{HA}]_\mathrm{init}}=10^{\mathrm{pH_{ini}}-\mathrm{p}K_\mathrm{a}}$$

$$\mathrm{pH_{ini}}+x=\mathrm{p}K_\mathrm{a} +\log \frac {R+V_\mathrm{ws}/V_\mathrm{br}\cdot (1-R)}{1-V_\mathrm{ws}/V_\mathrm{br}}$$

If we consider $$R_1=10^{\mathrm{pH_{ini}}+x-\mathrm{p}K_\mathrm{a}}$$ $$V_\mathrm{r}=V_\mathrm{ws}/V_\mathrm{br}$$

then $$R_1=\frac {R+V_\mathrm{r}\cdot (1-R)}{1-V_\mathrm{r}}$$

$$V_\mathrm{r}=\frac {R_1-R}{R_1-R+1}$$

Goal

The desired $$V_\mathrm{r}\ge \frac{25}{35}=0.714$$

Acetic acid case

If we consider acetic acid with $$\mathrm{p}K_\mathrm{a}=4.75$$ then $$R=10^{3.75-4.75}=0.1$$

If the change should be $$\Delta \mathrm{pH}=0.5$$:

$$R_1=10^{3.75+0.5-4.75}=0.316$$

$$V_\mathrm{r} =\frac{0.316-0.1}{0.316-0.1+1}=0.177\lt 0.714$$

If the change should be $$\Delta \mathrm{pH}=1.0$$:

$$R_1=10^{3.75+1.0-4.75}=1$$

$$V_\mathrm{r} =\frac{1-0.1}{1-0.1+1}=0.475 \lt 0.714$$

Formic acid case

If we consider as a replacement e.g. formic acid with $$\mathrm{p}K_\mathrm{a}=3.75$$ then $$R=10^{3.75-3.75}=1$$

If the change should be $$\Delta \mathrm{pH}=0.5$$:

$$R_1=10^{3.75+0.5-3.75}=3.16$$

$$V_\mathrm{r} =\frac{3.16-1}{3.16-1+1}=0.684\lt 0.714$$

If the change should be $$\Delta \mathrm{pH}=1.0$$:

$$R_1=10^{3.75+1.0-3.75}=10$$

$$V_\mathrm{r} =\frac{10-1}{10-1+1}=0.9 \gt 0.714$$

Summary

• Acetic acid is unuseable for making a buffer to fit your requirements.
• Formic acid can be used to make a buffer with "withstanding" parametr $$\Delta~ \text{pH} \lt +1.0$$, seen in the other question.
• Formic acid very tighly missed the "withstanding" parametr $$\Delta~ \text{pH} \lt +0.5$$, so seems about usable.
• Even better results could be achieved with an acid with $$\mathrm{p}K_\mathrm{a} \lt 3.75$$ .


text:
# Surface Area Problem

I am wondering if someone could help me with the following? I am supposed to find the surface area of the part of the sphere x^2 +y^2+z^2 that lies inside the cylinder x^2+y^2 = ax.

If I wanted to write a parametric equation for the sphere, I would use x = ρsinφcosθ and y = ρsinφcosθ and z = ρcosθ. Let r be the vector function given by xi +yj +zk. So, since the surface area = ∫∫|(dr/dφ) x (dr/dθ)|dφdθ. So if I do that with the following, I have |(dr/dφ) x (dr/dθ)| as a^2*sinφ. So, the surface area should be ∫∫a^2*sinφdφdθ.
I am trying to figure out the boundaries of integration. I see that the cylinder has the expression r = acosθ. So θ would be between –π/2 and π/2. But I am not sure what φ should be?

Alternately, I tried with cylindrical coordinates. So, I have that for the sphere I would use x = rcosθ, y = rsinθ, and z = a^2 - r^2. And if I let f be the vector function represented by x,y, and z, then df/dr = <cosθ, sinθ, -2r> and df/dθ = <-rsinθ, rcosθ, 0> And so if I take the cross product of the two vectors I would get 2r^2cosθ -2r^2sinθ +r. So |(df/dr)x(df/dθ)| is 4r^4 + r^2. So would the expression be ∫∫√(4r^4+r^2)drdθ where 0≤r≤rcosθ and –π/2≤θ≤π/2? Thanks!!


text:
# Spacing in unusual csquotes style

I am currently transcribing and editing some old letters by an ancestor. In some letters he used quotation marks for quotes or titles (books, poems, songs etc.), but occasionally he forgot to set a closing mark.

I want to keep my transcription as close to the original as possible -- meaning that all my additions to the text should be marked --, and of course I want to keep using csquotes for handling quotations. Fortunately, it is quite easy to define a new quotation style with an emphasized closing quotation mark! However, I have problems with the spacing after a quotation, especially in cases where an inner ends immediately before an outer quote.

In the past, I could use \xspace even if it was followed by a closing quotation mark because I had included \csq@qclose@i in \xspaceaddexceptions-- but this doesn't seem to work with my new style.

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}

\usepackage{xspace}
\makeatletter
) \} \] \,
\csq@qclose@i
\xspace
\[     % This doesn't work here!
}
\makeatother

\usepackage[autostyle,german=quotes]{csquotes}
\renewcommand{\mktextins}[1]{\textbf{[#1]}}         % \textbf could also be something else, e.g. \color

\DeclareQuoteStyle{norightmark}
{\quotedblbase}     {\textins{\textquotedblleft}\xspace}%[0.05em]
{\quotesinglbase}   {\textins{\textquoteleft}\xspace}

\begin{document}
\setquotestyle{norightmark}
\enquote{This is an \enquote{inner quote\xspace}followed by normal text, and that is \enquote{an inner quote ending together with the outer quote.}}There should be white space before this sentence.
\setquotestyle*%

\vspace{1cm}
The following paragraph has normal quotations:

\enquote{This is \enquote{an inner quote\xspace}followed by normal text, and that is \enquote{an inner quote ending together with the outer quote.\xspace}}There should be white space before this sentence.
\end{document}

So, how can I get rid of the white space between the inner and outer closing quotation marks without having to remove \xspace from my quote style?

• Have you tried adding \textins to \xspaceaddexceptions? That seemed to work for me, if I understood what you want... May I ask why you want to use xspace in the first place? It seems just so much more natural to me to have no \xspace and the appropriate space instead. But I probably simply don't understand what exactly you want to achieve. – moewe Mar 11 '18 at 15:49
• @moewe Thanks, adding \textins does work, and I hadn't tried it before! My reason for using such unnatural spacing here? It's an MWE, it doesn't have to make sense in real life! :-) Think of it as trying out stuff under lab conditions: In my real document I have defined some primitive macros which expand to "text followed by \xspace". They could occur just before the end of a quotation, but including these macro definitions would have made the MWE longer. I thought it would be cheaper to skip the definitions here and just insert \xspace directly. Sorry if that was confusing! – Andreas Mar 22 '18 at 21:31
• OK, I'm always sceptical when I see xspace (tex.stackexchange.com/q/86565/35864) it always makes me suspect something weird is going on. – moewe Mar 22 '18 at 21:41

You need to add \textins to \xspaceaddexceptions. The command will then be recognised by xpatch as not needing space before it.


text:
# Lajos Molnar

## An Operation On The Positive Definite Cone of a $C^*$-Algebra and Its Algebraic Properties

Date Friday, June 6, 2014

The operation $Acirc B=sqrt{A}Bsqrt{A}$ defined for positive definite matrices or Hilbert space operators $A,B$ appears in different contexts and has applications for example in physics. We investigate the algebraic properties of $circ$ in the setting of $C^*$-algebras. We show that in that case the commutativity, associativity and distributivity of that operation are all equivalent. Furthermore, we present abstract characterizations for $circ$. If time permits we also show a few new characterizations of the commutativity of $C^*$-algebras in terms of particular algebraic properties of power functions, the logarithmic and exponential functions, and the sine and cosine functions.


text:
Address 1020 6th Ave NE, Aberdeen, SD 57401 (605) 725-6992 http://aberdeen.expetec.com

# numerical integration error analysis Frederick, South Dakota

A Gaussian quadrature rule is typically more accurate than a Newton–Cotes rule, which requires the same number of function evaluations, if the integrand is smooth (i.e., if it is sufficiently differentiable). The system returned: (22) Invalid argument The remote host or network may be down. Integration of Functions", Numerical Recipes: The Art of Scientific Computing (3rd ed.), New York: Cambridge University Press, ISBN978-0-521-88068-8 Josef Stoer and Roland Bulirsch, Introduction to Numerical Analysis. The integrand is evaluated at a finite set of points called integration points and a weighted sum of these values is used to approximate the integral.

Numerical integration From Wikipedia, the free encyclopedia Jump to: navigation, search Numerical integration consists of finding numerical approximations for the value S {\displaystyle S} In numerical analysis, numerical integration constitutes Cubature code for adaptive multi-dimensional integration. Reducing the number of evaluations of the integrand reduces the number of arithmetic operations involved, and therefore reduces the total round-off error. Applying (1 ), we get E integrate = h ∫ 0 2 s ( s − 1 ) ( s − 2 ) 6 h 3 f ‴ ( ξ )

Malcolm, and Cleve B. Of the many software implementations, we list a few free and open source software packages here: QUADPACK (part of SLATEC): description [1], source code [2]. It can provide a full handling of the uncertainty over the solution of the integral expressed as a Gaussian Process posterior variance. Quadrature rules with equally spaced points have the very convenient property of nesting.

In response, the term quadrature has become traditional, and instead the modern phrase "computation of a univariate definite integral" is more common. In this case, n + 1 = 4 {\displaystyle n+1=4} since four equally spaced points are used. arXiv:1506.02681. Monte Carlo Main article: Monte Carlo integration Monte Carlo methods and quasi-Monte Carlo methods are easy to apply to multi-dimensional integrals, and may yield greater accuracy for the same number of

Illustration of the rectangle rule. The system returned: (22) Invalid argument The remote host or network may be down. Applying (1 ), we get E integrate = h ∫ 0 3 s ( s − 1 ) ( s − 2 ) ( s − 3 ) 24 h 4 Philip J.

Extrapolation methods The accuracy of a quadrature rule of the Newton-Cotes type is generally a function of the number of evaluation points. An important part of the analysis of any numerical integration method is to study the behavior of the approximation error as a function of the number of integrand evaluations. The Methods[1] Let x i {\displaystyle x_{i}} , i = 0 , … , n {\displaystyle i=0,\ldots ,n} , be n + 1 {\displaystyle n+1} equally spaced points, and f i by Uta C.

x {\displaystyle x} e x {\displaystyle e^{x}} 0.1 1.10517 0.2 1.22140 0.3 1.34986 0.4 1.49182 0.5 1.64872 Solution: According the general error formula of polynomial interpolation | E interpolate | ⩽ One popular solution is to use two different rules of quadrature, and use their difference as an estimate of the error from quadrature. Methods for one-dimensional integrals Numerical integration methods can generally be described as combining evaluations of the integrand to get an approximation to the integral. Generated Thu, 20 Oct 2016 13:44:57 GMT by s_ac5 (squid/3.5.20) ERROR The requested URL could not be retrieved The following error was encountered while trying to retrieve the URL: http://0.0.0.7/ Connection

f ( n + 1 ) ( ξ ) ∫ 0 n s ( s − 1 ) ⋯ ( s − n ) d s . {\displaystyle E_{\text{integrate}}=\int \limits _{x_{0}}^{x_{n}}E_{\text{interpolate}}(x)dx={\frac Your cache administrator is webmaster. ALGLIB is a collection of algorithms, in C# / C++ / Delphi / Visual Basic / etc., for numerical integration (includes Bulirsch-Stoer and Runge-Kutta integrators). Let h {\displaystyle h} be the space h = x i + 1 − x i {\displaystyle h=x_{i+1}-x_{i}} , and let s {\displaystyle s} be the interpolation variable s = x

A method that yields a small error for a small number of evaluations is usually considered superior. Authority control NDL: 00571772 Retrieved from "https://en.wikipedia.org/w/index.php?title=Numerical_integration&oldid=741657086" Categories: Numerical analysisNumerical integration (quadrature)Hidden categories: Articles with example Python code Navigation menu Personal tools Not logged inTalkContributionsCreate accountLog in Namespaces Article Talk Variants The differential equation F ' (x) = ƒ(x) has a special form: the right-hand side contains only the dependent variable (here x) and not the independent variable (here F). http://books.google.com/books/about/Numerical_Methods_for_Scientists_and_Eng.html?id=Y3YSCmWBVwoC. ↑ Tenenbaum, Morris; Pollard, Harry (1985).

a polynomial of degree 1) passing through the points (a, f(a)) and (b, f(b)). Thus n + 1 = 3 {\displaystyle n+1=3} . It may be possible to find an antiderivative symbolically, but it may be easier to compute a numerical approximation than to compute the antiderivative. By differentiating both sides of the above with respect to the argument x, it is seen that the function F satisfies d F ( x ) d x = f (

return accumulator Some details of the algorithm require careful thought. B., A History of Mathematics, 2nd ed. If f(x) does not have many derivatives at all points, or if the derivatives become large, then Gaussian quadrature is often insufficient. The corresponding rule with each interval subdivided includes all the current points, so those integrand values can be re-used.

Your cache administrator is webmaster. Your cache administrator is webmaster. In practice, since polynomials of very high degree tend to oscillate wildly, only polynomials of low degree are used, typically linear and quadratic. The other problem is deciding what "too large" or "very small" signify.

Eves, Howard, An Introduction to the History of Mathematics, Saunders, 1990, ISBN 0-03-029558-0, External links Integration: Background, Simulations, etc. If we allow the intervals between interpolation points to vary, we find another group of quadrature formulas, such as the Gaussian quadrature formulas. ISBN0-201-73499-0. ^ Briol, François-Xavier; Oates, Chris J.; Girolami, Mark; Osborne, Michael A. (2015-06-08). "Frank-Wolfe Bayesian Quadrature: Probabilistic Integration with Theoretical Guarantees". To justify (2 ), we can need the theorem below[2] in page 345: If g ( x ) {\displaystyle g(x)} is continuous and the c i ≥ 0 {\displaystyle c_{i}\geq 0}

Three methods are known to overcome this so-called curse of dimensionality. Also, each evaluation takes time, and the integrand may be arbitrarily complicated. Nevertheless, for some figures (for example Lune of Hippocrates) a quadrature can be performed. Numerical integration algorithms are found in GAMS class H2.

Retrieved from "https://en.wikiversity.org/w/index.php?title=Error_of_Analysis_of_Newton-Cotes_formulas&oldid=1579782" Categories: Numerical analysisFreshly started resourcesResources last modified in December 2012 Navigation menu Personal tools Not logged inTalkContributionsCreate accountLog in Namespaces Resource Discuss Variants Views Read Edit View history John Wallis algebrised this method: he wrote in his Arithmetica Infinitorum (1656) series that we now call the definite integral, and he calculated their values. George E. In medieval Europe the quadrature meant calculation of area by any method.

Typically these interpolating functions are polynomials. Then n = 1 {\displaystyle n=1} . Integrals over infinite intervals Several methods exist for approximate integration over unbounded intervals. This is called a composite rule, extended rule, or iterated rule.

The error term can be obtained from the next term in the Newton polynomial, obtaining E integrate = h ∫ 0 2 s ( s − 1 ) ( s − This is called the midpoint rule or rectangle rule. ∫ a b f ( x ) d x ≈ ( b − a ) f ( a + b 2 ) Generated Thu, 20 Oct 2016 13:44:57 GMT by s_ac5 (squid/3.5.20)


text:
BREAKING NEWS
Compact operator

## Summary

In functional analysis, a branch of mathematics, a compact operator is a linear operator ${\displaystyle T:X\to Y}$, where ${\displaystyle X,Y}$ are normed vector spaces, with the property that ${\displaystyle T}$ maps bounded subsets of ${\displaystyle X}$ to relatively compact subsets of ${\displaystyle Y}$ (subsets with compact closure in ${\displaystyle Y}$). Such an operator is necessarily a bounded operator, and so continuous.[1] Some authors require that ${\displaystyle X,Y}$ are Banach, but the definition can be extended to more general spaces.

Any bounded operator ${\displaystyle T}$ that has finite rank is a compact operator; indeed, the class of compact operators is a natural generalization of the class of finite-rank operators in an infinite-dimensional setting. When ${\displaystyle Y}$ is a Hilbert space, it is true that any compact operator is a limit of finite-rank operators,[1] so that the class of compact operators can be defined alternatively as the closure of the set of finite-rank operators in the norm topology. Whether this was true in general for Banach spaces (the approximation property) was an unsolved question for many years; in 1973 Per Enflo gave a counter-example, building on work by Grothendieck and Banach.[2]

The origin of the theory of compact operators is in the theory of integral equations, where integral operators supply concrete examples of such operators. A typical Fredholm integral equation gives rise to a compact operator K on function spaces; the compactness property is shown by equicontinuity. The method of approximation by finite-rank operators is basic in the numerical solution of such equations. The abstract idea of Fredholm operator is derived from this connection.

## Equivalent formulations

A linear map ${\displaystyle T:X\to Y}$  between two topological vector spaces is said to be compact if there exists a neighborhood ${\displaystyle U}$  of the origin in ${\displaystyle X}$  such that ${\displaystyle T(U)}$  is a relatively compact subset of ${\displaystyle Y}$ .[3]

Let ${\displaystyle X,Y}$  be normed spaces and ${\displaystyle T:X\to Y}$  a linear operator. Then the following statements are equivalent, and some of them are used as the principal definition by different authors[4]

• ${\displaystyle T}$  is a compact operator;
• the image of the unit ball of ${\displaystyle X}$  under ${\displaystyle T}$  is relatively compact in ${\displaystyle Y}$ ;
• the image of any bounded subset of ${\displaystyle X}$  under ${\displaystyle T}$  is relatively compact in ${\displaystyle Y}$ ;
• there exists a neighbourhood ${\displaystyle U}$  of the origin in ${\displaystyle X}$  and a compact subset ${\displaystyle V\subseteq Y}$  such that ${\displaystyle T(U)\subseteq V}$ ;
• for any bounded sequence ${\displaystyle (x_{n})_{n\in \mathbb {N} }}$  in ${\displaystyle X}$ , the sequence ${\displaystyle (Tx_{n})_{n\in \mathbb {N} }}$  contains a converging subsequence.

If in addition ${\displaystyle Y}$  is Banach, these statements are also equivalent to:

• the image of any bounded subset of ${\displaystyle X}$  under ${\displaystyle T}$  is totally bounded in ${\displaystyle Y}$ .

If a linear operator is compact, then it is continuous.

## Important properties

In the following, ${\displaystyle X,Y,Z,W}$  are Banach spaces, ${\displaystyle B(X,Y)}$  is the space of bounded operators ${\displaystyle X\to Y}$  under the operator norm, and ${\displaystyle K(X,Y)}$  denotes the space of compact operators ${\displaystyle X\to Y}$ . ${\displaystyle \operatorname {Id} _{X}}$  denotes the identity operator on ${\displaystyle X}$ , ${\displaystyle B(X)=B(X,X)}$ , and ${\displaystyle K(X)=K(X,X)}$ .

• ${\displaystyle K(X,Y)}$  is a closed subspace of ${\displaystyle B(X,Y)}$  (in the norm topology). Equivalently,[5]
• given a sequence of compact operators ${\displaystyle (T_{n})_{n\in \mathbf {N} }}$  mapping ${\displaystyle X\to Y}$  (where ${\displaystyle X,Y}$ are Banach) and given that ${\displaystyle (T_{n})_{n\in \mathbf {N} }}$  converges to ${\displaystyle T}$  with respect to the operator norm, ${\displaystyle T}$  is then compact.
• Conversely, if ${\displaystyle X,Y}$  are Hilbert spaces, then every compact operator from ${\displaystyle X\to Y}$  is the limit of finite rank operators. Notably, this "approximation property" is false for general Banach spaces X and Y.[4]
• ${\displaystyle B(Y,Z)\circ K(X,Y)\circ B(W,X)\subseteq K(W,Z).}$   In particular, ${\displaystyle K(X)}$  forms a two-sided ideal in ${\displaystyle B(X)}$ .
• Any compact operator is strictly singular, but not vice versa.[6]
• A bounded linear operator between Banach spaces is compact if and only if its adjoint is compact (Schauder's theorem).
• If ${\displaystyle T:X\to Y}$  is bounded and compact, then:
• the closure of the range of ${\displaystyle T}$  is separable.[5][7]
• if the range of ${\displaystyle T}$  is closed in Y, then the range of ${\displaystyle T}$  is finite-dimensional.[5][7]
• If ${\displaystyle X}$  is a Banach space and there exists an invertible bounded compact operator ${\displaystyle T:X\to X}$  then ${\displaystyle X}$  is necessarily finite-dimensional.[7]

Now suppose that ${\displaystyle X}$  is a Banach space and ${\displaystyle T:X\to X}$  is a compact linear operator, and ${\displaystyle T^{*}:X^{*}\to X^{*}}$  is the adjoint or transpose of T.

• For any ${\displaystyle T\in K(X)}$ , then ${\displaystyle {\operatorname {Id} _{X}}-T}$   is a Fredholm operator of index 0. In particular, ${\displaystyle \operatorname {Im} \,({\operatorname {Id} _{X}}-T)}$   is closed. This is essential in developing the spectral properties of compact operators. One can notice the similarity between this property and the fact that, if ${\displaystyle M}$  and ${\displaystyle N}$  are subspaces of ${\displaystyle X}$  where ${\displaystyle M}$  is closed and ${\displaystyle N}$  is finite-dimensional, then ${\displaystyle M+N}$  is also closed.
• If ${\displaystyle S:X\to X}$  is any bounded linear operator then both ${\displaystyle S\circ T}$  and ${\displaystyle T\circ S}$  are compact operators.[5]
• If ${\displaystyle \lambda \neq 0}$  then the range of ${\displaystyle T-\lambda \operatorname {Id} _{X}}$  is closed and the kernel of ${\displaystyle T-\lambda \operatorname {Id} _{X}}$  is finite-dimensional.[5]
• If ${\displaystyle \lambda \neq 0}$  then the following are finite and equal: ${\displaystyle \dim \ker \left(T-\lambda \operatorname {Id} _{X}\right)=\dim X/\operatorname {Im} \left(T-\lambda \operatorname {Id} _{X}\right)=\dim \ker \left(T^{*}-\lambda \operatorname {Id} _{X^{*}}\right)=\dim X^{*}/\operatorname {Im} \left(T^{*}-\lambda \operatorname {Id} _{X^{*}}\right)}$ [5]
• The spectrum ${\displaystyle \sigma (T)}$  of ${\displaystyle T}$ , is compact, countable, and has at most one limit point, which would necessarily be the origin.[5]
• If ${\displaystyle X}$  is infinite-dimensional then ${\displaystyle 0\in \sigma (T)}$ .[5]
• If ${\displaystyle \lambda \neq 0}$  and ${\displaystyle \lambda \in \sigma (T)}$  then ${\displaystyle \lambda }$  is an eigenvalue of both ${\displaystyle T}$  and ${\displaystyle T^{*}}$ .[5]
• For every ${\displaystyle r>0}$  the set ${\displaystyle E_{r}=\left\{\lambda \in \sigma (T):|\lambda |>r\right\}}$  is finite, and for every non-zero ${\displaystyle \lambda \in \sigma (T)}$  the range of ${\displaystyle T-\lambda \operatorname {Id} _{X}}$  is a proper subset of X.[5]

## Origins in integral equation theory

A crucial property of compact operators is the Fredholm alternative, which asserts that the existence of solution of linear equations of the form

${\displaystyle (\lambda K+I)u=f}$

(where K is a compact operator, f is a given function, and u is the unknown function to be solved for) behaves much like as in finite dimensions. The spectral theory of compact operators then follows, and it is due to Frigyes Riesz (1918). It shows that a compact operator K on an infinite-dimensional Banach space has spectrum that is either a finite subset of C which includes 0, or the spectrum is a countably infinite subset of C which has 0 as its only limit point. Moreover, in either case the non-zero elements of the spectrum are eigenvalues of K with finite multiplicities (so that K − λI has a finite-dimensional kernel for all complex λ ≠ 0).

An important example of a compact operator is compact embedding of Sobolev spaces, which, along with the Gårding inequality and the Lax–Milgram theorem, can be used to convert an elliptic boundary value problem into a Fredholm integral equation.[8] Existence of the solution and spectral properties then follow from the theory of compact operators; in particular, an elliptic boundary value problem on a bounded domain has infinitely many isolated eigenvalues. One consequence is that a solid body can vibrate only at isolated frequencies, given by the eigenvalues, and arbitrarily high vibration frequencies always exist.

The compact operators from a Banach space to itself form a two-sided ideal in the algebra of all bounded operators on the space. Indeed, the compact operators on an infinite-dimensional separable Hilbert space form a maximal ideal, so the quotient algebra, known as the Calkin algebra, is simple. More generally, the compact operators form an operator ideal.

## Compact operator on Hilbert spaces

For Hilbert spaces, another equivalent definition of compact operators is given as follows.

An operator ${\displaystyle T}$  on an infinite-dimensional Hilbert space ${\displaystyle {\mathcal {H}}}$

${\displaystyle T:{\mathcal {H}}\to {\mathcal {H}}}$

is said to be compact if it can be written in the form

${\displaystyle T=\sum _{n=1}^{\infty }\lambda _{n}\langle f_{n},\cdot \rangle g_{n}\,,}$

where ${\displaystyle \{f_{1},f_{2},\ldots \}}$  and ${\displaystyle \{g_{1},g_{2},\ldots \}}$  are orthonormal sets (not necessarily complete), and ${\displaystyle \lambda _{1},\lambda _{2},\ldots }$  is a sequence of positive numbers with limit zero, called the singular values of the operator. The singular values can accumulate only at zero. If the sequence becomes stationary at zero, that is ${\displaystyle \lambda _{N+k}=0}$  for some ${\displaystyle N\in \mathbb {N} ,}$  and every ${\displaystyle k=1,2,\dots }$ , then the operator has finite rank, i.e, a finite-dimensional range and can be written as

${\displaystyle T=\sum _{n=1}^{N}\lambda _{n}\langle f_{n},\cdot \rangle g_{n}\,.}$

The bracket ${\displaystyle \langle \cdot ,\cdot \rangle }$  is the scalar product on the Hilbert space; the sum on the right hand side converges in the operator norm.

An important subclass of compact operators is the trace-class or nuclear operators.

## Completely continuous operators

Let X and Y be Banach spaces. A bounded linear operator T : XY is called completely continuous if, for every weakly convergent sequence ${\displaystyle (x_{n})}$  from X, the sequence ${\displaystyle (Tx_{n})}$  is norm-convergent in Y (Conway 1985, §VI.3). Compact operators on a Banach space are always completely continuous. If X is a reflexive Banach space, then every completely continuous operator T : XY is compact.

Somewhat confusingly, compact operators are sometimes referred to as "completely continuous" in older literature, even though they are not necessarily completely continuous by the definition of that phrase in modern terminology.

## Examples

• Every finite rank operator is compact.
• For ${\displaystyle \ell ^{p}}$  and a sequence (tn) converging to zero, the multiplication operator (Tx)n = tn xn is compact.
• For some fixed g ∈ C([0, 1]; R), define the linear operator T from C([0, 1]; R) to C([0, 1]; R) by
${\displaystyle (Tf)(x)=\int _{0}^{x}f(t)g(t)\,\mathrm {d} t.}$

That the operator T is indeed compact follows from the Ascoli theorem.
• More generally, if Ω is any domain in Rn and the integral kernel k : Ω × Ω → R is a Hilbert–Schmidt kernel, then the operator T on L2(Ω; R) defined by
${\displaystyle (Tf)(x)=\int _{\Omega }k(x,y)f(y)\,\mathrm {d} y}$

is a compact operator.
• By Riesz's lemma, the identity operator is a compact operator if and only if the space is finite-dimensional.[9]

## Notes

1. ^ a b Conway 1985, Section 2.4
2. ^ Enflo 1973
3. ^ Schaefer & Wolff 1999, p. 98.
4. ^ a b Brézis, H. (2011). Functional analysis, Sobolev spaces and partial differential equations. H.. Brézis. New York: Springer. ISBN 978-0-387-70914-7. OCLC 695395895.
5. Rudin 1991, pp. 103–115.
6. ^ N.L. Carothers, A Short Course on Banach Space Theory, (2005) London Mathematical Society Student Texts 64, Cambridge University Press.
7. ^ a b c Conway 1990, pp. 173–177.
8. ^ William McLean, Strongly Elliptic Systems and Boundary Integral Equations, Cambridge University Press, 2000
9. ^ Kreyszig 1978, Theorems 2.5-3, 2.5-5.

## References

• Conway, John B. (1985). A course in functional analysis. Springer-Verlag. Section 2.4. ISBN 978-3-540-96042-3.
• Conway, John B. (1990). A Course in Functional Analysis. Graduate Texts in Mathematics. Vol. 96 (2nd ed.). New York: Springer-Verlag. ISBN 978-0-387-97245-9. OCLC 21195908.
• Enflo, P. (1973). "A counterexample to the approximation problem in Banach spaces". Acta Mathematica. 130 (1): 309–317. doi:10.1007/BF02392270. ISSN 0001-5962. MR 0402468.
• Kreyszig, Erwin (1978). Introductory functional analysis with applications. John Wiley & Sons. ISBN 978-0-471-50731-4.
• Kutateladze, S.S. (1996). Fundamentals of Functional Analysis. Texts in Mathematical Sciences. Vol. 12 (2nd ed.). New York: Springer-Verlag. p. 292. ISBN 978-0-7923-3898-7.
• Lax, Peter (2002). Functional Analysis. New York: Wiley-Interscience. ISBN 978-0-471-55604-6. OCLC 47767143.
• Narici, Lawrence; Beckenstein, Edward (2011). Topological Vector Spaces. Pure and applied mathematics (Second ed.). Boca Raton, FL: CRC Press. ISBN 978-1584888666. OCLC 144216834.
• Renardy, M.; Rogers, R. C. (2004). An introduction to partial differential equations. Texts in Applied Mathematics. Vol. 13 (2nd ed.). New York: Springer-Verlag. p. 356. ISBN 978-0-387-00444-0. (Section 7.5)
• Rudin, Walter (1991). Functional Analysis. International Series in Pure and Applied Mathematics. Vol. 8 (Second ed.). New York, NY: McGraw-Hill Science/Engineering/Math. ISBN 978-0-07-054236-5. OCLC 21163277.
• Schaefer, Helmut H.; Wolff, Manfred P. (1999). Topological Vector Spaces. GTM. Vol. 8 (Second ed.). New York, NY: Springer New York Imprint Springer. ISBN 978-1-4612-7155-0. OCLC 840278135.
• Trèves, François (2006) [1967]. Topological Vector Spaces, Distributions and Kernels. Mineola, N.Y.: Dover Publications. ISBN 978-0-486-45352-1. OCLC 853623322.


text:
# Wikipedia Edits: Burstiness Analysis¶

Christian Bouwense

## Introduction¶

The world can be thought of as a set of systems. These consist of components and interactions between them. Think of two people friending each other on Facebook, or internet routers exchanging packets of information. On the surface, these systems may seem very different, but the underlying principle of actors and actions is the same.

If we can understand the behavior of these systems - what they have in common and what they do not - we could react to our world in a more efficient way. We could have an algorithm to allocate FEMA funds more accurately based on Hurricane patterns before disasters, or know when to administer what type of treatment based on cancer metabolization patterns.

## What is Burstiness?¶

This is not a new idea. Mathematicians have tried to model systems for decades. However, classical statistics have not given very good results. The general idea is that human interaction is random, and if that is the case we should be able to model interactions with random statistical models. Unfortunately, the world is not that simple, and many different systems have very dissimilar behaviors.

Fortunately, there is a new way of modelling system behavior: burstiness. Burstiness is a measure of how regular, random, or "bursty" interactions in an system are. If system behavior is "bursty," there are long periods of inactivity, followed by short bursts of activity. On the opposite side of the spectrum, systems that are very regularly timed interactions are "anti-bursty," such as time between heartbeats at rest. The middle of the scale is completely random behavior, such as the time inbetween winning a slot machine.

## Methodology¶

We can do better than just describing burstiness in English; this paper by Barabasi introduced the idea of burstiness, and provides mathematical ways of measuring it.

For this experiment, we will study the system of Wikipedia article editing. This is a very interesting case because it involves human and non-human interaction (bots can make edits as well), over many different subjects of varying degrees of public interest. They also have a ton of data.

In order to measure the burstiness of Wikipedia editing (I'll be using "edits" and "revisions" interchangeably), we need a program to download the data, and then measure its burstiness. For this I'll be using Python, notably using the mwapi module, which lets you query Wikipedia's databases.

## The Code¶

Above every code cell, I will be putting descriptions of what the code is doing, and how the code is doing it. If you do not understand Python code, then reading these descriptions should give you a good idea of what's going on. If you are interested in the nitty-gritty of the Python, then reading the "how" should give you some insight. (I have marked the high level explanations with "Description" and nitty-gritty explanations with "Technical" to save people time!)

## Importing Modules¶

Technical: Here we just import some modules that we will need in the program. The most notable one, as I have mentioned earlier, is the inclusion of "mwapi" which is an interfact between Python and REST APIs which we can send to Wikipedia. An interesting point is that mwapi is actually a wrapper for another module called mw, where you need to actually craft the REST calls yourself.

In [1]:
"""
Author: Christian Bouwense

Program that gets the revision for a page by user for a certain time
interval and measures burstiness.
"""

import time
import random
import datetime as dt
import mwapi
import operator
import numpy as np
import dateutil.parser as dup
from matplotlib import pyplot as plt
import matplotlib.patches as mpatches

## Getting the Data¶

Description: Here I am creating a bit of code that will ask Wikipedia for the revision data of any article we want. You can specify which article you want data for, a time period, and what kind of data you want about the revisions (e.g. who made the revisions, when the revisions was made, etc.).

Technical: get_revisions() is a wrapper for the mwapi get() call. We are always going to want to query, get revisions, and accept the maximum amount of revisions. However, you can also specify things like the revision properties you want, and the date range you wish to see (and if you don't really care, they have default values). The values are returned in JSON and stored in a global dictionary called article_data. So even though we are getting data, this function has a void return type.

You may notice that there is a for loop that assigns a variable called page_id. We will need this value to traverse the JSON later when we parse its contents, and also for continuing the query. Speaking about continuing the query, any get request is only allowed 500 objects to be received per call. However, if there are more than 500 revisions, there will be a field in the JSON called 'continue.' If you put the value of 'continue' into your next get call, it will return you the next 500. So we have a while loop that checks for this continue value, and if its there just continually make get calls until its gone.

In [2]:
def get_revisions(title, rv_prop='timestamp|user', rv_start='today', rv_end='2000-01-01T00:00:00Z'):
# Information specifying article and time interval to look at
title = title

# We're always going to want these parameters to be the same
action = 'query'
prop = 'revisions'
rv_limit = 'max'

today = dt.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%dT%H:%M:%SZ')
# User can just give the string "today" instead of the timestamp
if rv_start == "today":
rv_start = today
else:
rv_start = start_date

# Temporary dictionary holding amount of revisions for each user
revisions_by_user = {}

# Connect to Wikipedia
session = mwapi.Session('https://en.wikipedia.org', user_agent='cbouwense')

# Query Wikipedia for revisions on the supplied article
# The result is stored into the dictionary "rev_dict"
rev_dict = session.get(action=action,
prop=prop,
rvprop=rv_prop,
titles=title,
rvlimit=rv_limit,
rvstart=rv_start,
rvend=rv_end)

# Find page_id for selected article
for keys in rev_dict['query']['pages'].keys():
page_id = keys

# Go through the timestamps for each revision made.
# If the timestamp is already a key in our dictionary, increment that key value by 1.
# Else, create a new key for that year in our dictionary and set it to 1
rev_timestamps = []
for props in rev_dict['query']['pages'][str(page_id)]['revisions']:
if 'user' in props:
if (props['user'] not in revisions_by_user):
revisions_by_user[props['user']] = 1
else:
revisions_by_user[props['user']] += 1

timestamp = dup.parse(props['timestamp'])
rev_timestamps.append(timestamp)

# Check if there is a section named "continue".
# If there is, that means the query did not get all the data
# because of the per-user query limits.
print ("Retrieving data on %s from Wikipedia..." % title)
while 'continue' in rev_dict:
continue_val = rev_dict['continue']['rvcontinue']
rev_dict = session.get(action=action,
prop=prop,
rvprop=rv_prop,
titles=title,
rvlimit=rv_limit,
rvstart=today,
rvend=rv_end,
rvcontinue=continue_val)
for props in rev_dict['query']['pages'][str(page_id)]['revisions']:
if 'user' in props:
if (props['user'] not in revisions_by_user):
revisions_by_user[props['user']] = 1
else:
revisions_by_user[props['user']] += 1
timestamp = dup.parse(props['timestamp'])
rev_timestamps.append(timestamp)

# List of tuples of revisions made by user for page
sorted_user_revisions = sorted(revisions_by_user.items(), key=operator.itemgetter(1))[::-1]

# Enumerate the times between events into a list
interevent_times = []
for i in range(0, len(rev_timestamps)-1):
interevent_times.append((rev_timestamps[i] - rev_timestamps[i+1]).total_seconds())

# Add data to global dictionaries
article_data[title] = {}
article_data[title]['user_revs'] = sorted_user_revisions
article_data[title]['revision_times'] = rev_timestamps
article_data[title]['interevent_times'] = interevent_times
get_B(article)
get_M(article)

print ("Data received successfully!")

## Storing Article Data¶

Description: We need a place to store all of this data that Wikipedia is giving us, so this one line of code below is the place we will keep it. When we ask Wikipedia for the revision data of an article, we will put the amount of edits per user, the times each revision was created, and how much time is inbetween revisions in article_data.

Technical: This is simply a global dictionary to store the data parsed by get_revisions(). It has a key for each article we query. Each article has a key for 'user_revs' (a list of tuples containing a username and how many edits they created), 'revision_times' (a list of timestamps for each edit), and 'interevent_times' (a list of floats indicating the amount of seconds between each edit).

In [3]:
article_data = {}

## Analyzing Burstiness: B¶

Description: Now that we have a way of getting data from Wikipedia, we need to create a way to analyze its burstiness. One of the ways of measuring burstiness is looking at the distribution of the time between events in the system (interevent times). In order to do this, we need to find their mean and standard deviation and plug them into one of the two burstiness equations.

The measure of burstiness by interevent times is defined as follows:

$$B \ \triangleq\ \frac{\sigma_{\tau}-m_{\tau}}{\sigma_{\tau}+m_{\tau}}$$

If you're not a math person, essentially we are just taking some facts about the data and plugging them into an equation. You can think of this equation as a "Burstiness-o-meter." If we take some data and put it into the "Burstiness-o-meter" it spits out a number. This output is simply a number from -1 to 1; let's call it B. The lower the number is, the less bursty it is, and the higher it is, the burstier. If it is close to 0, that means that the data is random.

Technical: We use the Numpy module's built-in functions to find the mean and standard deviation of the data. Since we already stored the interevent times in the article_data, we can just give those to the Numpy functions.

B is essentially analyzing how different the distribution of interevent times is from the Poisson Distribution. The math here is pretty simple, we're just taking the difference between the standard deviation and the mean over the sum of the standard deviation and the mean. The range of this formula is [-1, 1]. The $\lim_{\sigma\to 0} B=-1$, which makes sense: as the data deviates less and less, there are less "bursty" situations. As $B\to0$, the distribution of interevent times more closely resembles the Poisson distribution, meaning that they are random. Finally as $B\to1$, the burstier the data.

In [4]:
def get_B(title):
# Calculate interevent time mean and standard deviation
interevent_mean = (np.mean(article_data[title]['interevent_times']))
interevent_std_dev = (np.std(article_data[title]['interevent_times']))
B = ((interevent_std_dev - interevent_mean) / (interevent_std_dev + interevent_mean))
article_data[title]['B'] = B

## Analyzing Burstiness: M¶

Description: There is a different angle that we can measure burstiness with: memory. At first it may sound the same but it is actually completely independent of the "Burstiness-o-meter" we used before. Memory means that short interevent times are really likely to happen after short ones, and long ones occur after long ones.

In order to measure this, we will make a "Burstiness-o-meter 2.0". The way that this new measurement will calculate burstiness is different, but the numbers it can output will be the same. So we're still looking at a scale that goes from -1 to 1; let's call this output M.

This isn't a better measurement of the data's burstiness, just a different way of measuring it. Just to be clear, say some data has a $B=0.75$ and $M=0.10$ and some other data has $B=0.75$ and $M=0.65$: just because the second data set had both numbers higher doesn't mean it was "burstier," it just means it is bursty in both ways instead of just one.

Technical: Memory is easiest thought of in the context of Markov Chains. The state machine consist of two states: "Short Interevent Time" and "Long Interevent Time." If a system is very bursty, the chance of changing states would be very small; and vice versa for a system with very regular interactions.

We will need the mean and standard deviation of interevent times [1, n-1], and [2, n] (assuming a total of n interevent times).

The coefficient of burstiness due to memory is defined as

$$M \ \triangleq\ \frac{1}{n_{\tau} - 1}\sum_{i=1}^{n_{\tau}-1} \frac{(\tau_{i}-m_{1})(\tau_{i+1}-m_{2})}{\sigma_{1}\sigma_{2}}$$
In [5]:
def get_M(title):
# Store times in this variable with a much shorter name
times = article_data[title]['interevent_times']
mean_1 = np.mean(times[0:len(times)-1])
mean_2 = np.mean(times[1:len(times)])
std_dev_1 = np.std(times[0:len(times)-1])
std_dev_2 = np.std(times[1:len(times)])

summation = 0
for i in range(0, len(times)-1):
tau_i = times[i]
tau_i_plus_one = times[i+1]
summation_term = (((tau_i - mean_1) * (tau_i_plus_one - mean_2)) / (std_dev_1 * std_dev_2))
summation += summation_term

M = (1 / (len(times) - 1)) * summation

article_data[title]['M'] = M

## Bringing it All Together¶

Let's summarize a little bit. We now have code that gets revision data from Wikipedia, extracts some interesting facts about that data, and can analyze the burstiness of it in a couple different ways. Now that we have these tools at our disposal, let's use them on a bunch of different articles! I've Googled the top 15 most edited Wikipedia articles, so they should be a good place to start (I love the fact that "List of WWE Personnel" is the 2nd most edited Wikipedia article).

In [6]:
articles = [
'George W. Bush',
'List of WWE personnel',
'United States',
'Wikipedia',
'Michael Jackson',
'Jesus',
'Catholic Church',
'List of programs broadcast by ABS-CBN',
'Donald Trump',
'Barack Obama',
'Britney Spears',
'World War II',
'The Beatles',
'India',
'Game of Thrones'
]

In [7]:
print ("Getting data for 15 articles.")
print ("This may take a while!")
for article in articles:
get_revisions(article)

Getting data for 15 articles.
This may take a while!
Retrieving data on George W. Bush from Wikipedia...
Retrieving data on List of WWE personnel from Wikipedia...
Retrieving data on United States from Wikipedia...
Retrieving data on Wikipedia from Wikipedia...
Retrieving data on Michael Jackson from Wikipedia...
Retrieving data on Jesus from Wikipedia...
Retrieving data on Catholic Church from Wikipedia...
Retrieving data on List of programs broadcast by ABS-CBN from Wikipedia...
Retrieving data on Donald Trump from Wikipedia...
Retrieving data on Barack Obama from Wikipedia...
Retrieving data on Adolf Hitler from Wikipedia...
Retrieving data on Britney Spears from Wikipedia...
Retrieving data on World War II from Wikipedia...
Retrieving data on The Beatles from Wikipedia...
Retrieving data on India from Wikipedia...
Retrieving data on Game of Thrones from Wikipedia...

## Visualizing the Results¶

Now let's take a look at the data that we've collected! We're going to use a bar graph of the B and M values for each article we queried. Remember that B and M range from -1 to 1, and the closer to 1 they are the more they contributed to the data's burstiness.

In [8]:
ind = np.arange(len(article_data.keys()))
B_vals = []
M_vals = []
for article in article_data.keys():
B_vals.append(article_data[article]['B'])
M_vals.append(article_data[article]['M'])

width = 0.4
fig, ax = plt.subplots()
plt.title('B & M of Article Inter-Revision Times', fontsize=26)
plt.yticks(ind, article_data.keys(), rotation=0, fontsize=18)
plt.xticks(fontsize=18)
plt.xlim(-1, 1)
plt.xlabel('Burstiness', fontsize=20)

ax.barh(ind, B_vals, width, color='#FF9933', label='N')
ax.barh(ind + width, M_vals, width, color='#0099CC', label='M')
for i in range(-10, 10):
ax.axvline(i/10, linestyle='dotted', zorder=0)

orange_patch = mpatches.Patch(color='#FF9933', label='B')
blue_patch = mpatches.Patch(color='#0099CC', label='M')
plt.legend(handles=[orange_patch, blue_patch])

fig.set_size_inches(10, 10)

plt.show()

## Digging Deeper¶

The further right the bars are in the graph, the burstier the data is: as you can see, Wikipedia edits are pretty bursty! In fact, human activities generally tend to have a B coefficient of 0.5 to 0.8, and an M of 0 to 0.1, so these results make a lot of sense.

Now that we know that Wikpedia edits are bursty, let's dig a little deeper. It would be interesting to find out if we can correlate burstiness with other variables, such as number of users editing the page, or number of overall revisions. We already have this data from earlier, so let's add it to the graph.

In [37]:
ind = np.arange(len(article_data.keys()))
article_editors = []
article_edits = []

article_count = 0
for article in article_data.keys():
article_editors.append(0)
article_edits.append(0)
for tuple in article_data[article]['user_revs']:
article_editors[article_count] += 1
article_edits[article_count] += tuple[1]
article_count += 1

fig, ax = plt.subplots()
plt.title('Edit Stats for Articles', fontsize=26)
plt.yticks(ind, article_data.keys(), rotation=0, fontsize=18)
plt.xticks(fontsize=18)

ax.barh(ind, article_editors, width, color='#990033', label='Editors')
ax.barh(ind + width, article_edits, width, color='#669900', label='Edits')

#for i in range(0, max(article_edits)):
#    ax.axvline(i, linestyle='dotted', zorder=0)
#i += max(article_edits) / 10

red_patch = mpatches.Patch(color='#990033', label='Editors')
green_patch = mpatches.Patch(color='#669900', label='Edits')
plt.legend(handles=[red_patch, green_patch])

fig.set_size_inches(10, 10)

plt.show()

In [ ]:


text:
## Imagistics 3512 DEVD iSeries Printer problem CPF3397

270 pts.
Tags:
AS/400 printing
HPPJLDRV
iSeries error messages
Pitney Bowes
Printer drivers
TCP/IP
Hi I'm having trouble with a few Imagistics 3512 printers connected to a I series via IP The printers are in the US and the I series is in the UK They print correctly but are plagued with the printer ending abormaly. These then have to be restarted over and over again!! Does any body have a working DEVD that I could compare? The error message is Message ID . . . . . . : CPF3397 Checking the joblog there not much help in their 0 19/02/09 02:12:10.945944 QWPPJLDR QSYS *STMT QWPPJLDR QSYS *STMT From module . . . . . . . . : WPPJLDR From procedure . . . . . . : Socket_Recv Statement . . . . . . . . . : 26 To module . . . . . . . . . : WPPJLDR To procedure . . . . . . . : _C_pep Statement . . . . . . . . . : *N Message . . . . : The session with device xxxxxxx ended abnormally. abnormally. Recovery . . . : Check for problems in the network or at the remote device. Start the printer writer again. If the problem continues, As we have hundreds and hundreds of printers and the problem printers are the same make at different US sites I'm ruling out network problems. OS is V5R3M0 Cume TL08085 I have tried changing the devd *HPPJLDRV to *IBMSNMPDRV and a few other things but not much changed, printers still end. Looked at the time out settings on the printer and these look to be set to 0 DEVD Port number . . . . . . . . . . 9100 Online at IPL . . . . . . . . . *YES Font: Identifier . . . . . . . . . . 11 Point size . . . . . . . . . . *NONE Form feed . . . . . . . . . . . *AUTOCUT Separator drawer . . . . . . . . *FILE Separator program . . . . . . . *NONE Library . . . . . . . . . . . Printer error message . . . . . *INFO Message queue . . . . . . . . . LAXMFD04T2 Library . . . . . . . . . . . QUSRSYS Activation timer . . . . . . . . 170 Inactivity timer . . . . . . . . *SEC15 Line speed . . . . . . . . . . . 19200 Word length . . . . . . . . . . 8 Type of parity . . . . . . . . . *NONE Stop bits . . . . . . . . . . . 1 Host print transform . . . . . . *YES Manufacturer type and model . . *HP5SI Paper source 1 . . . . . . . . . *LETTER Paper source 2 . . . . . . . . . *LETTER Envelope source . . . . . . . . *NUMBER10 ASCII code page 899 support . . *NO Image configuration . . . . . . *NONE Character identifier: Graphic character set . . . . 37 Code page . . . . . . . . . . 37 Remote location: Name or address . . . . . . . 'xx.x.xx.xx' DBCS feature: Device features . . . . . . . *SAME Last code point . . . . . . . User-defined options . . . . . . *SAME + for more values User-defined object: Object . . . . . . . . . . . . *NONE Library . . . . . . . . . . Object type . . . . . . . . . Data transform program . . . . . *NONE Library . . . . . . . . . . . System driver program . . . . . *HPPJLDRV Secure connection . . . . . . . *SAME Validation list . . . . . . . . *SAME Library . . . . . . . . . . . Publishing information: Support duplex . . . . . . . . *UNKNOWN Support color . . . . . . . . *UNKNOWN Pages per minute black . . . . *UNKNOWN Pages per minute color . . . . *UNKNOWN Location . . . . . . . . . . . *BLANK Data streams supported . . . . *UNKNOWN + for more values Text 'description' . . . . . . . 'Imagistics help please

Thanks. We'll let you know when a new response is added.

Hi,

Maybe it’s worth changing the inactivity timer from *SEC15 to *NOMAX

Have you checked WRKPRB to see if you have a problem that you can analyse for one of these printers?

Regards,

Martin Gilbert.

## Discuss This Question: 7 Replies

Thanks. We'll let you know when a new response is added.
• Thanks Martin Nothing in the Work problem for these errors. I have changed the *SEC15 to *NOMAX in the DEVD, no harm in trying this. Will check the overnight logs to see whats occured. Fingers crossed
report
• Hi, Are you by any chance the same mellorman from the Bladerunner newsgroup? Regards, Martin Gilbert.
report
• Hi there no not the same person, I've just updated profile. Checked the printers joblog and getting CPD337C error, although the printer has not ended overnight which is an improvment. Waiting for the view of the users