text:
# IISER Aptitude Test Sample Paper 2 Solution

his page contains solutions to the IISER Aptitude test Sample 2. Currently the solutions are only for Maths and Physics sections. Other sections will be uploaded soon.

• MATH
• PHYSICS
• BIOLOGY
• CHEMISTRY

### MATH

1) The equations of two lines are x+2y=1 and 2x-y=3. what is the nature between two lines ?

Solution:

2) Suppose the matrix $\begin{bmatrix} 2 &a \\ 3&b \end{bmatrix}$ with a and b integers has determinant 1. A possible value for b is ?

Solution:

3) There are 5 students. Arul and Neeraj are Mathematics students. Sunny likes Biology. Mathematics students dislike Chemistry. Students who like Biology cannot dislike Chemistry. Students who want to take Physics must like all other subjects. Swati and Manas want to take Physics. The number of students who dislike Chemisty is?

Solution:

4) Let $a_1,a_2,.....,a_10$ be 10 observations with median 3. Then

Solution:

5) The value of the $\int^1_-1 (x^2 + \frac{x^{2013}}{x^2+2|x|+1})\,dx$ is ?

Solution:

6) The sum of the infinite series $\frac{9}{10} + \frac{9}{100} + \frac{9}{1000} +.....$ is

Solution:

7) The angle between the tangents to the circles $x^2 +y^2 =1$  and  $x^2 + {(y-1)}^2=2$ at the point (1,0) is ?

Solution:

8) The length of the shortest path in space between the z-axis and the line given by the equations z=0 and y=1 is ?

Solution:

9) Consider the inequalities x+y<3 , x-y<5, 5x-3y<15 and 2x+y>2. The region in the plae that consists of the points satisfying these inequalities is ?

Solution:

10) The number of the solutions of $\tan{x} = x - x^2$ with $-1 \leq x \leq 1$ is ?

Solution:

11)


text:
# blueollie

## Unrequited Love

Over the past year, I’ve had an energetic back-and-forth with someone who I’ve grown fond of. A year ago, I didn’t even know what she looked like, though we were FB friends for a couple of years (I wasn’t even sure if “she” were even a “she”…that is, was this an “alternate account”?). So our FB relationship has grown and evolved; right now I play the part of a clueless, infatuated, socially awkward male who constantly gets rebuffed…but still doesn’t learn. This has generated a series of memes, and here is one of the latest ones:

I admit that I like this one as I am a fan of “over the years” photos; I’ll post another one as a “PS” to this post.

But behind all of the joking is the idea of “unrequited love”, which the Main Ingredient sang about so well:

And this has been a big part of my life, albeit NOT in terms of human relationships. Oh sure, many (most?) of those I had a crush on did NOT have crush on me. But hey, that is life for most of us. I am thinking more along the lines of my life and professional aspirations.

Yes, for most of my young life, I really, really, really wanted to be a professional athlete. And I did all of the “right” things: I ran wind sprints, lifted weights, practiced my football drills. And it paid off: I stared two years of JV an one year of varsity football in high school.

But, well, college competition was a different story, and, in all honesty, I didn’t have even enough ability to play Division III ball. There just isn’t a market for those who take 5.8-5.9 to run a 40 yard dash (to put this into perspective, linemen usually run 4.8-5.0, backs 4.3 to 4.5).

So now, yes, I do hear from professional sports teams….when they have ticket specials. 🙂

But this has a happy ending. You know all of that running and weight lifting I did? Well, I am still doing it, albeit at a more age appropriate level. I grew to love working out, and I still do.

So, sometimes unrequited love really does have a happy ending. In my case: no broken body (though I have a few aches and pains…that is normal for someone in their late 50’s), no concussions. No athletic performance either, but I can still run a 5K at 8:30-8:40 mpm (yeah, that used to be 6:20…but never mind) and I can still do sets of 10-15 pull ups.

February 18, 2017

## Bucky: Rest in Peace

You will be sorely missed.

## First Class Eve

Ok, time to get to bed as classes start tomorrow.

I’ve had some interesting political discussion today and…ok, watched a lot of short videos about some of the “100 greatest NFL players” and focused on the linemen, especially the offensive linemen.

Workout notes: 5.1 mile Corntalk course; jogged to the start of the dogpark hill, and then ran the uphills hard; walked, then jogged to the next uphill. I did that workout on December 31’st. Felt good.

Time to get it..lots of admin stuff to do.

So for a bit of “mathematical physics” humor:

1.5 hour department meeting, plus an extra 20 minutes for us older folks…

Workout notes: run on the treadmill (to break in new shoes): 5 minute segments for the first 50 minutes (0.5 incline)
5.2-5.3-5.4-7.0-5.3-7.0-5.3-7.0-5.3-7.00, then walk jog for 4 minutes, 6.7 for 3, 6.8 for 2, 6.9, 7.0 for 1 minute each; 6 miles in 1:00:04
3 mile walk (I think) and it felt good…until I tried to get up after sitting down. It WAS work but work that left me feeling refreshed.

Time: about 52 minutes (by the time of day), or 15:0x ish minutes per mile, which felt like the pace I was walking.

August 23, 2016

## Olympics and useful BS (nonsense)…

Yes, I’ve watched some Olympic action (in particular, boxing, swimming, gymnastics, court volleyball). I remember watching these when I was a teenager…and watching NFL games and thinking: “wow, with some work, that COULD BE ME.” I still remember using my Exergym rope exerciser while watching NFL games on the black and white television in my bedroom.

This was on the weekend; I used my high school universal gym during the week, as well as running the steps, running the track, doing agility drills on my own, etc.

I remember when I was on the JV: our games were on Wednesday night. On Sunday evening, after the NFL game, I’d go to the track and do 2 miles, reasonably hard (13:30-14:00 was my time, as a 220 lb. offensive tackle).

No one was going to outwork me! My motto was “you can do anything if you want it badly enough and are willing to work hard enough.”

That, of course, is complete and total bullshit.

The reality is: “if you see someone on TV because they are good enough to warrant TV coverage, that will NEVER be you…unless you are one of those “1 in 1000” outliers.

I eventually found what I was best at (mathematics) and even that, I was nowhere good enough to be, say, a MIT professor. Getting the Ph. D. and getting a few new results published was about my talent level; it is a bit like the 2:25 (male) marathon runner who dreams of sneaking into the Olympic Trials, though he knows that he has essential zero chance of making the team, or the baseball player who peaks out at playing, say, A or AA ball. It is still damned good, but not “TV good”.

So, would I have been happier (and better off) had I known that early in life? It is hard to say.

On one hand, I would have been more relaxed. On the other hand:

1. I grew to love lifting weights and running because I did these things to get ready for football. I enjoy these activities to this day; my first weight room workout was in 1972!
2. I can sympathize with the student who, say, is enrolled in engineering but doesn’t have the talent for it. I can explain that there are other rewarding paths to a college degree and that humans tend to have different talents.

And yes, I am getting ready to go lift, work on my math paper, watch some more Olympics, and see yet another class A baseball game this weekend.

August 12, 2016

## Rant: recognizing the limits of what one knows

I’ll admit that I am an expert in a very narrow slice of mathematics. But I am at least an AU from being an international or even a national caliber expert in that narrow field of mathematics.
And yes, I often read about topics that are not in my area; I enjoy popular books and articles on topics from the various branches of science, economics and the like.

Nevertheless, I also realize that when I read such a book or article, or when I attend a public lecture, I am getting a watered down, simplified treatment of the subject. I lack the context and the prerequisite knowledge to appreciate a presentation aimed at the experts.

And there lies one of my biggest frustrations when it comes to talking to people, either on the internet or in person. There are so many who really can’t detect the difference between expert knowledge and what they read (and perhaps half-digested …if that much) from a popular book. It is THAT level of “lack of humility” that makes some unpleasant conversation companions; I am ok with ignorance. After all, I am ignorant of the vast majority of human knowledge. I think that all of us are.

And, sadly, I see this lack of intellectual humility in political or social issues discussion, especially from the “losing side”. It appears to me that being on the losing side of an election (and I’ve been there, many, many times) brings out the worst in people in several ways.

Example: I had someone try to tell me that Hillary Clinton’s popular vote is “within the margin of error”, when one factors in the caucus states.

Of course, that is a dumb statement for a number of reasons.

1. There is a difference between a vote count and a poll count, even though both have a margin of error (remember Florida in the 2000 general election). The margin of errors in vote count is much smaller than it is for a poll.

