Articles

Lathrop Stat Text v2 - Mathematics


Lathrop Stat Text v2 - Mathematics

Introduction

This documentation is a reference for SugarCube, a free (gratis and libre) story format for Twine/Twee.

Tip: This document is a single page, so you may use your browser's find-in-page functionality— CTRL + F or F3 —to search for specific terms.

Note: If you believe that you've found a bug in SugarCube, or simply wish to make a suggestion, you may do so by creating a new issue at its source code repository.

Contributions to this documentation have been graciously made by:


Putting Math in Javascript Strings¶

If your are using javascript to process mathematics, and need to put a TeX or LaTeX expression in a string literal, you need to be aware that javascript uses the backslash ( ) as a special character in strings. Since TeX uses the backslash to indicate a macro name, you often need backslashes in your javascript strings. In order to achieve this, you must double all the backslashes that you want to have as part of your javascript string. For example,

This can be particularly confusing when you are using the LaTeX macro , which must both be doubled, as . So you would do


Monitor external disk¶

The disk have a disk with two partition /dev/sda1 and /dev/sda3 .

The command and regular expression will be the following:

  • sda1 disk size command : df -t ext2, regular expression: sda1s+(d+)
  • sda1 used space command : df -t ext2, regular expression: sda1s+d+s+(d+)
  • sda3 disk size command : df -t ext4, regular expression: sda3s+(d+)
  • sda3 used space command : df -t ext4, regular expression: sda3s+d+s+(d+)

First we need to configure the extraction of partitions sizes which are extracted once at RPi-Monitor startup. We will create a file /etc/rpimonitord.conf.d/custo.conf with the data configured as static data like this:

The post processing is configured to transform kB into MB by dividing the extracted result by 1024.

For dynamic values extracted every 10 seconds, the configuration will be:

Dynamic stat will be stored into a RRD File as GAUGE. Ref to RRDTool help for detail about Data Source Types.

Now we will add a status line for this disk whit the following icon:

This icons has to be installed into the img directory of RPi-Monitor which is by default /usr/share/rpimonitor/web/img/ .

The configuration to add a new status strip will then be the following:

The configuration may need some explanation:

We do configure 4 lines. Each line is describing a javascript line using some predefined functions: KMG, Precent and ProgressBar. This function are called by the browser while rendering the page. Some variable coming from the extracted data are also used. These variables are starting by the keyword data . For deeper detail about this configuration execute the command man rpimonitord.conf

To see our modification we need to restart RPi-Monitor and refresh the statistics page into our browser.

The result of the configuration is at the bottom of the following screenshot:

The status page is working, let’s now add a graphic of the disk usage. This is done with the following configuration:

The configuration may also need some explanation

We do configure 2 graphs each having 2 curves. The first curve represent the total and is using static data extracted previously. This curve will be represented as a light red line.

The second curve is representing the usage of disk and is represented as a light blue line filled. The parameters defining the curve are define by the keyword ds_graph_options. Details of this parameter can be found in javascriptrrd help page. Restart rpimonitor to activate the new graph.

After waiting a little time to let the system extract data you will see this kind of graph.


About the Contributors

Author

David Lippman received his master&rsquos degree in mathematics from Western Washington University and has been teaching at Pierce College since Fall 2000.

David has been a long time advocate of open learning, open materials, and basically any idea that will reduce the cost of education for students. It started by supporting the college&rsquos calculator rental program, and running a book loan scholarship program. Eventually the frustration with the escalating costs of commercial text books and the online homework systems that charged for access led to action.


Fast & Easy Digital Product Support

We’ve created a collection of tools and resources designed to make your life a whole lot easier. Whether it’s before, during, or every step beyond the first day of class – we've got you covered.

Interested in a Courseware Consult or Training?

Your Implementation Consultant is standing by. Fill out the form, and they’ll send you their scheduling tool.

A McGraw Hill Consultant is up-to-date with the latest features and tools, and can provide:

  • Help building course/creating assignments/policy settings
  • Training on how to implement McGraw Hill Digital Solutions
  • Recommendations for using data and reports to improve outcomes
  • Help with Adjusting your course to achieve your goals
  • And more

This form is for US Higher Education Faculty.
If you are a student in need of help click here.
If you are a faculty outside of the US click here.
If you are a US K-12 faculty click here.

Your information will be used to provide you with the requested information and other information about McGraw Hill’s products and services. You may opt out at any time by contacting McGraw Hill’s local privacy officer or selecting “unsubscribe” at the bottom of any email you receive from us.


  • DataMelt, or DMelt, is software for numeric computation, statistics, analysis of large data volumes ("big data") and scientific visualization. The program can be used in many areas, such as natural sciences, engineering, modeling and analysis of financial markets.
  • DMelt is a computational platform. It can be used with different programming languages on different operating systems. Unlike other statistical programs, it is not limited to a single programming language.
  • DMelt runs on the Java platform but can be used with the Python language too. Thus this software combines the world's most-popular enterprise language with the most popular scripting language used in data science.
  • DataMelt allows the usage of dynamically-typed languages which are significantly faster than the standard Python implemented in C. For example, DataMelt provides Groovy scripting which is a factor 10 faster than Python.
  • Python, Groovy, JRuby and Java programming can use more than 40,000 Java classes for numeric computation and scientific visualization. In addition, more than 4000 classes come with Java API, plus 500 native Python modules. Not to mention modules of Groovy and Ruby.
  • DMelt creates high-quality vector-graphics images (SVG, EPS, PDF etc.) that can be included in LaTeX and other text-processing systems.

DataMelt can be used with several scripting languages for the Java platform: Jython (Python programming language), Groovy, JRuby (Ruby programming language) and BeanShell. All scripting languages use common DataMelt JAVA API. Data analyses and statistical computations can be done in JAVA. Finally, symbolic calculations can be done using Matlab/Octave high-level interpreted language integrated with JAVA. Comparisons of performances of these languages are given here.


13.4 - Obtain Estimates of Canonical Correlation

Now that we rejected the hypotheses of independence, the next step is to obtain estimates of canonical correlation.

The estimated canonical correlations are found at the top of page 1 in the SAS output as shown below:

Canonical Correlation Analysis

Canonical
Correlation
Adjusted
Canonical
Correlation
Approximate
Standard
Error
Squared
Canonical
Correlation
1 0.994483 0.994021 0.001572 0.988996
2 0.878107 0.872097 0.032704 0.771071
3 0.383606 0.366795 0.121835 0.147153

The squared values of the canonical variate pairs, found in the last column, can be interpreted much in the same way as (r^<2>) values are interpreted.

We see that 98.9% of the variation in (U_<1>) is explained by the variation in (V_<1>), and 77.11% of the variation in (U_<2>) is explained by (V_<2>), but only 14.72% of the variation in (U_<3>) is explained by (V_<3>). These first two are very high canonical correlations and suggest that only the first two canonical correlations are important.

One can actually see this from the plots that SAS generates. The first canonical variate for sales is plotted against the first canonical variate for scores in the scatter plot for the first canonical variate pair:

Canonical Correlation Analysis - Sales Data

The regression line shows how well the data fits. The plot of the second canonical variate pair is a bit more scattered, but is still a reasonably good fit:

Canonical Correlation Analysis - Sales Data

A plot of the third pair would show little of the same kind of fit. We may refer to only the first two canonical variate pairs from this point on based on the observation that the third squared canonical correlation value is so small.


Sample problems

Time to test your knowledge. Let’s suppose you want to apply a product rate of 3 L/ha to your blueberries. You calibrate your sprayer and determine your output to be 50 L/ha. Your tank holds 400 L of spray mix. Your planting is 500 m long and 200 m wide.

Q1 – How large is the area you need to spray?

Q2 – How much product is needed to spray the area?

Q3- How much area can be sprayed on one tank?

Q4 – How much product should be added to a full tank?

Q5 – After the tank is empty, how much area is left to spray?

Q6 – How much product to add to the last, partially full tank?

Q7 – How much spray mix will be needed to finish spraying?

Don’t be intimidated. With a little practice, sprayer math gets easier and it’s always worthwhile. The real trick is navigating unit conversions.

Welcome!

This is one of over 2,400 courses on OCW. Explore materials for this course in the pages linked along the left.

MIT OpenCourseWare is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.

No enrollment or registration. Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.

Knowledge is your reward. Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.

Made for sharing. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)


Watch the video: Camping At Lathrop State Park - Walsenburg Colorado (December 2021).