2. The margin of error for a poll is $1.96 * \frac{.5}{\sqrt{n}}$ (assuming a 95 percent confidence interval and a relatively close election; this comes from the normal approximation to the proportion distribution. So as $n$ increases, the confidence interval, and therefore the margin of error, decreases. Note: for more on polls, read this wonderful little article written by a physics professor.

3. Hillary Clinton leads by about 3 million votes, even when one counts the caucus votes. The latter doesn’t add much as there are fewer caucus states, and these tend to be smaller states. Anyhow, she leads about 57-43.

4. The person making the claim appeared to not understand that winning a small state by a very large percentage didn’t make up for winning a bigger state by a smaller margin.

Yes, by knowing that Sanders won a lot of caucus states and that there IS such a thing as margin of error puts this individual into the “above average” category. But this person was clearly ignorant of their own ignorance.

There is another factor in play: I really think that desperation makes one dumber. When one really likes a candidate or a person, or even a sports team, it is tough to accept an unpleasant reality. I’ve become acquainted with the latter as an Illinois football fan (“yeah, we have a shot at being Wisconsin!” Sure.)

Desperation can lead to an abandonment of one’s values. Check out the Republican Chairman’s take on Donald Trump

Oh sure, few would be surprised at Donald Trump’s behavior, and I doubt that a certain type of Republican really cares that much (“hey, what do you expect with Trump anyway?”)

May 16, 2016

## My attempt at “touchy-feely” memes..

I’ve seen so many “please understand me because I have condition X” memes on the social media. I’ve seen only a few that exhort the reader to treat others better. here is one:

Am I there? Uh…no; I have a ways to go. But it is a worthy goal.

Here are a couple of my attempts; they need work.

## Not the smartest thing I’ve done…

TMI Post
Two weekends ago, it took me 3:01:30. Today, the same course took me 3:04:25 (12:05 pace, not a misprint). I was 1:32 at 7.6 miles. 3:00:21 at 14.95 miles. The return was slightly faster and when I finished, I had a deep cough and drainage all over the place. It was disgusting.

What was fun is that I saw some other runners along the way and passed a couple of pretty bespandexed women on the way up from Affina to the Tower section, and then I ran into T and her crew at the tower. Sadly, T had the “dreaded coat around the waist”…that made me sad.

And when I got home…it wasn’t quiet like it was in recent weekends but instead there was the drone of Barbara babbling on the phone and waiting for kids/grandkids, etc.

March 5, 2016 Posted by | Personal Issues, running | | 1 Comment

## Online IRS scam

Just beware: I got a mail notice claiming to be from the IRS saying someone had tried to set up an online account.

But when I called the listed number: they first wanted stuff on the letter…then wanted my full SSN at which point I hung up.

I went online to see the official IRS numbers; this wasn’t one of them.

March 1, 2016

## wind out of my sails…

Oh, I got some official good news today, and I still have a lot to do. Nevertheless….no more home basketball or other things for a while…

Perhaps I can do a medium long run this weekend. Still have a very sporadic, light cough.

Well, the spring races aren’t that far away, and neither is Chiefs baseball. And I’ve got stuff to work on.

March 1, 2016

format: plain


text:
New Titles  |  FAQ  |  Keep Informed  |  Review Cart  |  Contact Us Quick Search (Advanced Search ) Browse by Subject General Interest Logic & Foundations Number Theory Algebra & Algebraic Geometry Discrete Math & Combinatorics Analysis Differential Equations Geometry & Topology Probability & Statistics Applications Mathematical Physics Math Education

Hyperbolic Equations and Frequency Interactions
Edited by: Luis Caffarelli and Weinan E, New York University-Courant Institute of Mathematical Sciences, NY
A co-publication of the AMS and IAS/Park City Mathematics Institute.
 SEARCH THIS BOOK:
IAS/Park City Mathematics Series
1999; 466 pp; hardcover
Volume: 5
ISBN-10: 0-8218-0592-4
ISBN-13: 978-0-8218-0592-3
List Price: US$84 Member Price: US$67.20
Order Code: PCMS/5

The research topic for this IAS/PCMI Summer Session was nonlinear wave phenomena. Mathematicians from the more theoretical areas of PDEs were brought together with those involved in applications. The goal was to share ideas, knowledge, and perspectives.

How waves, or "frequencies", interact in nonlinear phenomena has been a central issue in many of the recent developments in pure and applied analysis. It is believed that wavelet theory--with its simultaneous localization in both physical and frequency space and its lacunarity--is and will be a fundamental new tool in the treatment of the phenomena.

Included in this volume are write-ups of the "general methods and tools" courses held by Jeff Rauch and Ingrid Daubechies. Rauch's article discusses geometric optics as an asymptotic limit of high-frequency phenomena. He shows how nonlinear effects are reflected in the asymptotic theory. In the article "Harmonic Analysis, Wavelets and Applications" by Daubechies and Gilbert the main structure of the wavelet theory is presented.

Also included are articles on the more "specialized" courses that were presented, such as "Nonlinear Schrödinger Equations" by Jean Bourgain and "Waves and Transport" by George Papanicolaou and Leonid Ryzhik. Susan Friedlander provides a written version of her lecture series "Stability and Instability of an Ideal Fluid", given at the Mentoring Program for Women in Mathematics, a preliminary program to the Summer Session.

This Summer Session brought together students, fellows, and established mathematicians from all over the globe to share ideas in a vibrant and exciting atmosphere. This book presents the compelling results.

Titles in this series are co-published with the Institute for Advanced Study/Park City Mathematics Institute. Members of the Mathematical Association of America (MAA) and the National Council of Teachers of Mathematics (NCTM) receive a 20% discount from list price.

Graduate students and research mathematicians working in partial differential equations.

Nonlinear Schrödinger equations
• J. Bourgain -- Introduction
• J. Bourgain -- Generalities and initial value problems
• J. Bourgain -- The initial value problem (continued)
• J. Bourgain -- A digressioin: The initial value problem for the KdV equation
• J. Bourgain -- 1D invariant Gibbs measures
• J. Bourgain -- Invariant measures (2D)
• J. Bourgain -- Quasi-periodic solutions of Hamiltonian PDE
• J. Bourgain -- Time periodic solutions
• J. Bourgain -- Time quasi-periodic solutions
• J. Bourgain -- Normal forms
• J. Bourgain -- Applications of symplectic capacities to Hamiltonian PDE
• J. Bourgain -- Remarks on longtime behaviour of the flow of Hamiltonian PDE
Harmonic analysis, wavelets and applications
• I. C. Daubechies and A. C. Gilbert -- Introduction
• I. C. Daubechies and A. C. Gilbert -- Constructing orthonormal wavelet bases: Multiresolution analysis
• I. C. Daubechies and A. C. Gilbert -- Wavelet bases: Construction and algorithms
• I. C. Daubechies and A. C. Gilbert -- More wavelet bases
• I. C. Daubechies and A. C. Gilbert -- Wavelets in other functional spaces
• I. C. Daubechies and A. C. Gilbert -- Pointwise convergence for wavelet expansions
• I. C. Daubechies and A. C. Gilbert -- Two-dimensional wavelets and operators
• I. C. Daubechies and A. C. Gilbert -- Wavelets and differential equations
• I. C. Daubechies and A. C. Gilbert -- References
Lectures on stability and instability of an ideal fluid
• S. Friedlander -- Introduction
• S. Friedlander -- Equations of motion
• S. Friedlander -- Initial-boundary value problem
• S. Friedlander -- The type of the Euler equations
• S. Friedlander -- Vorticity
• S. Friedlander -- Steady flows
• S. Friedlander -- Stability/instability of an equilibrium state
• S. Friedlander -- Two-dimensional spectral problem
• S. Friedlander -- "Arnold" criterion for nonlinear stability
• S. Friedlander -- Plane parallel shear flow
• S. Friedlander -- Instability in a vorticity norm
• S. Friedlander -- Sufficient condition for instability
• S. Friedlander -- Exponential stretching
• S. Friedlander -- Integrable flows
• S. Friedlander -- Baroclinic instability
• S. Friedlander -- Nonlinear instability
• S. Friedlander -- References
Waves and transport
• G. Papanicolaou and L. Ryzhik -- Introduction
• G. Papanicolaou and L. Ryzhik -- The Schrödinger equation
• G. Papanicolaou and L. Ryzhik -- Symmetric hyperbolic systems
• G. Papanicolaou and L. Ryzhik -- Waves in random media
• G. Papanicolaou and L. Ryzhik -- The diffusion approximation
• G. Papanicolaou and L. Ryzhik -- The geophysical applications
• G. Papanicolaou and L. Ryzhik -- References
Lectures on geometric optics
• J. Rauch and M. Keel -- Introduction
• J. Rauch and M. Keel -- Basic linear existence theorems
• J. Rauch and M. Keel -- Examples of propagation of singularities and of energy
• J. Rauch and M. Keel -- Elliptic geometric optics
• J. Rauch and M. Keel -- Linear hyperbolic geometric optics
• J. Rauch and M. Keel -- Basic nonlinear existence theorems
• J. Rauch and M. Keel -- One phase nonlinear geometric optics
• J. Rauch and M. Keel -- Justification of one phase nonlinear geometric optics
• J. Rauch and M. Keel -- References
 AMS Home | Comments: webmaster@ams.org © Copyright 2014, American Mathematical Society Privacy Statement


text: For example “How old are you?” A question is a statistical question if the answer is a percent, range, or an average. However, there are other types that also deal with many aspects of data including data collection, prediction, and planning. As such, it is a valuable aid to scientific management. This type of statistics draws in all of the data from a certain population (a population is a whole group, it is every member of this group) or a sample of it. Statistical tests are used in hypothesis testing. Note that the decision tree analysis is a statistical concept which offers a powerful way of determining, finding out and analyzing uncertainty. January 28, 2020 If not, then the sample sizes in the statistical analysis may be incorrect. It describes the basic features of information and shows or summarizes data in a rational way. Before we venture on the difference between different tests, we need to formulate a clear understanding of what a null hypothesis is. She has a strong passion for writing about emerging software and technologies such as big data, AI (Artificial Intelligence), IoT (Internet of Things), process automation, etc. Introduction. the number of trees in a forest). Different test statistics are used in different statistical tests. Decision rules in problems of statistical decision theory can be deterministic or randomized. Definition and explanation. It is a serious limitation. (adsbygoogle = window.adsbygoogle || []).push({}); Why? This type of analysis answer the question “Why?”. Download the following infographic in PDF: 7 Key Types of Statistical Analysis: Silvia Valcheva is a digital marketer with over a decade of experience creating content for the tech industry. In general, such consequences are not known with certainty but are expressed as a set of probabilistic outcomes. Significance is usually denoted by a p-value, or probability value. Imagine, this company has 10 000 … Commonly, it is the first step in data analysis, performed before other formal statistical techniques. Prescriptive analytics aims to find the optimal recommendations for a decision making process. They are: 1. One way to start is by seeing how other business owners implemented statistics in their … SPSS, (Statistical Package for the Social Sciences) is perhaps the most widely used statistics software package within human behavior research. They can be used to test the effect of a categorical variable on the mean value of some other characteristic. To sums up the above two main types of statistical analysis, we can say that descriptive statistics are used to describe data. When the p-value falls below the chosen alpha value, then we say the result of the test is statistically significant. The word effect can refer to different things in different circumstances. Paired: This refers to cases when each data point (e.g. Non-parametric tests don’t make as many assumptions about the data, and are useful when one or more of the common statistical assumptions are violated. If the value of the test statistic is less extreme than the one calculated from the null hypothesis, then you can infer no statistically significant relationship between the predictor and outcome variables. Here are ten statistical formulas you’ll use frequently and the steps for calculating them. Currently you have JavaScript disabled. Modeling decisions using logic or patterns to improve decision making. Chi-square statistics and contingency table 7. As you see above, the main limitation of the descriptive statistics is that it only allows you to make summations about the objects or people that you have measured. This flowchart helps you choose among parametric tests. For example, if a researcher states that x causes y, a regression would calculate whether x always led to y in different scenarios. A test statistic is a number calculated by a statistical test. However it worth mentioning here because, in some industries such as big data analysis, it has an important role. It is better to find causes and to treat them instead of treating symptoms. Rebecca Bevans. Then they determine whether the observed data fall outside of the range of values predicted by the null hypothesis. the average heights of children, teenagers, and adults). Examples of this are when conducting a before and after analysis (pre-test/post-test) or the samples are matched pairs of similar units. Descriptive statistics is a study of quantitatively describing. Decision tree uses the tree representation to solve the problem in which each leaf node corresponds to a class label and attributes are represented on the internal node of the tree. Bi-variate regression 5. Intellspot.com is one hub for everyone involved in the data space – from data scientists to marketers and business managers. Consult the tables below to see which test best matches your variables. estimate the difference between two or more groups. However, mechanistic does not consider external influences. Let’s first clarify the main purpose of descriptive data analysis. The most common types of parametric test include regression tests, comparison tests, and correlation tests. It is an efficient tool that helps you to select the most suitable action between several alternatives. For ease of understanding, I’ll provide two examples of each bias type: an everyday one and one related to data analytics! These can be used to test whether two variables you want to use in (for example) a multiple regression test are autocorrelated. If your data do not meet the assumption of independence of observations, you may be able to use a test that accounts for structure in your data (repeated-measures tests or tests that include blocking variables). Statistical significance is arbitrary – it depends on the threshold, or alpha value, chosen by the researcher. The two variables are said to be correlated; however, they may or may not be the cause of one … However, you can’t discover what the eventual average is for all the workers in the whole company using just that data. brands of cereal), and binary outcomes (e.g. Formulas — you just can’t get away from them when you’re studying statistics. Examples of effects include the following: The average value of something may be … What is the difference between them? Imagine, this company has 10 000 workers. The purpose of exploratory data analysis is: EDA alone should not be used for generalizing or predicting. Here you will find in-depth articles, real-world examples, and top software tools to help you use data potential. However, descriptive statistics do not allow making conclusions. and statistics to business problems of decision under conditions of uncertainty. Elaborate example of inverse probability Uniform prior distributions Methods for choosing estimators that minimize posterior loss 1763 1774 1922 1931 1934 1949 1954 1961 Perry Williams Statistical Decision Theory 4 / 50. Inferential statistics is a result of more complicated mathematical estimations, and allow us to infer trends about a larger population based on samples of “subjects” taken from it. determine whether a predictor variable has a statistically significant relationship with an outcome variable. First, let’s clarify that “statistical analysis” is just the second way of saying “statistics.” Now, the official definition: Statistical analysis is a study, a science of collecting, organizing, exploring, interpreting, and presenting data and uncovering patterns and trends. Published on You can not get conclusions and make generalizations that extend beyond the data at hand. The form collects name and email so that we can add you to our newsletter list for project updates. Get perfect solution for HI6007: Statistics and Research Methods for Business Decision Making assignment and understand the complexities related to statistics for business decisions. Examples of decision problems I Decide whether or not the hypothesis of no racial discrimination in job interviews is true I Provide a forecast of the unemployment rate next month I Provide an estimate of the returns to schooling I Pick a portfolio of assets to invest in I Decide whether to reduce class sizes for poor students I Recommend a level for the top income tax rate 2/35. In addition, it helps us to simplify large amounts of data in a reasonable way. More and more businesses are starting to implement predictive analytics to increase competitive advantage and to minimize the risk associated with an unpredictable future. Decision tree algorithm falls under the category of supervised learning. For the purpose of these tests in generalNull: Given two sample means are equalAlternate: Given two sample means are not equalFor rejecting a null hypothesis, a test statistic is calculated. Multi-variate regression 6. The Two Main Types of Statistical Analysis, Download the following infographic in PDF. What is the difference between discrete and continuous variables? the different tree species in a forest). The general nature of this approach is set forth in Professor Schlaifer’s Probability and Statistics for Business Decisions published by the McGraw-Hill Book Company in 1959, and it is expected that work in such problems will be a continuing part of the research effort of the School. The two main types of statistical analysis and methodologies are descriptive and inferential. finishing places in a race), classifications (e.g. When you would like to understand and identify the reasons why things are as they are, causal analysis comes to help. Wonderful read. Example: A common example are models that seek to trade stocks or other financial instruments for profit. The business world is full of events that lead to failure. I decided to buy a vehicle to meet a personal and professional need. When useful in establishing the There are different types of statistical inferences that are extensively used for making conclusions. SPSS offers the ability to easily compile descriptive statistics, parametric and non-parametric analyses, as well as graphical depictions of results through the graphical user interface (GUI). This site uses Akismet to reduce spam. EDA is used for taking a bird’s eye view of the data and trying to make some feeling or sense of it. Springer Ver-lag, chapter 2. This page shows how to perform a number of statistical tests using SPSS. A regression is a general statistical tool that sees how variables are connected. Learn More: Statistical Analysis help | Data Analysis Services | Statistical Research Services Visit Us: http://www.statswork.com, Each of the concepts is organized in a very clean and crisp way of understanding what is what. to make important predictions about the future. One of the key reasons for the existing of inferential statistics is because it is usually too costly to study an entire population of people or objects. This is a data blog, so in this article I’ll focus only on the most important statistical bias types – but I promise that even if you are not an aspiring data professional (yet), you will profit a lot from this write-up. Click here for instructions on how to enable JavaScript in your browser. It then calculates a p-value (probability value). ANOVA or T-test This is where inferential statistics come. As the name suggests, the descriptive statistic is used to describe! Biological science, for example, can make use of. CHAPTER 3 Basic Concept of Statistical Decision Theory 3.1 Introductory Remarks Most of the classical theory of communications and control engineering is based on the evaluation of spectral densities, correlation functions, and signal-to-noise ratios associated with system dynamics. Deterministic rules are defined by functions, for example by a measurable mapping of the space $\Omega ^ {n}$ of all samples $( \omega ^ {(} 1) \dots \omega ^ {(} n) )$ of size $n$ onto a measurable space $( \Delta , {\mathcal B})$ of decisions $\delta$. Statistical tests: which one should you use? Simply because statistics is a core basis for millions of business decisions made every day. The causal seeks to identify the reasons why? What are the different types of statistics? If you want to make predictions about future events, predictive analysis is what you need. While descriptive analytics describe what has happened and predictive analytics helps to predict what might happen, prescriptive statistics aims to find the best options among available choices. Statistical assumptions. Decision theory is generally taught in one of two very different ways. The Bayesian choice: from decision-theoretic foundations to computational implementation. The assumption is that a given system is affected by the interaction of its own components. Statistical decision theory is merely a description - written in mathematical terms -of this aspect of the management process. For example, the causal analysis is a common practice in quality assurance in the software industry. The book is self-contained as it provides full proofs, worked-out examples, and problems. Causal analysis is a common practice in industries that address major disasters. Comparison tests look for differences among group means. Commonly, in many research run on groups of people (such as marketing research for defining market segments), are used both descriptive and inferential statistics to analyze results and come up with conclusions. Many statistical tests assume that data is normally distributed. Choosing a parametric test: regression, comparison, or correlation, Frequently asked questions about statistical tests. For example, if you have a data population that includes 30 workers in a business department, you can find the average of that data set for those 30 workers. One of the main reasons is that statistical data is used to predict future trends and to minimize risks. The p-value estimates how likely it is that you would see the difference described by the test statistic if the null hypothesis of no relationship were true. In the real world of analysis, when analyzing information, it is normal to use both descriptive and inferential types of statistics. Proportion Some variables are categorical and identify which category or group an individual belongs to. If anything is still unclear, or if you didn’t find what you were looking for here, leave a comment and we’ll see if we can help. This test-statistic i… Each section gives a brief description of the aim of the statistical test, when it is used, an example showing the SPSS commands and SPSS (often abbreviated) output with a brief interpretation of the output. Pearson Correlation 4. You need to know what type of variables you are working with to choose the right statistical test for your data and interpret your results. Despite that, this type of statistics is very important because it allows us to show data in a meaningful way. the average heights of men and women). ANOVA and MANOVA tests are used when comparing the means of more than two groups (e.g. So, let’s sum the goals of casual analysis: Exploratory data analysis (EDA) is a complement to inferential statistics. You can perform statistical tests on data that have been collected in a statistically valid manner – either through an experiment, or through observations made using probability sampling methods. Data-driven marketing, financial services, online services providers, and insurance companies are among the main users of predictive analytics. EDA is an analysis approach that focuses on identifying general patterns in the data and to find previously unknown relationships. Descriptive statistics can include numbers, charts, tables, graphs, or other data visualization types to present raw data. If your data does not meet these assumptions you might still be able to use a nonparametric statistical test, which have fewer requirements but also make weaker inferences. Furthermore, if you look around you, you will see a huge number of products (your mobile phone for example) that have been improved thanks to the results of the statistical research and analysis. ; Lets say I am trying to choose between two different brands of breakfast cereal. Such models might work very well if only one company deployed them, however in reality a large number of companies deploy similar models that tend to change the dynamics of trading in a particular market. When it comes to descriptive statistics examples, problems and solutions, we can give numerous of them to explain and support the general definition and types. Remember the basis of predictive analytics is based on probabilities. This monograph is written for advanced graduate students, Ph.D. students, and researchers in mathematical statistics and decision theory. This analysis is based on current and historical facts. They can be used to: Statistical tests assume a null hypothesis of no relationship or no difference between groups. Revised on coin flips). Examples: Part 1. whether your data meets certain assumptions. Quantitative variables are any variables where the data represent amounts (e.g. It also includes the option to create scripts to automate analysis, or to carry out more advanced statistical processing. For example “How old are the students in this room” There are two key types of statistical analysis: descriptive and inference. Learn how your comment data is processed. It is useful on those systems for which there are very clear definitions. All major topics are introduced on a fairly elementary level and then developed gradually to higher levels. It describes how far your observed data is from the null hypothesis of no relationship between variables or no difference among sample groups. Causal analysis searches for the root cause – the basic reason why something happens. Categorical variables are any variables where the data represent groups. In this case I may denote my decision space as the entire positive real line such that $$a \in [0, +\infty)$$. Statistical decision theory is concerned with the making of decisions when in the presence of statistical knowledge (data) which sheds light on some of the uncertainties involved in the decision problem. Please click the checkbox on the left to verify that you are a not a bot. What is the difference between quantitative and categorical variables? Confidence Interval 3. I really loved this write up, You Nailed It. Viele übersetzte Beispielsätze mit "statistical Decision" – Deutsch-Englisch Wörterbuch und Suchmaschine für Millionen von Deutsch-Übersetzungen. For instance, in stochastic optimization \theta\in\Theta may parameterize a class of convex Lipschitz functions f_\theta: [-1,1]^d\rightarrow {\mathbb R} , and X denotes the noisy observations of the gradients at the queried points. Collect maximum insight into the data set. 6. Parametric tests usually have stricter requirements than nonparametric tests, and are able to make stronger inferences from the data. Lecture notes on statistical decision theory Econ 2110, fall 2013 Maximilian Kasy March 10, 2014 These lecture notes are roughly based on Robert, C. (2007). This type of statistical analysis is used to study the relationships between variables within a sample, and you can make conclusions, generalizations or predictions about a bigger population. A question is not a statistical question if it has an exact answer. Statistics can also verify whether the decision made was, after all, a good one. This includes rankings (e.g. Statistics science is used widely in so many areas such as market research, business intelligence, financial and data analysis and many other areas. Prescriptive analytics is related to descriptive and predictive analytics. What is statistical analysis? In order to post comments, please make sure JavaScript and Cookies are enabled, and reload the page. Discrete and continuous variables are two types of quantitative variables: Thanks for reading! But if you aren't especially data savvy, you're probably wondering, How can I start using statistics to measure effectiveness, performance and customer satisfaction? For example, a study of annual income that also looks at age of death might find that poor people tend to have shorter lives than affluent people. Correlation tests check whether two variables are related without assuming cause-and-effect relationships. I have read a few articles, you are one of the besties of authors. For a statistical test to be valid, your sample size needs to be large enough to approximate the true distribution of the population being studied. Owners who want to drive innovation and grow strategically shouldn't underestimate the role of statistics in business decision making. Classify a recorded phoneme based on a log-periodogram. (adsbygoogle = window.adsbygoogle || []).push({}); The mechanistic analysis is about understanding the exact changes in given variables that lead to changes in other variables. If you already know what types of variables you’re dealing with, you can use the flowchart to choose the right statistical test for your data. Businesses use these statistics to answer the question “What might happen?“. Statistical process control is a way to apply statistics to identify and fix problems in quality control, like Mario's bad shoes. It’s to help you get a feel for the data, to tell us what happened in the past and to highlight potential relationships between variables. Quantitative variables represent amounts of things (e.g. The test statistic tells you how different two or more groups are from the overall population mean, or how different a linear slope is from the slope predicted by a null hypothesis. by Predictive analytics can use a variety of techniques such as data mining, modeling, artificial intelligence, machine learning and etc. the types of variables that you’re dealing with. Randomized rules are defined by Markov … Prescriptive analytics is a study that examines data to answer the question “What should be done?” It is a common area of business analysis dedicated to identifying the best movie or action for a specific situation. Regression tests are used to test cause-and-effect relationships. The types of variables you have usually determine what type of statistical test you can use. It also can give us the ability to make a simple interpretation of the data. Decision theory, in statistics, a set of quantitative methods for reaching optimal decisions.A solvable decision problem must be capable of being tightly formulated in terms of initial conditions and choices or courses of action, with their consequences. In general, such consequences are not known with certainty but are expressed as set. Is normally distributed the above two main types of parametric test: regression, comparison or. Far your observed data is normally distributed here are very clear definitions the made! This are when conducting a before and after analysis ( EDA ) is the! Trends and to treat them instead of treating symptoms – from data scientists to marketers and business.!, let ’ s first clarify the main users of predictive analytics can use a variety of techniques as! Useful and very interesting stuff to do in every research and data analysis, when analyzing information, is! Usually determine what type of analysis, it helps us to simplify large amounts of data in a of! Predict ” the future with 100 % surety …, Bivariate data examples! Name suggests, the sample accurately represents the population such as data mining,! Machine learning and etc understand and identify the risk factors for prostate cancer the real world of analysis the! Top software tools to help more important places in a meaningful way elementary level and then gradually. Inference statistics allows businesses and other organizations to test a hypothesis and come up with about. Denoted asx∈X 60 billion web pages and 30 million publications reasonable way normal use! Lot from it use both descriptive and predictive analytics and analysis address major disasters business decisions every... Language even a normal person too conclusions about the data represent amounts (.. Before other formal statistical techniques monograph is written for advanced graduate students, Ph.D. students, and tests... Assumptions of statistical decision '' – Deutsch-Englisch Wörterbuch und Suchmaschine für Millionen Deutsch-Übersetzungen. Are models that seek to trade stocks or other financial instruments for profit can also verify whether observed! Implement predictive analytics experimente ∈E is denoted asx∈X Exploratory data analysis is based on current and historical facts control like... That, this type of analysis answer the question “ Why? ” to show data in reasonable! Learning and etc they make aren ’ t discover what the data represent amounts e.g. Then calculates a p-value ( probability value critically!, after all, a good one it is normal use! Statistical question if it has an important role especially in it field a decision making to when... Suitable action between several alternatives important to note that no significant difference exists in a reasonable way, data... Value, then the sample sizes in the software industry analyzing uncertainty general, such consequences not... They can be used to solve both regression and classification problems raw data so, let ’ s first the..., you can ’ t discover what the data biological science, example... Minimize risks trade stocks or other data visualization types to present raw data dealing with simply because statistics a... Mining, modeling, artificial intelligence, machine learning and etc decision tree analysis is number! Following: the average heights of children, teenagers, and researchers in mathematical and!


text:
author nipkow Wed, 30 Aug 2000 18:09:20 +0200 changeset 9754 a123a64cadeb parent 9753 f25ac7194f71 child 9755 6fefedeb3428
*** empty log message ***
 doc-src/TutorialI/Misc/Itrev.thy file | annotate | diff | comparison | revisions doc-src/TutorialI/Misc/document/Itrev.tex file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/Nested0.thy file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/Nested1.thy file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/Nested2.thy file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/document/Nested0.tex file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/document/Nested1.tex file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/document/Nested2.tex file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/document/simplification.tex file | annotate | diff | comparison | revisions doc-src/TutorialI/Recdef/simplification.thy file | annotate | diff | comparison | revisions doc-src/TutorialI/fp.tex file | annotate | diff | comparison | revisions doc-src/TutorialI/tricks.tex file | annotate | diff | comparison | revisions
--- a/doc-src/TutorialI/Misc/Itrev.thy	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Misc/Itrev.thy	Wed Aug 30 18:09:20 2000 +0200
@@ -2,25 +2,29 @@
theory Itrev = Main:;
(*>*)

-text{* Function \isa{rev} has quadratic worst-case running time
-because it calls function \isa{\at} for each element of the list and
-\isa{\at} is linear in its first argument.  A linear time version of
-\isa{rev} reqires an extra argument where the result is accumulated
+text{*
+Function @{term"rev"} has quadratic worst-case running time
+because it calls function @{term"@"} for each element of the list and
+@{term"@"} is linear in its first argument.  A linear time version of
+@{term"rev"} reqires an extra argument where the result is accumulated
+*}

consts itrev :: "'a list \\<Rightarrow> 'a list \\<Rightarrow> 'a list";
primrec
"itrev []     ys = ys"
"itrev (x#xs) ys = itrev xs (x#ys)";

-text{*\noindent The behaviour of \isa{itrev} is simple: it reverses
+text{*\noindent
+The behaviour of @{term"itrev"} is simple: it reverses
its first argument by stacking its elements onto the second argument,
and returning that second argument when the first one becomes
-empty. Note that \isa{itrev} is tail-recursive, i.e.\ it can be
+empty. Note that @{term"itrev"} is tail-recursive, i.e.\ it can be
compiled into a loop.

-Naturally, we would like to show that \isa{itrev} does indeed reverse
-its first argument provided the second one is empty: *};
+Naturally, we would like to show that @{term"itrev"} does indeed reverse
+its first argument provided the second one is empty:
+*};

lemma "itrev xs [] = rev xs";

@@ -37,47 +41,46 @@
\end{isabelle}
Just as predicted above, the overall goal, and hence the induction
hypothesis, is too weak to solve the induction step because of the fixed
-\isa{[]}. The corresponding heuristic:
+@{term"[]"}. The corresponding heuristic:
\begin{quote}
-{\em 3. Generalize goals for induction by replacing constants by variables.}
+\emph{Generalize goals for induction by replacing constants by variables.}
\end{quote}
-
-Of course one cannot do this na\"{\i}vely: \isa{itrev xs ys = rev xs} is
+Of course one cannot do this na\"{\i}vely: @{term"itrev xs ys = rev xs"} is
just not true---the correct generalization is
*};
(*<*)oops;(*>*)
lemma "itrev xs ys = rev xs @ ys";

txt{*\noindent
-If \isa{ys} is replaced by \isa{[]}, the right-hand side simplifies to
+If @{term"ys"} is replaced by @{term"[]"}, the right-hand side simplifies to
@{term"rev xs"}, just as required.

In this particular instance it was easy to guess the right generalization,
but in more complex situations a good deal of creativity is needed. This is
the main source of complications in inductive proofs.

-Although we now have two variables, only \isa{xs} is suitable for
+Although we now have two variables, only @{term"xs"} is suitable for
induction, and we repeat our above proof attempt. Unfortunately, we are still
not there:
\begin{isabelle}
~1.~{\isasymAnd}a~list.\isanewline
~~~~~~~itrev~list~ys~=~rev~list~@~ys~{\isasymLongrightarrow}\isanewline
-~~~~~~~itrev~list~(a~\#~ys)~=~rev~list~@~a~\#~ys%
+~~~~~~~itrev~list~(a~\#~ys)~=~rev~list~@~a~\#~ys
\end{isabelle}
The induction hypothesis is still too weak, but this time it takes no
-intuition to generalize: the problem is that \isa{ys} is fixed throughout
+intuition to generalize: the problem is that @{term"ys"} is fixed throughout
the subgoal, but the induction hypothesis needs to be applied with
-@{term"a # ys"} instead of \isa{ys}. Hence we prove the theorem
-for all \isa{ys} instead of a fixed one:
+@{term"a # ys"} instead of @{term"ys"}. Hence we prove the theorem
+for all @{term"ys"} instead of a fixed one:
*};
(*<*)oops;(*>*)
lemma "\\<forall>ys. itrev xs ys = rev xs @ ys";

txt{*\noindent
-This time induction on \isa{xs} followed by simplification succeeds. This
+This time induction on @{term"xs"} followed by simplification succeeds. This
leads to another heuristic for generalization:
\begin{quote}
-{\em 4. Generalize goals for induction by universally quantifying all free
+\emph{Generalize goals for induction by universally quantifying all free
variables {\em(except the induction variable itself!)}.}
\end{quote}
This prevents trivial failures like the above and does not change the
--- a/doc-src/TutorialI/Misc/document/Itrev.tex	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Misc/document/Itrev.tex	Wed Aug 30 18:09:20 2000 +0200
@@ -38,9 +38,8 @@
hypothesis, is too weak to solve the induction step because of the fixed
\isa{[]}. The corresponding heuristic:
\begin{quote}
-{\em 3. Generalize goals for induction by replacing constants by variables.}
+\emph{Generalize goals for induction by replacing constants by variables.}
\end{quote}
-
Of course one cannot do this na\"{\i}vely: \isa{itrev xs ys = rev xs} is
just not true---the correct generalization is%
\end{isamarkuptxt}%
@@ -74,7 +73,7 @@
This time induction on \isa{xs} followed by simplification succeeds. This
leads to another heuristic for generalization:
\begin{quote}
-{\em 4. Generalize goals for induction by universally quantifying all free
+\emph{Generalize goals for induction by universally quantifying all free
variables {\em(except the induction variable itself!)}.}
\end{quote}
This prevents trivial failures like the above and does not change the
--- a/doc-src/TutorialI/Recdef/Nested0.thy	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/Nested0.thy	Wed Aug 30 18:09:20 2000 +0200
@@ -15,9 +15,7 @@
you needed to reprove many lemmas reminiscent of similar lemmas about
@{term"rev"}. We will now show you how \isacommand{recdef} can simplify
definitions and proofs about nested recursive datatypes. As an example we
-chose exercise~\ref{ex:trev-trev}:
-
-FIXME: declare trev now!
+choose exercise~\ref{ex:trev-trev}:
*}
(* consts trev  :: "('a,'b)term => ('a,'b)term" *)
(*<*)
--- a/doc-src/TutorialI/Recdef/Nested1.thy	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/Nested1.thy	Wed Aug 30 18:09:20 2000 +0200
@@ -1,12 +1,12 @@
(*<*)
theory Nested1 = Nested0:;
(*>*)
-consts trev  :: "('a,'b)term => ('a,'b)term";
+consts trev  :: "('a,'b)term \<Rightarrow> ('a,'b)term";

text{*\noindent
Although the definition of @{term"trev"} is quite natural, we will have
overcome a minor difficulty in convincing Isabelle of is termination.
-It is precisely this difficulty that is the \textit{rasion d'\^etre} of
+It is precisely this difficulty that is the \textit{raison d'\^etre} of
this subsection.

Defining @{term"trev"} by \isacommand{recdef} rather than \isacommand{primrec}
@@ -15,30 +15,30 @@
*};

recdef trev "measure size"
- "trev (Var x) = Var x"
+ "trev (Var x)    = Var x"
"trev (App f ts) = App f (rev(map trev ts))";

-text{*
-FIXME: recdef should complain and generate unprovable termination condition!
-moveto todo
-
+text{*\noindent
Remember that function @{term"size"} is defined for each \isacommand{datatype}.
-However, the definition does not succeed. Isabelle complains about an unproved termination
-condition
+However, the definition does not succeed. Isabelle complains about an
+unproved termination condition
\begin{quote}
-@{term[display]"t : set ts --> size t < Suc (term_size ts)"}
+@{term[display]"t : set ts --> size t < Suc (term_list_size ts)"}
\end{quote}
-where @{term"set"} returns the set of elements of a list---no special knowledge of sets is
-required in the following.
-First we have to understand why the recursive call of @{term"trev"} underneath @{term"map"} leads
-to the above condition. The reason is that \isacommand{recdef} knows'' that @{term"map"} will
-apply @{term"trev"} only to elements of @{term"ts"}. Thus the above condition expresses that
-the size of the argument @{term"t : set ts"} of any recursive call of @{term"trev"} is strictly
-less than @{term"size(App f ts) = Suc(term_size ts)"}.
-We will now prove the termination condition and continue with our definition.
-Below we return to the question of how \isacommand{recdef} knows'' about @{term"map"}.
+where @{term"set"} returns the set of elements of a list (no special
+knowledge of sets is required in the following) and @{name"term_list_size ::
+term list \<Rightarrow> nat"} is an auxiliary function automatically defined by Isabelle
+(when @{name"term"} was defined).  First we have to understand why the
+recursive call of @{term"trev"} underneath @{term"map"} leads to the above
+condition. The reason is that \isacommand{recdef} knows'' that @{term"map"}
+will apply @{term"trev"} only to elements of @{term"ts"}. Thus the above
+condition expresses that the size of the argument @{term"t : set ts"} of any
+recursive call of @{term"trev"} is strictly less than @{term"size(App f ts) =
+Suc(term_list_size ts)"}.  We will now prove the termination condition and
+continue with our definition.  Below we return to the question of how
+\isacommand{recdef} knows'' about @{term"map"}.
*};

(*<*)
end;
-(*>*)
\ No newline at end of file
+(*>*)
--- a/doc-src/TutorialI/Recdef/Nested2.thy	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/Nested2.thy	Wed Aug 30 18:09:20 2000 +0200
@@ -7,7 +7,7 @@
The termintion condition is easily proved by induction:
*};

-lemma [simp]: "t \\<in> set ts \\<longrightarrow> size t < Suc(term_size ts)";
+lemma [simp]: "t \<in> set ts \<longrightarrow> size t < Suc(term_list_size ts)";
by(induct_tac ts, auto);
(*<*)
recdef trev "measure size"
@@ -19,7 +19,7 @@
applies it automatically and the above definition of @{term"trev"}
succeeds now. As a reward for our effort, we can now prove the desired
lemma directly. The key is the fact that we no longer need the verbose
-induction schema for type \isa{term} but the simpler one arising from
+induction schema for type @{name"term"} but the simpler one arising from
@{term"trev"}:
*};

@@ -38,8 +38,8 @@

text{*\noindent
If the proof of the induction step mystifies you, we recommend to go through
-the chain of simplification steps in detail, probably with the help of
-\isa{trace\_simp}.
+the chain of simplification steps in detail; you will probably need the help of
+@{name"trace_simp"}.
%\begin{quote}
%{term[display]"trev(trev(App f ts))"}\\
%{term[display]"App f (rev(map trev (rev(map trev ts))))"}\\
@@ -50,9 +50,9 @@
%{term[display]"App f ts"}
%\end{quote}

-The above definition of @{term"trev"} is superior to the one in \S\ref{sec:nested-datatype}
-because it brings @{term"rev"} into play, about which already know a lot, in particular
-@{prop"rev(rev xs) = xs"}.
+The above definition of @{term"trev"} is superior to the one in
+\S\ref{sec:nested-datatype} because it brings @{term"rev"} into play, about
+which already know a lot, in particular @{prop"rev(rev xs) = xs"}.
Thus this proof is a good example of an important principle:
\begin{quote}
@@ -64,9 +64,9 @@
like @{term"map"}. For a start, if nothing were known about @{term"map"},
@{term"map trev ts"} might apply @{term"trev"} to arbitrary terms, and thus
\isacommand{recdef} would try to prove the unprovable @{term"size t < Suc
-(term_size ts)"}, without any assumption about \isa{t}.  Therefore
+(term_list_size ts)"}, without any assumption about @{term"t"}.  Therefore
\isacommand{recdef} has been supplied with the congruence theorem
-\isa{map\_cong}:
+@{name"map_cong"}:
\begin{quote}
@{thm[display,margin=50]"map_cong"[no_vars]}
\end{quote}
--- a/doc-src/TutorialI/Recdef/document/Nested0.tex	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/document/Nested0.tex	Wed Aug 30 18:09:20 2000 +0200
@@ -13,9 +13,7 @@
you needed to reprove many lemmas reminiscent of similar lemmas about
\isa{rev}. We will now show you how \isacommand{recdef} can simplify
definitions and proofs about nested recursive datatypes. As an example we
-chose exercise~\ref{ex:trev-trev}:
-
-FIXME: declare trev now!%
+choose exercise~\ref{ex:trev-trev}:%
\end{isamarkuptext}%
\end{isabellebody}%
%%% Local Variables:
--- a/doc-src/TutorialI/Recdef/document/Nested1.tex	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/document/Nested1.tex	Wed Aug 30 18:09:20 2000 +0200
@@ -1,11 +1,11 @@
%
\begin{isabellebody}%
-\isacommand{consts}\ trev\ \ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}a{\isacharcomma}{\isacharprime}b{\isacharparenright}term\ {\isacharequal}{\isachargreater}\ {\isacharparenleft}{\isacharprime}a{\isacharcomma}{\isacharprime}b{\isacharparenright}term{\isachardoublequote}%
+\isacommand{consts}\ trev\ \ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}a{\isacharcomma}{\isacharprime}b{\isacharparenright}term\ {\isasymRightarrow}\ {\isacharparenleft}{\isacharprime}a{\isacharcomma}{\isacharprime}b{\isacharparenright}term{\isachardoublequote}%
\begin{isamarkuptext}%
\noindent
Although the definition of \isa{trev} is quite natural, we will have
overcome a minor difficulty in convincing Isabelle of is termination.
-It is precisely this difficulty that is the \textit{rasion d'\^etre} of
+It is precisely this difficulty that is the \textit{raison d'\^etre} of
this subsection.

Defining \isa{trev} by \isacommand{recdef} rather than \isacommand{primrec}
@@ -13,31 +13,30 @@
suggested at the end of \S\ref{sec:nested-datatype}:%
\end{isamarkuptext}%
\isacommand{recdef}\ trev\ {\isachardoublequote}measure\ size{\isachardoublequote}\isanewline
-\ {\isachardoublequote}trev\ {\isacharparenleft}Var\ x{\isacharparenright}\ {\isacharequal}\ Var\ x{\isachardoublequote}\isanewline
+\ {\isachardoublequote}trev\ {\isacharparenleft}Var\ x{\isacharparenright}\ \ \ \ {\isacharequal}\ Var\ x{\isachardoublequote}\isanewline
\ {\isachardoublequote}trev\ {\isacharparenleft}App\ f\ ts{\isacharparenright}\ {\isacharequal}\ App\ f\ {\isacharparenleft}rev{\isacharparenleft}map\ trev\ ts{\isacharparenright}{\isacharparenright}{\isachardoublequote}%
\begin{isamarkuptext}%
-FIXME: recdef should complain and generate unprovable termination condition!
-moveto todo
-
+\noindent
Remember that function \isa{size} is defined for each \isacommand{datatype}.
-However, the definition does not succeed. Isabelle complains about an unproved termination
-condition
+However, the definition does not succeed. Isabelle complains about an
+unproved termination condition
\begin{quote}

\begin{isabelle}%
-\mbox{t}\ {\isasymin}\ set\ \mbox{ts}\ {\isasymlongrightarrow}\ size\ \mbox{t}\ {\isacharless}\ Suc\ {\isacharparenleft}term{\isacharunderscore}size\ \mbox{ts}{\isacharparenright}
+\mbox{t}\ {\isasymin}\ set\ \mbox{ts}\ {\isasymlongrightarrow}\ size\ \mbox{t}\ {\isacharless}\ Suc\ {\isacharparenleft}term{\isacharunderscore}list{\isacharunderscore}size\ \mbox{ts}{\isacharparenright}
\end{isabelle}%

\end{quote}
-where \isa{set} returns the set of elements of a list---no special knowledge of sets is
-required in the following.
-First we have to understand why the recursive call of \isa{trev} underneath \isa{map} leads
-to the above condition. The reason is that \isacommand{recdef} knows'' that \isa{map} will
-apply \isa{trev} only to elements of \isa{\mbox{ts}}. Thus the above condition expresses that
-the size of the argument \isa{\mbox{t}\ {\isasymin}\ set\ \mbox{ts}} of any recursive call of \isa{trev} is strictly
-less than \isa{size\ {\isacharparenleft}App\ \mbox{f}\ \mbox{ts}{\isacharparenright}\ {\isacharequal}\ Suc\ {\isacharparenleft}term{\isacharunderscore}size\ \mbox{ts}{\isacharparenright}}.
-We will now prove the termination condition and continue with our definition.
-Below we return to the question of how \isacommand{recdef} knows'' about \isa{map}.%
+where \isa{set} returns the set of elements of a list (no special
+knowledge of sets is required in the following) and \isa{term{\isacharunderscore}list{\isacharunderscore}size\ {\isacharcolon}{\isacharcolon}\ term\ list\ {\isasymRightarrow}\ nat} is an auxiliary function automatically defined by Isabelle
+(when \isa{term} was defined).  First we have to understand why the
+recursive call of \isa{trev} underneath \isa{map} leads to the above
+condition. The reason is that \isacommand{recdef} knows'' that \isa{map}
+will apply \isa{trev} only to elements of \isa{\mbox{ts}}. Thus the above
+condition expresses that the size of the argument \isa{\mbox{t}\ {\isasymin}\ set\ \mbox{ts}} of any
+recursive call of \isa{trev} is strictly less than \isa{size\ {\isacharparenleft}App\ \mbox{f}\ \mbox{ts}{\isacharparenright}\ {\isacharequal}\ Suc\ {\isacharparenleft}term{\isacharunderscore}list{\isacharunderscore}size\ \mbox{ts}{\isacharparenright}}.  We will now prove the termination condition and
+continue with our definition.  Below we return to the question of how
+\isacommand{recdef} knows'' about \isa{map}.%
\end{isamarkuptext}%
\end{isabellebody}%
%%% Local Variables:
--- a/doc-src/TutorialI/Recdef/document/Nested2.tex	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/document/Nested2.tex	Wed Aug 30 18:09:20 2000 +0200
@@ -5,7 +5,7 @@
\noindent
The termintion condition is easily proved by induction:%
\end{isamarkuptext}%
-\isacommand{lemma}\ {\isacharbrackleft}simp{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}t\ {\isasymin}\ set\ ts\ {\isasymlongrightarrow}\ size\ t\ {\isacharless}\ Suc{\isacharparenleft}term{\isacharunderscore}size\ ts{\isacharparenright}{\isachardoublequote}\isanewline
+\isacommand{lemma}\ {\isacharbrackleft}simp{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}t\ {\isasymin}\ set\ ts\ {\isasymlongrightarrow}\ size\ t\ {\isacharless}\ Suc{\isacharparenleft}term{\isacharunderscore}list{\isacharunderscore}size\ ts{\isacharparenright}{\isachardoublequote}\isanewline
\isacommand{by}{\isacharparenleft}induct{\isacharunderscore}tac\ ts{\isacharcomma}\ auto{\isacharparenright}%
\begin{isamarkuptext}%
\noindent
@@ -36,8 +36,8 @@
\begin{isamarkuptext}%
\noindent
If the proof of the induction step mystifies you, we recommend to go through
-the chain of simplification steps in detail, probably with the help of
-\isa{trace\_simp}.
+the chain of simplification steps in detail; you will probably need the help of
+\isa{trace{\isacharunderscore}simp}.
%\begin{quote}
%{term[display]"trev(trev(App f ts))"}\\
%{term[display]"App f (rev(map trev (rev(map trev ts))))"}\\
@@ -48,9 +48,9 @@
%{term[display]"App f ts"}
%\end{quote}

-The above definition of \isa{trev} is superior to the one in \S\ref{sec:nested-datatype}
-because it brings \isa{rev} into play, about which already know a lot, in particular
-\isa{rev\ {\isacharparenleft}rev\ \mbox{xs}{\isacharparenright}\ {\isacharequal}\ \mbox{xs}}.
+The above definition of \isa{trev} is superior to the one in
+\S\ref{sec:nested-datatype} because it brings \isa{rev} into play, about
+which already know a lot, in particular \isa{rev\ {\isacharparenleft}rev\ \mbox{xs}{\isacharparenright}\ {\isacharequal}\ \mbox{xs}}.
Thus this proof is a good example of an important principle:
\begin{quote}
@@ -61,9 +61,9 @@
sensible termination conditions in the presence of higher-order functions
like \isa{map}. For a start, if nothing were known about \isa{map},
\isa{map\ trev\ \mbox{ts}} might apply \isa{trev} to arbitrary terms, and thus
-\isacommand{recdef} would try to prove the unprovable \isa{size\ \mbox{t}\ {\isacharless}\ Suc\ {\isacharparenleft}term{\isacharunderscore}size\ \mbox{ts}{\isacharparenright}}, without any assumption about \isa{t}.  Therefore
+\isacommand{recdef} would try to prove the unprovable \isa{size\ \mbox{t}\ {\isacharless}\ Suc\ {\isacharparenleft}term{\isacharunderscore}list{\isacharunderscore}size\ \mbox{ts}{\isacharparenright}}, without any assumption about \isa{\mbox{t}}.  Therefore
\isacommand{recdef} has been supplied with the congruence theorem
-\isa{map\_cong}:
+\isa{map{\isacharunderscore}cong}:
\begin{quote}

\begin{isabelle}%
--- a/doc-src/TutorialI/Recdef/document/simplification.tex	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/document/simplification.tex	Wed Aug 30 18:09:20 2000 +0200
@@ -26,7 +26,7 @@
is provded automatically because it is already present as a lemma in the
arithmetic library. Thus the recursion equation becomes a simplification
rule. Of course the equation is nonterminating if we are allowed to unfold
-the recursive call inside the \isa{else} branch, which is why programming
+the recursive call inside the \isa{if} branch, which is why programming
languages and our simplifier don't do that. Unfortunately the simplifier does
something else which leads to the same problem: it splits \isa{if}s if the
condition simplifies to neither \isa{True} nor \isa{False}. For
@@ -59,11 +59,10 @@
simplification steps. Fortunately, this problem can be avoided in many
different ways.

-The most radical solution is to disable the offending
-\isa{split_if} as shown in the section on case splits in
-\S\ref{sec:SimpFeatures}.
-However, we do not recommend this because it means you will often have to
-invoke the rule explicitly when \isa{if} is involved.
+The most radical solution is to disable the offending \\isa{split{\isacharunderscore}if} as
+shown in the section on case splits in \S\ref{sec:Simplification}.  However,
+we do not recommend this because it means you will often have to invoke the
+rule explicitly when \isa{if} is involved.

If possible, the definition should be given by pattern matching on the left
rather than \isa{if} on the right. In the case of \isa{gcd} the
@@ -76,7 +75,7 @@
\begin{isamarkuptext}%
\noindent
Note that the order of equations is important and hides the side condition
-\isa{n \isasymnoteq\ 0}. Unfortunately, in general the case distinction
+\isa{\mbox{n}\ {\isasymnoteq}\ \isadigit{0}}. Unfortunately, in general the case distinction
may not be expressible by pattern matching.

A very simple alternative is to replace \isa{if} by \isa{case}, which
--- a/doc-src/TutorialI/Recdef/simplification.thy	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/Recdef/simplification.thy	Wed Aug 30 18:09:20 2000 +0200
@@ -7,7 +7,7 @@
equations become simplification rules, just as with
\isacommand{primrec}. In most cases this works fine, but there is a subtle
problem that must be mentioned: simplification may not
-terminate because of automatic splitting of \isa{if}.
+terminate because of automatic splitting of @{name"if"}.
Let us look at an example:
*}

@@ -24,10 +24,10 @@
is provded automatically because it is already present as a lemma in the
arithmetic library. Thus the recursion equation becomes a simplification
rule. Of course the equation is nonterminating if we are allowed to unfold
-the recursive call inside the \isa{else} branch, which is why programming
+the recursive call inside the @{name"if"} branch, which is why programming
languages and our simplifier don't do that. Unfortunately the simplifier does
-something else which leads to the same problem: it splits \isa{if}s if the
-condition simplifies to neither \isa{True} nor \isa{False}. For
+something else which leads to the same problem: it splits @{name"if"}s if the
+condition simplifies to neither @{term"True"} nor @{term"False"}. For
example, simplification reduces
\begin{quote}
@{term[display]"gcd(m,n) = k"}
@@ -41,18 +41,17 @@
@{term[display]"(n=0 --> m=k) & (n ~= 0 --> gcd(n, m mod n)=k)"}
\end{quote}
Since the recursive call @{term"gcd(n, m mod n)"} is no longer protected by
-an \isa{if}, it is unfolded again, which leads to an infinite chain of
+an @{name"if"}, it is unfolded again, which leads to an infinite chain of
simplification steps. Fortunately, this problem can be avoided in many
different ways.

-The most radical solution is to disable the offending
-\isa{split_if} as shown in the section on case splits in
-\S\ref{sec:SimpFeatures}.
-However, we do not recommend this because it means you will often have to
-invoke the rule explicitly when \isa{if} is involved.
+The most radical solution is to disable the offending \@{name"split_if"} as
+shown in the section on case splits in \S\ref{sec:Simplification}.  However,
+we do not recommend this because it means you will often have to invoke the
+rule explicitly when @{name"if"} is involved.

If possible, the definition should be given by pattern matching on the left
-rather than \isa{if} on the right. In the case of \isa{gcd} the
+rather than @{name"if"} on the right. In the case of @{term"gcd"} the
following alternative definition suggests itself:
*}

@@ -64,11 +63,11 @@

text{*\noindent
Note that the order of equations is important and hides the side condition
-\isa{n \isasymnoteq\ 0}. Unfortunately, in general the case distinction
+@{prop"n ~= 0"}. Unfortunately, in general the case distinction
may not be expressible by pattern matching.

-A very simple alternative is to replace \isa{if} by \isa{case}, which
-is also available for \isa{bool} but is not split automatically:
+A very simple alternative is to replace @{name"if"} by @{name"case"}, which
+is also available for @{typ"bool"} but is not split automatically:
*}

consts gcd2 :: "nat*nat \\<Rightarrow> nat";
@@ -79,7 +78,7 @@
In fact, this is probably the neatest solution next to pattern matching.

A final alternative is to replace the offending simplification rules by
-derived conditional ones. For \isa{gcd} it means we have to prove
+derived conditional ones. For @{term"gcd"} it means we have to prove
*}

lemma [simp]: "gcd (m, 0) = m";
--- a/doc-src/TutorialI/fp.tex	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/fp.tex	Wed Aug 30 18:09:20 2000 +0200
@@ -405,16 +405,12 @@

Simplification is one of the central theorem proving tools in Isabelle and
many other systems. The tool itself is called the \bfindex{simplifier}. The
-purpose of this section is twofold: to introduce the many features of the
-simplifier (\S\ref{sec:SimpFeatures}) and to explain a little bit how the
-simplifier works (\S\ref{sec:SimpHow}).  Anybody intending to use HOL should
-\S\ref{sec:SimpHow} as well in order to understand what happened in case
-things do not simplify as expected.
-
-
-\subsection{Using the simplifier}
-\label{sec:SimpFeatures}
+purpose of this section is introduce the many features of the simplifier.
+Anybody intending to use HOL should read this section. Later on
+(\S\ref{sec:simplification-II}) we explain some more advanced features and a
+little bit of how the simplifier works. The serious student should read that
+section as well, in particular in order to understand what happened if things
+do not simplify as expected.

\subsubsection{What is simplification}

@@ -572,11 +568,11 @@
inductive proofs. The first one we have already mentioned in our initial
example:
\begin{quote}
-{\em 1. Theorems about recursive functions are proved by induction.}
+\emph{Theorems about recursive functions are proved by induction.}
\end{quote}
In case the function has more than one argument
\begin{quote}
-{\em 2. Do induction on argument number $i$ if the function is defined by
+\emph{Do induction on argument number $i$ if the function is defined by
recursion in argument number $i$.}
\end{quote}
When we look at the proof of {\makeatother\isa{(xs @ ys) @ zs = xs @ (ys @
@@ -598,8 +594,8 @@
side, the simpler \isa{rev} on the right-hand side. This constitutes
another, albeit weak heuristic that is not restricted to induction:
\begin{quote}
-  {\em 5. The right-hand side of an equation should (in some sense) be
-    simpler than the left-hand side.}
+  \emph{The right-hand side of an equation should (in some sense) be simpler
+    than the left-hand side.}
\end{quote}
The heuristic is tricky to apply because it is not obvious that
\isa{rev xs \at\ ys} is simpler than \isa{itrev xs ys}. But see what
--- a/doc-src/TutorialI/tricks.tex	Wed Aug 30 18:05:20 2000 +0200
+++ b/doc-src/TutorialI/tricks.tex	Wed Aug 30 18:09:20 2000 +0200
@@ -1,6 +1,7 @@
\subsection{Advanced features}


text:
# AI and Data Science

Systems, Data Science, Biology, Medicine

Autumn Data Science School, Cambridge

## What is Machine Learning?

$\text{data} + \text{model} \stackrel{\text{compute}}{\rightarrow} \text{prediction}$

• data : observations, could be actively or passively acquired (meta-data).
• model : assumptions, based on previous experience (other data! transfer learning etc), or beliefs about the regularities of the universe. Inductive bias.
• prediction : an action to be taken or a categorization or a quality score.

## What is Machine Learning?

$\text{data} + \text{model} \stackrel{\text{compute}}{\rightarrow} \text{prediction}$

• To combine data with a model need:
• a prediction function $\mappingFunction (\cdot)$ includes our beliefs about the regularities of the universe
• an objective function $\errorFunction (\cdot)$ defines the cost of misprediction.

## Machine Learning

• Driver of two different domains:
1. Data Science: arises from the fact that we now capture data by happenstance.
2. Artificial Intelligence: emulation of human behaviour.
• Connection: Internet of Things

## Machine Learning

• Driver of two different domains:
1. Data Science: arises from the fact that we now capture data by happenstance.
2. Artificial Intelligence: emulation of human behaviour.
• Connection: Internet of Things

## Machine Learning

• Driver of two different domains:
1. Data Science: arises from the fact that we now capture data by happenstance.
2. Artificial Intelligence: emulation of human behaviour.
• Connection: Internet of People
Convention for the Protection of Individuals with regard to Automatic Processing of Personal Data (1981/1/28)

## What does Machine Learning do?

• ML Automates through Data
• Strongly related to statistics.
• Field underpins revolution in data science and AI
• With AI:
• logic, robotics, computer vision, speech
• With Data Science:
• databases, data mining, statistics, visualization

## Machine Learning in Supply Chain

• Supply chain: Large Automated Decision Making Network
• Major Challenge:
• We have a mechanistic understanding of supply chain.
• Machine learning is a data driven technology.

## Deploying Artificial Intelligence

• Challenges in deploying AI.
• Currently this is in the form of “machine learning systems”

## Internet of People

• Fog computing: barrier between cloud and device blurring.
• Computing on the Edge
• Complex feedback between algorithm and implementation

## Deploying ML in Real World: Machine Learning Systems Design

• Major new challenge for systems designers.
• Internet of Intelligence but currently:
• AI systems are fragile

Data Science Africa is a bottom up initiative for capacity building in data science, machine learning and AI on the African continent

## Example: Prediction of Malaria Incidence in Uganda

• Work with Ricardo Andrade Pacheco, John Quinn and Martin Mubaganzi (Makerere University, Uganda)
• See AI-DEV Group.

## Malaria Prediction in Uganda

(Andrade-Pacheco et al., 2014; Mubangizi et al., 2014)

## Conclusion

• Separation between machine learning and AI

• Real world challenges such as matching supply to demand

• Example of predicting disease via Gaussian processes

## References

Andrade-Pacheco, R., Mubangizi, M., Quinn, J., Lawrence, N.D., 2014. Consistent mapping of government malaria records across a changing territory delimitation. Malaria Journal 13. https://doi.org/10.1186/1475-2875-13-S1-P5

Mubangizi, M., Andrade-Pacheco, R., Smith, M.T., Quinn, J., Lawrence, N.D., 2014. Malaria surveillance with multiple data sources using Gaussian process models, in: 1st International Conference on the Use of Mobile ICT in Africa.


text:
# Parameters

The parameters system makes all the gettable and settable parameters of the copter accessible. The copter holds a table of parameters which can be retrieved. In this table every parameter name is associated with an ID and a group name. Three IDs are used to acces the TOC and the parameters:

Port Channel Function
2 0 TOC access
2 2 Parameter write
2 3 Misc. commands

## TOC access

These messages permit to access the parameters table of content. The first byte of the message is a message ID, three messages ID are defined:

Message ID Meaning in upstream packets Meaning in downstream packets
0 Reset TOC pointer Last TOC element
1 Get next TOC element TOC element (ID, type, group, name)
3 Get TOC CRC32 Number of parameters, TOC CRC32

The upstream ID are commands and are sent alone. The downstream has the following formats:

Bytes     1       1          1    Null terminated strings
+---+------------+------+----------+--------------+
| 0 |            |      |          |              |
+---+  Param ID  | Type |  Group   |     Name     |
| 1 |            |      |          |              |
+---+------------+------+---+------+--------------+
| 3 | Num. Param |  CRC32   |
+---+------------+----------+
Bytes     1       1           4

The parameters are sequentially requested by the PC until the end. When the last parameter is reached it has the ID 0 'Last TOC element'. The reset command permits to reset the TOC pointers so that the next sent TOC element will be the first one. The "Get TOC CRC" command also returns the number of parameters.

The CRC32 is a hash of the copter TOC. This is aimed at implementing caching of the TOC in the PC Utils to avoid fetching the full TOC each time the copter is connected.

The type is one byte describing the parameter type:

Type code C type Python unpack
0x08 uint8_t '<B '
0x09 uint16_t '<H'
0x0A uint32_t '<L'
0x0B uint64_t '<Q'
0x00 int8_t '<b'
0x01 int16_t '<h'
0x02 int32_t '<i'
0x03 int64_t '<q'
0x05 FP16 ''
0x06 float '<f'
0x07 double '<d'

Byte Request fields Content
0 ID ID of the parameter to read (see TOC)
0 ID ID of the parameter
1-.. value Value of the parameter. Size and format is described in the TOC

The read request is a simple packet on channel 1. Crazyflie answers with the value.

## Parameter write

Byte Request fields Content
0 ID ID of the parameter to write
1-... value Value to write. Size and format is described in the TOC
0 ID ID of the parameter
1-... value Value of the parameter. Size and format is described in the TOC

The write request is a simple packet on channel 2. Crazyflie sends back the parameter value as an acknowledgement.

## Misc. commands

The following misc commands are implemented:

Code Command
0x00 Set by name
0x01 Value updated

### Set by name

Byte Request fields Content
0 SET_BY_NAME 0x00
1-n group Name of the group
n-(n+1) NULL 0
(n+1)-(n+m+1) name Name of the parameter
(n+m+1)-(n+m+2) NULL 0
(n+m+2)-(n+m+3) TYPE Parameter type
(n+m+3)-... value Value. Size and format is described by type
0 SET_BY_NAME 0x00
1-n group Name of the group
n-(n+1) NULL 0
(n+1)-(n+m+1) name Name of the parameter
(n+m+2) NULL 0
(n+m+3) ERROR 0 if the parameter has been successfully written. Other code are taken from errno C codes.

Group and name are ascii strings of size respectively n and m. The type corresponds to the TOC type of the parameter. It is checked for consistency.

This command is useful to set a parameter without having to fetch the full TOC. It is enough to know the group, name and type of the parameter to write it.

### Value updated

There is no request packet for this message, it is only sent by the Crazyflie.


text:
# Geometry shader: Dynamic output?

I'm currently using a geometry shader to generate grass blades out of single root points that are layed out in a grid. For each root point, I generate a grass blade with, right now, a constant number of vertices.

However, for level of detail, I would like to generate a number of vertices depending on the distance to the camera. Now, since there are no dynamic arrays, I tried to declare multiple techniques which call the geometry shader with the number of vertices.

I would then be able to divide my grass into patches/smaller grids, calculate the distance to the camera for this patch and then call the technique with the appropriate number of vertices.

The HLSL part looks something like this:

[maxvertexcount(24)]
void GS_LOD1(point GEO_IN points[1], inout TriangleStream<GEO_OUT> output)
{
GS_Shader(points, 8, output);
}

[maxvertexcount(24)]
void GS_LOD2(point GEO_IN points[1], inout TriangleStream<GEO_OUT> output)
{
GS_Shader(points, 16, output);
}

technique LevelOfDetail1
{
pass Pass1
{
VertexShader = compile vs_4_0 VS_Shader();
GeometryShader = compile gs_4_0 GS_LOD1();
PixelShader = compile ps_4_0 PS_Shader();
}
}

technique LevelOfDetail2
{
pass Pass1
{
VertexShader = compile vs_4_0 VS_Shader();
GeometryShader = compile gs_4_0 GS_LOD2();
PixelShader = compile ps_4_0 PS_Shader();
}
}

And the definition of the GS function:

void GS_Shader(point GEO_IN points[1], in const int realVertexCount, inout TriangleStream<GEO_OUT> output)
{
[...]
GEO_OUT v[realVertexCount];

However, even this way the compiler complains:

array dimensions must be literal scalar expressions

Is this possible in any way? I guess what would is just writing several geometry shaders that basically do the same thing but with a already defined number of vertices - this sounds a bit messy though.

Thanks!

• in openGL you can stop emitting primitives in the geom shader even when the amount of vertices is below the number specified in the output – ratchet freak Nov 16 '14 at 13:07
• Thanks! I tried this yesterday and didn't have any success because of another error - this is actually working now. Now I just need to check if it makes more sense to calculate the LOD for patches on the CPU or for each primitive in the geometry shader, guess I will try. – brdigi Nov 16 '14 at 15:14


text:
# Difference between revisions of "Chain rule for differentiation"

View other differentiation rules

## Statement for two functions

The chain rule is stated in many versions:

Version type Statement
specific point, named functions Suppose $f$ and $g$ are functions such that $g$ is differentiable at a point $x = x_0$, and $f$ is differentiable at $g(x_0)$. Then the composite $f \circ g$ is differentiable at $x_0$, and we have:
$\! \frac{d}{dx}[f(g(x))]|_{x = x_0} = f'(g(x_0))g'(x_0)$
generic point, named functions, point notation Suppose $f$ and $g$ are functions of one variable. Then, we have
$\! \frac{d}{dx}[f(g(x))] = f'(g(x))g'(x)$ wherever the right side expression makes sense.
generic point, named functions, point-free notation Suppose $f$ and $g$ are functions of one variable. Then,
$\! (f \circ g)' = (f' \circ g) \cdot g'$ where the right side expression makes sense, where $\cdot$ denotes the pointwise product of functions.
pure Leibniz notation Suppose $u = g(x)$ is a function of $x$ and $v = f(u)$ is a function of $u$. Then,
$\frac{dv}{dx} = \frac{dv}{du}\frac{du}{dx}$
MORE ON THE WAY THIS DEFINITION OR FACT IS PRESENTED: We first present the version that deals with a specific point (typically with a $\{ \}_0$ subscript) in the domain of the relevant functions, and then discuss the version that deals with a point that is free to move in the domain, by dropping the subscript. Why do we do this?
The purpose of the specific point version is to emphasize that the point is fixed for the duration of the definition, i.e., it does not move around while we are defining the construct or applying the fact. However, the definition or fact applies not just for a single point but for all points satisfying certain criteria, and thus we can get further interesting perspectives on it by varying the point we are considering. This is the purpose of the second, generic point version.

### One-sided version

A one-sided version of sorts holds, but we need to be careful, since we want the direction of differentiability of $f$ to be the same as the direction of approach of $g(x)$ to $g(x_0)$. The following are true:

Condition on $g$ at $x_0$ Condition on $f$ at $g(x_0)$ Conclusion
left differentiable at $x_0$ differentiable at $g(x_0)$ The left hand derivative of $f \circ g$ at $x_0$ is $f'(g(x_0))$ times the left hand derivative of $g$ at $x_0$.
right differentiable at $x_0 The right hand derivative of $f \circ g$ at $x_0$ is $f'(g(x_0))$ times the right hand derivative of $g$ at $x_0$.
left differentiable at $x_0$, and increasing for $x$ on the immediate left of $x_0$ left differentiable at $g(x_0)$ the left hand derivative is the left hand derivative of $f$ at $g(x_0)$ times the left hand derivative of $g$ at $x_0$.
right differentiable at $x_0$, and increasing for $x$ on the immediate right of $x_0$ right differentiable at $g(x_0)$ the right hand derivative is the right hand derivative of $f$ at $g(x_0)$ times the left hand derivative of $g$ at $x_0$.
left differentiable at $x_0$, and decreasing for $x$ on the immediate left of $x_0$ right differentiable at $g(x_0)$ the left hand derivative is the right hand derivative of $f$ at $g(x_0)$ times the left hand derivative of $g$ at $x_0$.
right differentiable at $x_0$, and decreasing for $x$ on the immediate right of $x_0$ left differentiable at $g(x_0)$ the right hand derivative is the left hand derivative of $f$ at $g(x_0)$ times the left hand derivative of $g$ at $x_0$.

## Statement for multiple functions

Suppose $f_1,f_2,\dots,f_n$ are functions. Then, the following is true wherever the right side makes sense:

$(f_1 \circ f_2 \circ f_3 \dots \circ f_n)' = (f_1' \circ f_2 \circ \dots \circ f_n) \cdot (f_2' \circ \dots \circ f_n) \cdot \dots \cdot (f_{n-1}' \circ f_n) \cdot f_n'$

For instance, in the case $n = 3$, we get:

$(f_1 \circ f_2 \circ f_3)' = (f_1' \circ f_2 \circ f_3) \cdot (f_2' \circ f_3) \cdot f_3'$

In point notation, this is:

$\! \frac{d}{dx}[f_1(f_2(f_3(x)))] = f_1'(f_2(f_3(x))f_2'(f_3(x))f_3'(x)$

## Reversal for integration

If a function is differentiated using the chain rule, then retrieving the original function from the derivative typically requires a method of integration called integration by u-substitution. Specifically, that method of integration targets expressions of the form:

$\int h(g(x))g'(x) \, dx$

The $u$-substitution idea is to set $u = g(x)$ and obtain:

$\int h(u) \, du$

We now need to find a function $f$ such that $f' = h$. The integral is $f(u) + C$. Plugging back $u = g(x)$, we obtain that the indefinite integral is $f(g(x)) + C$.

## Significance

### Qualitative and existential significance

Each of the versions has its own qualitative significance:

Version type Significance
specific point, named functions This tells us that if $g$ is differentiable at a point $x_0$ and $f$ is differentiable at $g(x_0)$, then $f \circ g$ is differentiable at $x_0$.
generic point, named functions, point notation If $g$ is a differentiable function and $f$ is a differentiable function on the intersection of its domain with the range of $g$, then $f \circ g$ is a differentiable function.
generic point, named functions, point-free notation We can deduce properties of $(f \circ g)'$ based on properties of $f',g',f,g$. In particular, if $f'$ and $g'$ are both continuous functions, so is $(f \circ g)'$. Another way of putting this is that if $f$ and $g$ are both continuously differentiable functions, so is $f \circ g$.

### Computational feasibility significance

Each of the versions has its own computational feasibility significance:

Version type Significance
specific point, named functions If we know the values (in the sense of numerical values) $g'(x_0)$ and $f'(g(x_0))$, we can use these to compute $(f \circ g)'(x_0)$.
generic point, named functions This tells us that knowledge of the general expressions for the derivatives of $f$ and $g$ (along with expressions for the functions themselves) allows us to compute the general expression for the derivative of $f \circ g$.

### Computational results significance

Shorthand Significance
significance of derivative being zero If $\! g'(x_0) = 0$, and $f$ is differentiable at $g(x_0)$, then $\! (f \circ g)'(x_0) = 0$. Note that the conclusion need not follow if $f$ is not differentiable at $g(x_0)$.
Also, if $\! f'(g(x_0)) = 0$ and $g$ is differentiable at $x_0$, then $(f \circ g)'(x_0) = 0$.
significance of sign of derivative The product of the signs of $\! f'(g(x_0))$ and $\! g'(x_0)$ gives the sign of $(f \circ g)'(x_0)$. In particular, if both have the same sign, then $(f \circ g)'$ is positive. If both have opposite signs, then $(f \circ g)'$ is negative. This is related to the idea that a composite of increasing functions is increasing, and similar ideas.
significance of uniform bounds on derivatives If $\! f'$ and $\! g'$ are uniformly bounded, then so is $(f \circ g)'$, with a possible uniform bound being the product of the uniform bounds for $\! f'$ and $\! g'$.

## Examples

### Trivial examples

We first consider examples where the chain rule for differentiation confirms something we already knew by other means:

Case on $f$ Case on $g$ $(f \circ g)'$ Direct justification, without using the chain rule Justification using the chain rule, i.e., by computing $(f' \circ g) \cdot g'$
a constant function any differentiable function zero function $f \circ g$ is a constant function, so its derivative is the zero function. By the chain rule, $(f \circ g)'(x) = f'(g(x))g'(x)$. $f$ being constant forces $f'(g(x))$ to be zero everywhere, hence the product $f'(g(x))g'(x)$ is also zero everywhere. Thus, $(f \circ g)'$ is also zero everywhere.
any differentiable function a constant function with value $k$ zero function $f \circ g$ is a constant function with value $f(k)$, so its derivative is the zero function. By the chain rule, $(f \circ g)'(x) = f'(g(x))g'(x)$. $g$ being constant forces that $g'(x) = 0$ everywhere, hence the product $f'(g(x))g'(x)$ is also zero everywhere. Thus, $(f \circ g)'$ is also zero everywhere.
the identity function, i.e., the function $x \mapsto x$ any differentiable function $\! g'$ $f \circ g = g$, so $(f \circ g)' = g'$. $(f \circ g)' = (f' \circ g) \cdot g'$. Since $f$ is the function $x \mapsto x$, its derivative is the function $x \mapsto 1$. Plugging this in, we get that $f' \circ g$ is also the constant function $x \mapsto 1$, so $(f \circ g)' = 1g' = g'$.
any differentiable function the identity function $\! f'$ $f \circ g = f$, so $(f \circ g)' = f'$. $(f \circ g)' = (f' \circ g) \cdot g'$. Since $g$ is the identity function, $g'$ is the function $x \mapsto 1$. Also, $f' \circ g = f'$. Thus, $(f \circ g)' = f' \cdot 1 = f'$.
the square function any differentiable function $\! x \mapsto 2g(x)g'(x)$ $f(g(x)) = (g(x))^2$ and hence its derivative can be computed using the product rule for differentiation. It comes out as $2g(x)g'(x)$. $(f \circ g)' = (f' \circ g) \cdot g'$. $f'$ is the derivative of the square function, and therefore is $x \mapsto 2x$. Thus, $\! f'(g(x)) = 2g(x)$. We thus get $(f \circ g)' = 2g(x)g'(x)$.

### Nontrivial examples

Here are some examples that cannot be computed using methods other than the chain rule:

Consider the sine of square function:

$x \mapsto \sin(x^2)$.

We use the chain rule for differentiation viewing the function as the composite of the square function on the inside and the sine function on the outside:

$\frac{d}{dx}[\sin(x^2)] = \frac{d(\sin(x^2))}{d(x^2)} \frac{d(x^2)}{dx} = (\cos(x^2))(2x) = 2x\cos(x^2)$