text:
In our last post, we introduced neural networks and formulated some of the questions we want to explore over this series. We explained the underlying architecture, the basics of the algorithm, and showed how a simple neural network could approximate the results and parameters of a linear regression. In this post, we’ll show how a neural network can also approximate a logistic regression and extend our toy example.

What’s the motivation behind showing the link with logistic regression? If one accepts that investing is about assessing the probability of achieving an attractive risk-adjusted return, then it makes sense to model investment decisions as probability functions. The logistic function returns a binary probability. Indeed, the New York Fed publishes a recession probability model that predicts the likelihood of a recession in the next twelve months, using a function similar to a logistic regression. A recent search of Google scholar returned over 50,000 results for the terms stock price prediction and logistic regression.

Besides using a model that more closely approximates the decision process, another reason to use a logistic regression has to do with the structure of price and return data. It’s noisy. A linear regression may interpret that noise as meaningful, yielding too precise of an output. Is it more important to know whether next month’s return is likely to be 5.352% or 5.438%? Probably not. Rather, most practitioners would prefer to know whether next month’s return is likely to be positive and how confident they can be in that prediction. Magnitude and relative performance are important too. But you’ve got to get direction right first. Feel free to disagree.

Thus modeling potentially predictive features as a probability is likely to be more intuitive in many cases. How this works in practice is the following. The potentially explanatory variables are regressed to find the the log-odds ($$log(\frac{p}{1-p})$$) for some event. Then by the beauty of math, one transforms the log-odds into the logistic function ($$\frac{1}{1 + e^{-x}}$$) which yields a value between zero and one, the probability of the outcome. Don’t get too bogged down in why log-odds are used other than to note that it makes the math more tractable. See the Appendix after the code for more detail and how to derive the logistic function from the log-odds.

It just so happens that the logistic function, or sigmoid function as it is sometimes called1 is one of the activation functions used in neural networks. Recall, the $$\phi$$ from the last post that is used to transform the aggregated weights and biases from a layer of neurons into the desired output form? Sigmoid is one of those activation functions!2

How does this all relate to investing? Let’s go back to our data: the S&P 500 and the 10-month moving average. Given the month-end closing price and the moving average, what’s the probability the index will be positive in the next month? If you’re an Efficient Market acolyte, your answer is it’s random: could be positive, could be negative; but you’ve got no better than a coin flip’s chance in predicting what it will be. In many cases that’s true, but let’s look at the data to illustrate our investigation.

We’ll transform all of our data into returns and convert next month’s return into a [1,0] output to signify a positive or not positive return. Given that we’re dealing with probabilities, we’ll convert the results into a confusion matrix to see how well the logistic regression model performs. The table gives the number of outcomes in which the model predicted a positive or negative return in the next month vs. an actual positive or negative return.

Gazing at the figures in the second column, one can see that the logistic regression has an exceedingly high recall or true positive rate. In other words, of all the positive outcomes (the second column, or 133 + 5), how many did the model accurately predict (the lower right hand box, or 133)? Before, we discuss this and other useful metrics, we’ll run the neural network (NN) and look at its confusion matrix. This NN is a simple one just like before: no hidden layer, but with a sigmoid activation function.

Ok. Let’s compare the results.

ModelRecall/True positve rateFalse positve ratePrecision
Regression96.4%94.8%54.7%
Neural network100.0%99.1%54.5%

Wow! Look at that true positive rate. The logistic regression was awesome, but the neural network was flawless. Wait a second, look at the false positive rate. Atrocious! The false positive rate is essentially the flipside of the true negative rate, and corresponds to the first column in the tables above. It answers the question, out of all the negative outcomes, how many did model predict incorrectly? In this case, almost all of them! That doesn’t bode well for a good investing model. You don’t want to follow recommendations that tell you to get long when the opposite is likely happen, unless the magnitude of the return when the recommendations are right meaningfully offsets the times when they’re wrong.

Let’s discuss precision, or how often the model was correct when it predicted a positive return. Both models are slightly better than a coin flip, with a precision of around 55%. While that might seem pretty darn good in market lore—lots of traders say you only need to be right a bit more than 50% of the time to generate good returns—is it good enough? In our training set, we found that returns were positive 54.3% of the time. Naively predicting only positive returns wouldn’t be much worse than the models without getting a headache trying to figure out all the math. Clearly, the models don’t provide much more insight than using some rough averages.

Of course, our point is not to find the best predictive model; rather, to show the correspondence between a logistic regression and a simple neural network with a sigmoid activation function. A better model would seek to lower the false positive rate. But, as you data science/machine learning gurus know, there’s a trade-off between the true positive and false positive rate. One way to lower the false positive rate is with thresholding. That is, require a higher probability to predict a positive outcome. For example, since we know that returns are positive 54% of the time, we could require the logistic regression model to predict a positive return only if the regression probabilities exceed that number. In effect, only when the model is more confident than the base rate will we allow it to predict a positive return.

Employing thresholding yields the following confusion matrix.

Just eyeballing the numbers shows a more balanced output.

Thresholding for the NN is a little trickier. To explain why, we need to delve into what each algorithm is doing. The logistic regression calculates the coefficients of the independent variables to get as close as possible to the observed log-odds. Then for an observed input, it plugs the numbers into the equation, calculates the log-odds, transforms that into a probability, and if the probability is above 50%, outputs a $$1$$ for a positive outcome.

The neural network, on the other hand, takes the data, applies weights and a bias to that data, and then puts that result through an activation function. It assesses the quality of that by calculating a loss function of the actual vs. predicted values and then tries to minimize the loss by iteratively tweaking the weights and bias with respect to the loss function.

The methods practitioners use to generate a logistic regression3 is iterative like the NN. But the NN is trying to minimize whatever loss function4 you give it, while the logistic regression is trying maximize the likelihood of producing the observed probability. Same, same, but different.

If this all seems a bit arcane, no worries. Just know that since one is minimizing the loss, while the other is maximizing the odds, the probabilities won’t necessarily be the same even if the predictions are pretty close. Ultimately, we can get to a similar result as the logistic regression by changing the threshold a little bit,5 as shown below.

Now that we’ve established that we can arrive at similar predictions for both the logistic regression and the NN, let’s compare the two models. For a given input, what probability does each model ascribe to a positive outcome? As we’ve already intimated, the probabilities are not at all the same. In the chart below, we graph the logistic regression probabilities against the NN and include a $$45^o$$ line as a way to compare relative “confidence”.

The logistic regression is decidedly above the line, but more spread out than the NN, indicating more confidence but less precision in its results. In fact, the logistic regression probabilities are higher than the NN almost 90% of the time. Why should that be the case when the predictions are quite similar? Part of this is likely due to the activation function. The sigmoid function tends to push values toward 50%, so we can see most of the NN’s probabilities lie close to that value. The logistic regression pushes the regression coefficients to get as close to the log-odds, which, based on the positive return frequency, is a probability of around 54%. As one can see on the graph, 54% is the mid-range for the logistic regression. Critically, the graph shows why thresholding needs to be slightly lower for the NN to obtain similar predictions as the regression.

Does this mean that we should trust a NN more than a logistic regression? From a risk management perspective, it is perhaps better to employ a model that is relatively more uncertain when the predictions themselves aren’t that great in the first place. But this is probably overstated, as the differences in results seem to be heavily influenced by the idiosyncrasies of each model. Broadly speaking, should we ascribe more or less confidence or precision when the differentials are usually around five percentage points or less? Probably not. And even talking about confidence might be confusing a metaphor with reality. Who says you can’t anthropomorphize math!

Where does this leave us? We’ve shown the correspondence between a logistic regression and a neural network. Both can arrive at similar predictions even if they get there using different methods. In our example, both models were pretty abysmal. But we weren’t trying to build the perfect model. Although we only discussed binary events, both models can handle multi-class ones, albeit using different methods.

At this early stage, it’s still not clear that neural networks produce better results than traditional methods. They were both equally bad in this post! We can say, however, that neural networks have the flexibility to approximate some of the traditional regression techniques and we have yet to tap their full potential. Next time we’ll explore multi-class events and employ a deeper neural network. Until then, here’s the code:

 Built using R 4.0.3, and Python 3.8.3

# [R]
suppressPackageStartupMessages({
library(tidyverse)
library(tidyquant)
library(reticulate)
})

# [Python]
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import pandas as pd
import statsmodels.api as sm
import matplotlib
import matplotlib.pyplot as plt
import os
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = 'C:/Users/user_name/Anaconda3/Library/plugins/platforms'

plt.style.use('ggplot')
plt.rcParams['figure.figsize'] = (12,6)

# Directory to save images
# Most of the graphs are now imported as png. We've explained why in some cases that was necessary due to the way reticulate plays with Python. But we've also found that if we don't use pngs, the images don't get imported into the emails that go to subscribers.

DIR = "your/image/directory"

def save_fig_blog(fig_id, tight_layout=True, fig_extension="png", resolution=300):
path = os.path.join(DIR, fig_id + "." + fig_extension)
print("Saving figure", fig_id)
if tight_layout:
plt.tight_layout()
plt.savefig(path, format=fig_extension, dip=resolution)

## Plot sigmoid activation function
## Note: code developed from Hands-on Machine learning with Scikit-Learn, Keras, and Tensorflow
## Github source: https://github.com/ageron/handson-ml2/blob/master/11_training_deep_neural_networks.ipynb

def logit(x):
return 1/(1+np.exp(-x))

x = np.linspace(-5, 5, 200)

plt.plot([-5, 5], [0, 0], 'k-')
plt.plot([-5, 5], [1, 1], 'k--')
plt.plot([0, 0], [-0.2, 1.2], 'k-')
plt.plot([-5, 5], [-3/4, 7/4], 'r--')
plt.plot(x, logit(x), "b-", linewidth=2)
plt.annotate('The function: $\\frac{1}{1+e^{-x}}$', xy=(-4,0.7), fontsize=20)
plt.grid(True)
plt.title("Sigmoid activation function", fontsize=16)
plt.axis([-5, 5, -0.2, 1.2])

save_fig_blog("sig_func_tf2")
plt.show()

## Pull S&P data and process
start = '1970-01-01'
end = '2020-12-31'

sp = dr.DataReader('^GSPC', 'yahoo', start, end)

sp_mon.columns = ['close', '10ma']
sp_mon = sp_mon.rename(index = {'Date':'date'})

sp_mon['ret']= sp_mon['close'].pct_change()

sp_mon['1_mon'] = sp_mon['close'].shift(-1)

## Create train, valid, test split
data = sp_mon.dropna()

X_train = data.loc[:'1991', ['ret', '10ma_ret']]
y_train = data.loc[:'1991', '1_mon_ret']

X_valid = data.loc['1991':'2000', ['ret', '10ma_ret']]
y_valid = data.loc['1991':'2000', '1_mon_ret']

X_test = data.loc['2001':, ['ret', '10ma_ret']]
y_test = data.loc['2001':, '1_mon_ret']

y_train_log, y_valid_log, y_test_log = (y_train > 0).astype('int'), (y_valid > 0).astype('int'), (y_test > 0).astype('int')

## Run logistic regression
from sklearn.linear_model import LogisticRegression

log_reg = LogisticRegression(penalty='none')
log_reg.fit(X_train, y_train_log)
log_pred = log_reg.predict(X_train)
log_mse = np.mean((log_pred - y_train_log)**2)

## Create Neural network and run
keras.backend.clear_session()
np.random.seed(42)
tf.random.set_seed(42)

log_nn = keras.models.Sequential([
keras.layers.Dense(1, activation='sigmoid',input_shape = X_train.shape[1:])
])

log_nn.compile(loss='binary_crossentropy', optimizer='sgd')

log_hist = log_nn.fit(X_train, y_train_log, epochs = 20)

## Create confusion matrix function
from sklearn.metrics import confusion_matrix
from sklearn.metrics import precision_score, recall_score, roc_curve

def conf_mat_table(predicted, actual, title = 'Logistic regression', save=False, save_title = None, print_metrics=True):

conf_mat = confusion_matrix(y_true=predicted, y_pred=actual)

fig, ax = plt.subplots(figsize=(14,8))
ax.matshow(conf_mat, cmap=plt.cm.Blues, alpha=0.3)
for i in range(conf_mat.shape[0]):
for j in range(conf_mat.shape[1]):
ax.text(x=j, y=i, s=conf_mat[i, j], va='center', ha='center')

ax.xaxis.set_ticks_position('top')
ax.xaxis.set_label_position('top')
ax.set_xticklabels(['','Negative', 'Positive'])
ax.set_yticklabels(['', 'Negative', 'Positive'], rotation=90)
ax.set_xlabel('Actual returns', fontsize=12)
ax.set_ylabel('Predicted returns', fontsize=12)

plt.axhline(0.5, color='grey')
plt.axvline(0.5, color='grey')
plt.grid(False)
plt.title(title + ' confusion matrx', pad=30, fontsize = 14)

if save:
save_fig_blog(save_title)
plt.show()

if print_metrics:
fpr, tpr, _ = roc_curve(actual, predicted)
precision = precision_score(actual, predicted)
recall = recall_score(actual, predicted)

print("")
print(f'Precision = {precision*100:0.1f}%')
print(f'Recall = {recall*100:0.1f}%')
print(f'True Positive Rate = {tpr[1]*100:0.1f}%')
print(f'False Positive Rate = {fpr[1]*100:0.1f}%')

# confusion matrix for logistic regression
conf_mat_table(log_pred, y_train_log, save=True, save_title = 'log_reg_conf_tab_1_tf2')

# confusion matrix for NN
nn_pred = (log_nn.predict(X_train) >= y_train_log.mean()).astype('int').flatten()
conf_mat_table(nn_pred, y_train_log, title='Neural network', save=True, save_title = 'nn_conf_tab_1_tf2')

# confusion matrix for logistic regression with thresholding

# confusion matrix for NN with thresholding
nn_pred = (log_nn.predict(X_train) > 0.5125).astype('int').flatten()

# Graph logistic regression vs NN probabilities
log_prob = log_reg.predict_proba(X_train)[:,1]*100
nn_prob = log_nn.predict(X_train)*100
xs = np.linspace(48, 54,50)
ys = xs

plt.figure()
plt.plot(nn_prob, log_prob, 'bo')
plt.plot(xs, ys, 'r-.')
# plt.xlim([0.44,0.62])
# plt.ylim([0.44,0.62])
plt.ylabel('Logistic regression')
plt.xlabel('Neural network')
plt.title("Probabiliy of positive return: logistic regression vs. neural network")
save_fig_blog('log_reg_vs_nn_tf2')
plt.show()

## Appendix

We show how one can get from the log-odds to the logistic function. We won’t show how to generate the coefficients for the regression equation or why statisticians use log-odds. That’s beyond the scope of this post. For a quick overview of why log-odds see this discussion on stack exchange. We will explain the estimation process.

Here’s the regression equation.

$$log(\frac{p(x)}{1-p(x)}) = \beta_{0} + \Sigma\beta_{i}x_{i} + \epsilon$$

The idea is that one is trying to maximize the likelihood of getting as close as possible to the outcomes of a binary event: true or not true. Formally, that is $$p(X) = Pr(Y=1|X))$$, which stated in English is the probability that the outcome is true (or one) given X.

The coefficients for X, $$\beta_{0}$$ and $$\beta_{i}$$, are calculated using maximum likelihood estimation (MLE), which uses a likelihood function that yields a number close to one for all true outcomes and a number close to zero for all false. We know, we know, yet another undefined function! But in general the algorithm iterates through different values (not unlike the NN), until it finds ones that yield the closest approximation of the desired outcome. In other words, the coefficients generate the probability of true ($$p(x_{i})$$) and not true ($$1 – p(x_{i})$$), which we shorten to $$p$$ and $$1-p$$. Assuming you’ve made it this far, and haven’t been too distracted or confused by all our hand waving, we start with the log of the odds ($$\frac{p}{1-p}$$), below. Our derivation will likely seem inordinately verbose to the mathematically inclined, but it is meant to help those who don’t look at equations all day, every day follow each step.

$$log(\frac{p}{1-p}) = y$$

Exponentiate each side.
$$\frac{p}{1-p} = e^{y}$$

Perform some algebra.
$$p = (1-p)e^{y}$$
$$p = e^{y} – pe^{y}$$
$$p + pe^{y} = e^{y}$$
$$p(1 + e^{y}) = e^{y}$$
$$p = \frac{e^{y}}{1 + e^{y}}$$

We often see the next step omitted, which is fine if you speak math, but can be confusing for the rest of us. Note the $$e^{y}$$ in the numerator and denominator cancel each other.
$$p = \frac{e^{y}}{e^{y}(e^{-y} + 1)}$$

Finish with the logistic function.
$$p = \frac{1}{1+ e^{-y}}$$

Since:
$$y = \beta_{0} + \beta_{i}x_{i} + \epsilon$$

You can plug $$y$$ into the logistic function and get the probability based on the log-odds!

$$p = \frac{1}{1 + e^{-(\beta_{0} + \beta_{i}x_{i} + \epsilon)}}$$

1. There are, in fact, many sigmoid functions—hyperbolic tangent, error, and, our favorite, Gudermannian—called so because they all represent an S-shape.↩

2. The graph is derived from A. Geron’s wonderful github repo that supports his great book, “Hands-on Machine Learning with Scikit-Learn, Keras, and Tensorflow”.↩

3. As opposed to a non-linear least squares model, most statisticians use maximum likelihood estimation, which relies on a likelihood function that, lo and behold, is usually solved with numerical approximation, which is an iterative approach.↩

4. This could be mean-squared error or binary cross entropy.↩

5. We use a value slightly above 51% rather than one above 54% for the logistic function. This is due to the sigmoid activation function which tends to force values to cluster around its mean, which is 50%, as one can see from the sigmoid graph. Clearly, we’re torturing the data, but it’s all in good fun!↩


text:
# What test should I use to classify this series?

Classify $$\sum_{n=1}^\infty \frac{ x^2+\cos^n x}{n^2}$$ as absolutely convergent, conditionally convergent or divergent.

I am not sure whether I should use integral test or comparison test.

Do you know what's the best test to classify this series?

Note:

$$\left | \sum_{n=1}^\infty \frac{ x^2+\cos^n x}{n^2}\right | \le \sum_{n=1}^\infty \frac{|x^2+\cos^n{x}|}{n^2} \le \sum_{n=1}^\infty \frac{ x^2+1}{n^2} = (x^2+1) \frac{\pi^2}{6}$$

Therefore the sum is absolutely convergent for any finite value of $x$ by the comparison test. Thanks to @N.S. and @vadim123 for correcting and clarifying the reasoning here.

• $$\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$$ This is a well-known sum. Jun 11, 2013 at 2:21

format: plain


text:
# summation problem

• November 1st 2010, 01:56 PM
casey
summation problem
The problem is the summation of (n/(n+1)!) from n=1 to infinity.
any help that can be given is greatly appreciated!
• November 1st 2010, 02:10 PM
chisigma
Is...

$\displaystyle \frac{n}{(n+1)!}= \frac{n+1}{(n+1)!} - \frac{1}{(n+1)!}= \frac{1}{n!} - \frac{1}{(n+1)!}$ (1)

... so that...

$\displaystyle \sum_{n=1}^{\infty} \frac{n}{(n+1)!} = \sum_{n=1}^{\infty} \frac{1}{n!} - \sum_{n=1}^{\infty} \frac{1}{(n+1)!} = \sum_{n=1}^{\infty} \frac{1}{n!} - \sum_{n=2}^{\infty} \frac{1}{n!} = 1$ (2)

Kind regards

$\chi$ $\sigma$
• November 1st 2010, 02:24 PM
casey
sorry I have not done a summation in a long time but how do you know that the summation of 1/n! from one to infinity minus the summation of 1/n! from 2 to infinity is 1?
thanks so much for the help
• November 1st 2010, 02:26 PM
mr fantastic
Quote:

Originally Posted by casey
sorry I have not done a summation in a long time but how do you know that the summation of 1/n! from one to infinity minus the summation of 1/n! from 2 to infinity is 1?
thanks so much for the help

Write out the first few terms and simplify.


text:
# Application of resistors in parallel

## Different Types of Resistors and its Applications

Capacitors in parallel В» Capacitor Guide. Wave Applications DCIs - High School; Force and The first step is to simplify the circuit by replacing the two parallel resistors with a single resistor with an, Practical Electronics/Resistors. This is made up of two resistors in parallel, in series with another resistor. A common application like this is when an LED.

### Transistors in parallel Electrical Engineering Stack

Capacitors in parallel В» Capacitor Guide. The panel measures the two 500 ohm resistors (R1 and R2) in series with the alarm and tamper contacts in their normal state. Added together, the two 500 ohm resistors are seen as 1k ohms (1,000 ohms) вЂ¦, Part 3 Application. We have spent three lectures hacking on about what and why resistors and& resistive circuits in two connection schemes are used, (i.e. series and.

Resistors in Circuits. discuss ion; Follow the rules for parallel circuits. These last two tasks are so tedious you should use a spreadsheet application of For example, a 10 ohm resistor connected in parallel with a 5 ohm resistor and a 15 ohm resistor produces 1 / 1/10 + 1/5 + 1/15 ohms of resistance, or 30 / 11 = 2.727 ohms. A resistor network that is a combination of parallel and series connections can be broken up вЂ¦

Practical Electronics/Resistors. This is made up of two resistors in parallel, in series with another resistor. A common application like this is when an LED We use resistors in parallel and series too, to get the exact value needed for a given application. We also use resistors in parallel in the bias circuit for RF

In National 4 Physics learn how the operation of switches and variable resistors allow us to control real circuits in the appliances around us. 2010-12-22В В· ive got a program so far that calculates resistors in series. a user enters a value and how many resistors they wish to use and the program returns va

ZingPath: Capacitors and Resistors Applications of Ohm s Law on Closed Circuits. Compare the equivalent resistance of circuits in parallel and in a series. Thus, as far as the battery that is pumping the charge is concerned, the presence of two 4-О© resistors in parallel would be equivalent to having one 2-О© resistor in the circuit. In the same manner, the presence of two 6-О© resistors in parallel would be equivalent to having one 3-О© resistor in the circuit.

N resistors in parallel. Markings Power Rating Series and Parallel Resistors Example Applications Purchasing Resistors Resources and The equivalent resistance of several resistors in parallel is given by: The current through each resistor is given by: To quickly calculate the equivalent resistance value of two resistors in parallel, you can use the parallel resistor calculator. example A circuit designer needs to install a resistor with 9 ohms and can choose from the E-12 series of preferred values(.., 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, ..).

2008-07-19В В· What is the real life application of resistors with both parallel and series circuits? circuit with series-parallel resistor combinations combining resistors in parallel eliminates application of wye-delta transformation

2018-06-11В В· Need to know how to calculate series resistance, parallel resistance, Remember, when resistors are in parallel, there are many different means to an end, My professor has mentioned some uses of series and parallel circuits. So by using 5 0.25 W resistors in parallel, Web Applications;

Learn how to calculate capacitors in parallel and what are the most interesting applications. Home / Power Resistor Applications. Such resistors are generally arrays of carbon composition resistors connected in parallel between two plates.

How to detect if resistors are in parallel or then the resistors are in parallel. my professor who left academia as a reference in my PhD application? Practical Electronics/Resistors. This is made up of two resistors in parallel, in series with another resistor. A common application like this is when an LED

NXP also have a similar Application Note AN11358: Parallel Schottkys as secondary rectifiers in flyback adapter. Diode Matching Paralleling Diodes with Resistors. NXP also have a similar Application Note AN11358: Parallel Schottkys as secondary rectifiers in flyback adapter. Diode Matching Paralleling Diodes with Resistors.

### why do they put resistors in parallel? Yahoo Answers

Relative error of equivalent resistance of resistors in. Connecting two resistors in series results in a higher resistance than when you connect the same two resistors in parallel. To prevent the resistor Applications, Understanding Resistors Part 3: the rating is than the circuit application re- must use a combination of resistors in parallel or series to obtain the needed.

21.1 Resistors in Series and Parallel вЂ“ College Physics. Some practical applications in sensors are demonstrated. From the lesson. Module 2. The topic of this problem is series and parallel resistors and what we're, N resistors in parallel. Markings Power Rating Series and Parallel Resistors Example Applications Purchasing Resistors Resources and.

### Electronics Blog Paralleling Diodes with Resistors

VBA how do i calculate resistors in parallel MrExcel. Resistors are used in electronic circuit, where they can be used in series or parallel. For information about resistors in series, their behavior, calculations and circuit applications, please visit: Resistors in series For information about resistors connected in parallel, their behavior, calculations and circuit applications, please visit: Resistors in parallel https://en.m.wikipedia.org/wiki/Bridged_and_paralleled_amplifiers DC Circuits. RESISTORS IN PARALLEL. Question. In the following schematic diagram, find the total current, I. Figure 1 Example Problem: Resistors in Parallel.

Second one is the parallel circuit of 3 resistors and a voltage source. Application of Voltage in Parallel. House hold appliances. Lighting circuits. Power ring. I just saw a formula in my book for relative error in equivalent resistance of two resistors connected in parallel. $\frac{\Delta R}{R^2} = \frac{\Delta R_1}{R_1^2 For an application where you need to parallel transistors and control current in a linear fashion (not switching the transistors fully on and off), BJTs are your best bet. As Olin Lathrop says, the circuit will need to have resistors in series with the BJT emitters to help balance current. Get an idea about current calculation and applications of resistors in parallel connection. Here, the potential difference across each resistor is same. What are вЂњSeriesвЂќ and вЂњParallelвЂќ Circuits? but they are not often found in practical applications. Note that all resistors as well as the battery are DC Circuits. RESISTORS IN PARALLEL. Question. In the following schematic diagram, find the total current, I. Figure 1 Example Problem: Resistors in Parallel Calculations in Series & Parallel Resistor Networks. Components, including resistors in a circuit may be connected together in two ways: IN SERIES, so that the same Electronics Tutorial about Resistors in Parallel with Parallel Resistors Connected Together and Resistors in It is suited to applications needing low energy Resistors in Series and Parallel. Draw a circuit with resistors in parallel and in series. since it is found in many applications. For example, a 10 ohm resistor connected in parallel with a 5 ohm resistor and a 15 ohm resistor produces 1 / 1/10 + 1/5 + 1/15 ohms of resistance, or 30 / 11 = 2.727 ohms. A resistor network that is a combination of parallel and series connections can be broken up вЂ¦ 2015-03-31В В· How do you analyze a circuit with resistors in series and parallel configurations? With the Break It Down-Build It Up Method! http://www.jesseleemason.com 2010-12-22В В· ive got a program so far that calculates resistors in series. a user enters a value and how many resistors they wish to use and the program returns va Second one is the parallel circuit of 3 resistors and a voltage source. Application of Voltage in Parallel. House hold appliances. Lighting circuits. Power ring. Wave Applications DCIs - High School; Force and The first step is to simplify the circuit by replacing the two parallel resistors with a single resistor with an The panel measures the two 500 ohm resistors (R1 and R2) in series with the alarm and tamper contacts in their normal state. Added together, the two 500 ohm resistors are seen as 1k ohms (1,000 ohms) вЂ¦ Electronics Tutorial about Resistors in Series and Parallel Circuits, Resistors in Series and Parallel. Resistors can be It is suited to applications Designers use a special formula for calculating the total resistance value of resistors in parallel. on computer applications of a Series & Parallel Electronics Tutorial about Resistors in Series and Parallel Circuits, Resistors in Series and Parallel. Resistors can be It is suited to applications A series circuit with a voltage source (such as a battery, or in this case a cell) and 3 resistors. Components of an electrical circuit or electronic circuit can be connected in many different ways. The two simplest of these are called series and parallel and occur frequently. 2010-12-22В В· ive got a program so far that calculates resistors in series. a user enters a value and how many resistors they wish to use and the program returns va What are вЂњSeriesвЂќ and вЂњParallelвЂќ Circuits? but they are not often found in practical applications. Note that all resistors as well as the battery are For example, a 10 ohm resistor connected in parallel with a 5 ohm resistor and a 15 ohm resistor produces 1 / 1/10 + 1/5 + 1/15 ohms of resistance, or 30 / 11 = 2.727 ohms. A resistor network that is a combination of parallel and series connections can be broken up вЂ¦ ## Applications Of Series And Parallel Circuits Unique Ncert Applications of series and parallel circuits bbc.com. Part 3 Application. We have spent three lectures hacking on about what and why resistors and& resistive circuits in two connection schemes are used, (i.e. series and, Why Parallel Connection is Mostly Preferred over Series Connection? The use, application and importance of series and parallel circuit connection today cannot be over. ### Parallel Resistance Calculator Electrical Engineering Resistors in parallel LinkedIn. Explore the relationship between multiple resistors connected in parallel. Learn how connecting resistors in parallel affects an applications engineer and, What are вЂњSeriesвЂќ and вЂњParallelвЂќ Circuits? but they are not often found in practical applications. Note that all resistors as well as the battery are. Get an idea about current calculation and applications of resistors in parallel connection. Here, the potential difference across each resistor is same. I just saw a formula in my book for relative error in equivalent resistance of two resistors connected in parallel.$\frac{\Delta R}{R^2} = \frac{\Delta R_1}{R_1^2

RESISTORS FOR HIGH VOLTAGE APPLICATIONS вЂў Voltage balancing resistors a leakage resistance connected in parallel with the capacitor. Designing with Resistors in Series or the equivalent resistors in series or parallel. low versus the application voltage. By having the resistors in

I just saw a formula in my book for relative error in equivalent resistance of two resistors connected in parallel. $\frac{\Delta R}{R^2} = \frac{\Delta R_1}{R_1^2 Calculations in Series & Parallel Resistor Networks. Components, including resistors in a circuit may be connected together in two ways: IN SERIES, so that the same Resistors for Power Supply Applications IRC is the leading specialist in a parallel group of HEXFET Power MOSFETs will be distributed Get an idea about current calculation and applications of resistors in parallel connection. Here, the potential difference across each resistor is same. Electronics Tutorial about Resistors in Series and Parallel Circuits, Resistors in Series and Parallel. Resistors can be It is suited to applications Wave Applications DCIs - High School; Force and The first step is to simplify the circuit by replacing the two parallel resistors with a single resistor with an Resistors for Power Supply Applications IRC is the leading specialist in a parallel group of HEXFET Power MOSFETs will be distributed Exp 2. Abstract - Download as Word 042 KО©. depending on the application[3] (Fig. Comparison of theoretical and measured resistance of resistors in parallel.88%. Electronics Tutorial about Resistors in Parallel with Parallel Resistors Connected Together and Resistors in It is suited to applications needing low energy Electronics Tutorial about Resistors in Parallel with Parallel Resistors Connected Together and Resistors in It is suited to applications needing low energy My professor has mentioned some uses of series and parallel circuits. So by using 5 0.25 W resistors in parallel, Web Applications; We use resistors in parallel and series too, to get the exact value needed for a given application. We also use resistors in parallel in the bias circuit for RF Get an idea about current calculation and applications of resistors in parallel connection. Here, the potential difference across each resistor is same. 2011-11-05В В· Best Answer: Precision resistors are connected in parallel for precise current division in certain test instruments. Resistors are also connected in parallel in For an application where you need to parallel transistors and control current in a linear fashion (not switching the transistors fully on and off), BJTs are your best bet. As Olin Lathrop says, the circuit will need to have resistors in series with the BJT emitters to help balance current. Why Parallel Connection is Mostly Preferred over Series Connection? The use, application and importance of series and parallel circuit connection today cannot be over Series and Parallel Circuits a learn.sparkfun.com tutorial Rules of Thumb for Series and Parallel Resistors Series and Parallel Capacitors Experiment Time - Part 3 Get an idea about current calculation and applications of resistors in parallel connection. Here, the potential difference across each resistor is same. 2015-03-31В В· How do you analyze a circuit with resistors in series and parallel configurations? With the Break It Down-Build It Up Method! http://www.jesseleemason.com 2008-07-19В В· What is the real life application of resistors with both parallel and series circuits? Resistors can be connected in series connection alone or in parallel connection alone. Some resistor circuits are made from combination of series and parallel ZingPath: Capacitors and Resistors Applications of Ohm s Law on Closed Circuits. Compare the equivalent resistance of circuits in parallel and in a series. Consider two resistors connected in parallel, as shown in Fig. 19. It is clear, from the figure, that the potential drop across the two resistors is the same. In general, however, the currents and which flow through resistors and , respectively, are different. More than 2 Elements in series or parallel. Here we provide the equations for calculating the equivalant resistance of three or more resistors in parallel; the same Understanding Resistors Part 3: the rating is than the circuit application re- must use a combination of resistors in parallel or series to obtain the needed The equivalent resistance of several resistors in parallel is given by: The current through each resistor is given by: To quickly calculate the equivalent resistance value of two resistors in parallel, you can use the parallel resistor calculator. example A circuit designer needs to install a resistor with 9 ohms and can choose from the E-12 series of preferred values(.., 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, ..). My professor has mentioned some uses of series and parallel circuits. So by using 5 0.25 W resistors in parallel, Web Applications; 2018-06-11В В· Need to know how to calculate series resistance, parallel resistance, Remember, when resistors are in parallel, there are many different means to an end, Resistors for Power Supply Applications IRC is the leading specialist in a parallel group of HEXFET Power MOSFETs will be distributed We use resistors in parallel and series too, to get the exact value needed for a given application. We also use resistors in parallel in the bias circuit for RF 15.5 Applications of Draw a circuit with resistors in parallel and Contrast the way total resistance is calculated for resistors in series and in parallel. Here are ten of practical applications you can model a potentiometer as two resistors you can connect a resistor in series or in parallel to a device In National 4 Physics learn how the operation of switches and variable resistors allow us to control real circuits in the appliances around us. RESISTORS FOR HIGH VOLTAGE APPLICATIONS вЂў Voltage balancing resistors a leakage resistance connected in parallel with the capacitor. Understanding Resistors Part 3: the rating is than the circuit application re- must use a combination of resistors in parallel or series to obtain the needed Resistors for Power Supply Applications IRC is the leading specialist in a parallel group of HEXFET Power MOSFETs will be distributed ZingPath: Capacitors and Resistors Applications of Ohm s Law on Closed Circuits. Compare the equivalent resistance of circuits in parallel and in a series. Explore the relationship between multiple resistors connected in parallel. Learn how connecting resistors in parallel affects an applications engineer and ### Parallel Resistance Calculator Electrical Engineering Introduction to Series Parallel and Series-Parallel. Consider two resistors connected in parallel, as shown in Fig. 19. It is clear, from the figure, that the potential drop across the two resistors is the same. In general, however, the currents and which flow through resistors and , respectively, are different., Here are ten of practical applications you can model a potentiometer as two resistors you can connect a resistor in series or in parallel to a device. The Use of a Series & Parallel Circuit Connection Sciencing. Resistors for Power Supply Applications IRC is the leading specialist in a parallel group of HEXFET Power MOSFETs will be distributed, BRAKING RESISTOR DESIGNS AND APPLICATIONS. Markets. are connected in parallel which means fitting a fan doubles the useable power and some resistors actually. ### Resistors in Circuits Practice вЂ“ The Physics Hypertextbook Applications Of Series And Parallel Circuits Unique Ncert. Learn how to calculate capacitors in parallel and what are the most interesting applications. https://en.m.wikipedia.org/wiki/LED_power_sources The most basic passive component, the resistor, may seem like simple components with few applications, but resistors have a wide range of applications form factors. • What are some uses of series and parallel circuits • Resistors and Capacitors in Parallel вЂ” Department of • Resistors In Series And Parallel Combinations Physics • Electronics Tutorial about Resistors in Series and Parallel Circuits, Resistors in Series and Parallel. Resistors can be It is suited to applications 2010-12-22В В· ive got a program so far that calculates resistors in series. a user enters a value and how many resistors they wish to use and the program returns va 2018-06-22В В· Applications Of Series And Parallel Circuits Unique Ncert Class 10 Science Lab Manual Resistors In Parallel Cbse Tuts. This wonderful picture collections DC Circuits. RESISTORS IN PARALLEL. Question. In the following schematic diagram, find the total current, I. Figure 1 Example Problem: Resistors in Parallel KOA explains the various applications of resistors. Select Your Region Resistors of 10 to 33 ohm are used in parallel in signal wire to adjust Connecting two resistors in series results in a higher resistance than when you connect the same two resistors in parallel. To prevent the resistor Applications Second one is the parallel circuit of 3 resistors and a voltage source. Application of Voltage in Parallel. House hold appliances. Lighting circuits. Power ring. Connecting two resistors in series results in a higher resistance than when you connect the same two resistors in parallel. To prevent the resistor Applications Resistors in Series vs. Parallel. the current flowing through the resistors is the same; however, each resistor has different voltage across it. Application 2018-06-11В В· Need to know how to calculate series resistance, parallel resistance, Remember, when resistors are in parallel, there are many different means to an end, Here are ten of practical applications you can model a potentiometer as two resistors you can connect a resistor in series or in parallel to a device How to detect if resistors are in parallel or then the resistors are in parallel. my professor who left academia as a reference in my PhD application? Resistors in Series and Parallel. Draw a circuit with resistors in parallel and in series. since it is found in many applications. 2015-03-31В В· How do you analyze a circuit with resistors in series and parallel configurations? With the Break It Down-Build It Up Method! http://www.jesseleemason.com The panel measures the two 500 ohm resistors (R1 and R2) in series with the alarm and tamper contacts in their normal state. Added together, the two 500 ohm resistors are seen as 1k ohms (1,000 ohms) вЂ¦ Wave Applications DCIs - High School; Force and The first step is to simplify the circuit by replacing the two parallel resistors with a single resistor with an We use resistors in parallel and series too, to get the exact value needed for a given application. We also use resistors in parallel in the bias circuit for RF ZingPath: Capacitors and Resistors Applications of Ohm s Law on Closed Circuits. Compare the equivalent resistance of circuits in parallel and in a series. Understanding Resistors Part 3: the rating is than the circuit application re- must use a combination of resistors in parallel or series to obtain the needed circuit with series-parallel resistor combinations combining resistors in parallel eliminates application of wye-delta transformation I just saw a formula in my book for relative error in equivalent resistance of two resistors connected in parallel.$\frac{\Delta R}{R^2} = \frac{\Delta R_1}{R_1^2 DC Circuits. RESISTORS IN PARALLEL. Question. In the following schematic diagram, find the total current, I. Figure 1 Example Problem: Resistors in Parallel

Resistors in Series and Parallel. Draw a circuit with resistors in parallel and in series. since it is found in many applications. circuit with series-parallel resistor combinations combining resistors in parallel eliminates application of wye-delta transformation

15.5 Applications of Draw a circuit with resistors in parallel and Contrast the way total resistance is calculated for resistors in series and in parallel. Electronics Tutorial about Resistors in Parallel with Parallel Resistors Connected Together and Resistors in It is suited to applications needing low energy

In National 4 Physics learn how the operation of switches and variable resistors allow us to control real circuits in the appliances around us. Resistors in Parallel. shows resistors in parallel, wired to a voltage source. Resistors are in parallel when each resistor is connected directly to the voltage source by connecting wires having negligible resistance. Each resistor thus has the full voltage of the source applied to it.

circuit with series-parallel resistor combinations combining resistors in parallel eliminates application of wye-delta transformation 15.5 Applications of Draw a circuit with resistors in parallel and Contrast the way total resistance is calculated for resistors in series and in parallel.

This article discusses about the different types of resistors and its applications like linear, nonlinear, fixed, led arrangement, variable, adjustable, etc Designing with Resistors in Series or the equivalent resistors in series or parallel. low versus the application voltage. By having the resistors in

Understanding Resistors Part 3: the rating is than the circuit application re- must use a combination of resistors in parallel or series to obtain the needed How to detect if resistors are in parallel or then the resistors are in parallel. my professor who left academia as a reference in my PhD application?

Part 3 Application. We have spent three lectures hacking on about what and why resistors and& resistive circuits in two connection schemes are used, (i.e. series and How to detect if resistors are in parallel or then the resistors are in parallel. my professor who left academia as a reference in my PhD application?

N resistors in parallel. Markings Power Rating Series and Parallel Resistors Example Applications Purchasing Resistors Resources and Second one is the parallel circuit of 3 resistors and a voltage source. Application of Voltage in Parallel. House hold appliances. Lighting circuits. Power ring.

This article discusses about the different types of resistors and its applications like linear, nonlinear, fixed, led arrangement, variable, adjustable, etc Which Bulb Glows Brighter When Connected in Series and Parallel & Why? Resistor & Types of Resistors Application/Uses of Wire Wound Resistors

Connecting two resistors in series results in a higher resistance than when you connect the same two resistors in parallel. To prevent the resistor Applications Introduction . In this final section we examine the frequency response of circuits containing resistors and capacitors in parallel combinations.


text:
Question about (complex) motion of Moon

In an ideal situation, we can use a simple formula to determine the velocity at which a body revolves around a massive body at a particular distance. I was wondering if there is an intuitive way to understand the motion of a body influenced by two other massive bodies (say the moon being influenced by the earth and the Sun). Is there any analogy to the motion of a wheel that can be considered as a combination as translational and rotational motion (and both these motions can be mathematically treated separately)? Or do we need a simulator to visualize the actual path?

-
For sufficiently distance objects you should be able to use the center of mass of the 2-body system. –  Brandon Enright May 8 '14 at 14:51

I was wondering if there is an intuitive way to understand the motion of a body influenced by two other massive bodies (say the moon being influenced by the earth and the Sun .

No, intuition is not of real use in a three body gravitational problem, more so in many body.

In 1887, mathematicians Ernst Bruns [4] and Henri Poincaré showed that there is no general analytical solution for the three-body problem given by algebraic expressions and integrals. The motion of three bodies is generally non-repeating, except in special cases.[5]

Actually the motions of the planets are studied as possible dynamic chaos.

Planetaria solve the many body problem with numerical approximations.

-

Because there's a clear hierarchy of masses (the moon is much lighter than the earth, is much lighter than the sun), there are a few useful approximations we can make. Here are some, roughly from big effects to little effects.

• The earth-moon system (whose barycenter is within the earth) orbits the sun on an ellipse, passing through perihelion in January. The plane of this ellipse is the ecliptic.

• The moon orbits the earth on an ellipse tilted at about 5º from the ecliptic.

• The plane of the moon-earth orbit changes direction with respect to the ecliptic ("precession of nodes"). This is pretty fast: in 2010 we had eclipses in June-ish and December-ish, while in 2014 we have eclipses in April-ish and October-ish. A shift in the nodes by two months in four years gives roughly 24 years for the plane of the moon's orbit to wobble all the way back to its starting point.

• The direction of the moon's perigee changes from year to year. Also there's a pretty big difference in perigee differences month-to-month.

• The moon undergoes libration. The rate of the Moon's spin around its axis is quite stable, while the moon's revolution around the earth is faster near perigee than near apogee. This means that the moon appears to "turn" slightly in its orbit, not quite presenting always the same face.

-

First of all, you have to be familiar with uniform circular motion (UCM) and the law of universal gravitation. $$\Sigma F=ma$$$$G\frac{m_1m_2}{r^2}=m_1\frac{v^2}{r}$$where $G$ is the gravitational constant, or $6.67\times10^{-11}$, $r$ is the distance between the centers of the two bodies, v is the velocity, and $m_1$ and $m_2$ are the masses of the two bodies ($m_1$ is orbiting $m_2$). By the rules of UCM, $$v=\frac{2\pi r}{T}$$where $T$ is the time it takes for one orbit. By substituting $v$ into the equation, you will get $$G\frac{m_1m_2}{r^2}=m_1\frac{4\pi^2r}{T^2}$$Rearrange this to get $$\frac{T^2}{r^3}=\frac{4\pi^2}{Gm_2}$$Just use this equation to solve for $T$, then plug it into $$v=\frac{2\pi r}{T}$$to find the value of $v$. Hope this helped! (from Giancoli Physics 6th edition)

-


text:
Expii

# Dividing Complex Numbers - Expii

To divide a+bi by c+di, just "rationalize the denominator" by multiplying the fraction by (c-di)/(c-di), where c-di is the conjugate of c+di.


text:
# What is the exact statement about uniform boundedness of rational points on curves of genus greater than one? Singular points can be unbounded

According to several sources, it is conjectured (or at least believed) that the rational points of curves over the rationals of genus $g > 1$ are uniformly bounded by $g$. E.g. here p. 1.

Assuming the curve is irreducible, the singular points (which are also rational) can easily be made unbounded for fixed $g > 1$.

For natural $n$, define $j(n)=\prod_{i=1}^n(x-i)$.

Consider the curve $C_n : j(n)^2(x^5+13)=y^2$.

It birationally equivalent to $x'^5+13=y'^2$ which is genus $2$.

$C_n$ has the rational (singular) points $(1,0),(2,0),\ldots(n,0)$ which are unbounded, since $n$ is unbounded.

The same applies for $2$ replaced by integer $d>1$.

For $d > 2$ the curve need not be hyperelliptic.

Q. What is the exact statement about uniform boundedness?

According to both sage and magma, $C_n$ is irreducible for small values of $n$.

• Yes, you can take any number of Galois orbits of closed points and form a coproduct to turn those Galois orbits into highly singular rational points. So there is no bound on rational points on a singular curve of fixed geometric genus. However, the arithmetic genus of that curve grows as the number of singular points. So if you want a boundedness result for singular curves, you should work with the arithmetic genus. – Jason Starr Nov 18 '15 at 12:14
• @JasonStarr What is a reference for this? I will give my references. Believe they definitely mean geometric genus by "genus". – joro Nov 18 '15 at 12:29
• The geometric genus equals the arithmetic genus for smooth curves. For singular curves, as your example illustrates, it is absurd to ask for a bound only in terms of the geometric genus. Since the arithmetic genus is at least as large as the geometric genus, and also it is at least as large as the length of the singular locus, any uniform bound on rational points of smooth curves of geometric genus $\leq g$ implies a uniform bound on rational points of singular curves of arithmetic genus $\leq g$. – Jason Starr Nov 18 '15 at 12:39

The precise statement of the conjecture is:

Uniformity Conjecture. Let $K$ be a number field and $g\geq2$ an integer. There exists a number $B(K,g)$ such that for any smooth curve $X$ of genus $g$ defined over $K$

$$|X(K)|\leq B(K,g)$$

and the original reference for it is:

The conjecture refers indeed to geometric genus, following Faltings early results on finiteness of rational points.

Also note (here of example) that this can be proved conditionally on Lang's conjecture.

• Thanks. Does your second reference misses smooth by mistake (on the first page)? – joro Nov 18 '15 at 13:27
• In Corollary 1.2 they write "any curve $C$ of genus $g$", assuming Lang's conjecture. – joro Nov 18 '15 at 13:33
• @joro Yes, I agree it is a bit confusing. In paragraph 3 they make clear that their result holds for "all smooth curves", but they don't mention it on the statement of theorem 1.1 and corollary 1.2. But they definitely mean smooth. – Myshkin Nov 18 '15 at 13:39
• Indeed, I believe theorem/corollary takes precedence over comments. – joro Nov 18 '15 at 14:35
• Patricia L. Pacelli, Uniform boundedness for rational points, Duke Math. J. 88 (1997), no. 1, 77–102, shows (under the same assumption of Lang's conjecture) that the bound would depend on the field $K$ only through its degree $[K : {\mathbb Q}]$. – Michael Stoll Nov 18 '15 at 17:52


text:
# Compensating for multispan boxes wider than spanned columns

The code below produces a horizontal alignment with two columns and three lines (see first image below). The first column has its elements flush right and the second column has its elements flush left. The first line spans two columns so that its natural width is more than the total natural widths of the two columns. As a result the elements in the second column make up for the difference. My question is if it is possible to have the first column make up for the difference instead (see second image below).

\everycr{\noalign{\hrule}}%
\tabskip=0em
\halign{%
\vrule#&
\enskip\hrulefill\strut#\strut&
\strut#\strut\hrulefill\enskip&
\vrule#%
\cr
&\omit\span\omit
\enskip\hfil
\strut{\bf Quantity}\strut
\enskip\hfil&
\cr
& 1&~litre&
\cr
&10&~pcs&
\cr}
\bye

• When n columns are spanned, the first n–1 column widths are set with respect to the non spanned cells and the excess, if any, goes to to the last column. That's how \halign works, so the answer is no. – egreg Nov 1 '14 at 20:15
• Did you read my answer? – egreg Nov 1 '14 at 20:59

On page 245 of the TeXbook, it is explained how the widths of columns are computed when some cells in them are spanned. The explanation ends with this note:

These formulas usually work fine, but sometimes they produce undesirable effects. For example, suppose that n = 3, w11 = w22 = w33 = 10, w12 = w23 = −∞, and w13 = 100; in other words, the columns by themselves are quite narrow, but there’s a big wide entry that’s supposed to span all three columns. In this case TeX’s formula makes w1 = w2 = 10 but w3 = 80 – t1t2, so all the excess width is allocated to the third column. If that’s not what you want, the remedy is to use \hidewidth, or to increase the natural width of the tabskip glue between columns.

So there's no way for automatically transfer the excess width in the first column, because the above behavior is built in.

You need to give \halign a bit of encouragement to put at least half the width in each column.

(you should stop the doubled hrule as well, not done here)

\everycr{\noalign{\hrule}}%
\tabskip=0em
\setbox0\hbox{\bf Quantity}

\halign{%
\vrule#&
\enskip\hrulefill\strut#\strut&
\strut#\strut\hrulefill\enskip&
\vrule#%
\cr
\omit&\omit\enskip\kern.5\wd0\relax&\omit\kern.5\wd0\relax\enskip\cr
&\omit\span\omit
\enskip\hfil
\strut{\bf Quantity}\strut
\enskip\hfil&
\cr
& 1&~litre&
\cr
&10&~pcs&
\cr}
\bye


text:
# 6.1. Gaussian Smoothing and Gaussian Derivatives¶

Consider an image of a photo printed in a newspaper. Because the image is depicted at larger size then it was printed in the newspaper, the individual blobs of ink are visible. In black and white printing only black ink is used, the ‘illusion’ of gray tones is due to the fact that the human eye cannot resolve too small details. We could say that the human eye is smoothing the images.

We can do the smoothing with the computer. In the next figure we show a sequence of images all of which are local mean filtered versions of the news paper image. The smoothing (local mean) is done using a Gaussian weight function.

A smoothed function is the convolution of the orginal function $$f$$ with the Gaussian weight function $$G^s$$:

$G^s(x,y) = \frac{1}{2\pi s^2}\exp\left(-\frac{x^2+y^2}{2s^2}\right)$

The size of the local neighborhood is determined by the scale of the Gaussian weight function.

In the plot three 1D Gaussian functions are shown for scales 3, 5 and 7. The graph of the 2D Gaussian function is obtained by rotating the 1D function graphs around the vertical $$z$$-axis.

## 6.1.1. Properties of the Gaussian Convolution¶

The Gaussian kernel function used in a convolution has some very nice properties.

Separability

The property that is of great importance in practice is that is a separable function in the sense that we may write:

$G^s(x,y) = G^s(x) G^s(y)$

where $$G^s(x)$$ and $$G^s(y)$$ are Gaussian functions in one variable:

$G^s(x) = \frac{1}{s\sqrt{2 \pi}} \exp\left( -\frac{x^2}{2 s^2}\right)$

It is not hard to prove (starting from the definition of the convolution) that a separable kernel function leads to a separable convolution in the sense that we may first convolve along the rows with a one dimensional kernel function followed by a convolution along the columns of the image. The advantage is that for every pixel in the resulting image we have to consider far less values in the weighted sum then we would have to for a straightforward implementation.

Semi Group

If we take a Gaussian function $$G^s$$ and convolve it with another Gaussian function $$G^t$$ the result is a third Gaussian function:

$G^s \ast G^t = G^{\sqrt{s^2+t^2}}$

Mathematicians refer to such a property with the term semi group (it would be a group in case there would be an ‘inverse Gaussian convolution’).

From a practical point of view this is an important property as it allows the scale space to be build incrementally, i.e. we don’t have to run the convolution $$f_0\ast G^s$$ for all values of $$s$$. Say we have already calculated $$f^t = f_0\ast G^t$$ (with $$t<s$$), then using the associativity and the above property we have:

$f^s = f^t \ast G^{\sqrt{s^2-t^2}}$

Note that $$\sqrt{s^2-t^2}<s$$ and thus the above convolution will be faster then the convolution $$f_0\ast G^s$$.

Smoothness and Differentiability

Let $$f_0$$ be the ‘original’ image and let $$f^s$$ be any image from the scale space (with $$s>0$$). Then no matter what function $$f_0$$ is, the convolution with $$G^s$$ will make into a function that is continuous and infinitely differentiable. Using Gaussian convolutions to construct a scale space thus safely allows us to use many of the mathematical tools we need (like differentation when we look at the characterization of local structure).

## 6.1.2. Calculating Derivatives of Sampled Functions¶

Building a model for local image structure based on calculating derivatives was considered a dangerous thing to do in the early days of image processing. And indeed derivatives are notoriously difficult to estimate for sampled functions. Remember the definition of the first order derivative of a function $$f$$ in one variable:

$\frac{d f}{d x}(x) = \lim_{dx\downarrow0} \frac{f(x+dx)-f(x)}{dx}$

Calculating a derivative requires a limit where the distance between two points ($$x$$ and $$x+dx$$ is made smaller and smaller. This of course is not possible directly when we look at sampled images. We then have to use interpolation techniques to come up with an analytical function that fits the samples and whose derivative can be calculated.

Let $$F$$ be a sampled image then we may calculate the first order derivative $$F_x$$ as:

$F_x = F \star \begin{Bmatrix}1&\underline{-1}&0\end{Bmatrix}$

or with:

$F_x = F \star \begin{Bmatrix}0&\underline{1}&-1\end{Bmatrix}$

or with:

$F_x = F \star \half\begin{Bmatrix}1&\underline{0}&-1\end{Bmatrix}$

Note that all these ‘derivative images’ are only approximations of the sampling of $$f_x$$. They all have their role in numerical math. The first one is the right difference, the second the left difference and the third the central difference.

In these lecture notes we combine the smoothing, i.e. convolution with a Gaussian function, and taking the derivative. Let $$\partial$$ denote any derivative we want to calculate of the smoothed image: $$\partial(f\ast G^s)$$. We may write:

$\partial ( f \ast G^s) = f \ast \partial G^s$

Even if the image $$f$$ is a sampled image, say $$F$$ then we can sample $$\partial G^s$$ and use that as a convolution kernel in a discrete convolution.

Note that the Gaussian function has a value greater than zero on its entire domain. Thus in the convolution sum we theoretically have to use all values in the entire image to calculate the result in every point. This would make for a very slow convolution operator. Fortunately the exponential function for negative arguments approaches zero very quickly and thus we may truncate the function for points far from the origin. It is customary to choose a truncation point at about $$3s$$.

Note that because $$G^s$$ is separable, $$\partial G^s$$ is separable as well. This allows for separable convolution algorithms for all Gaussian derivatives.

## 6.1.3. Algorithms for Gaussian Convolutions¶

There are several ways to implement the Gaussian (derivative) convolutions to work on sampled images:

• Straightforward implementation. This is the direct implementation of the definition of the discrete convolution using the fact that the Gaussian function is seperable and thus the 2D convolution can be implemented by first convolving the image along the rows followed by a convolution along the columns.

In this straightforward implementation the Gaussian function is sampled on the same grid as the image to be convolved. Although the Gaussian function has an unbounded support (i.e. $$G^s(x)>0$$ for all $$x$$) we may ‘cut-off’ the sampled version for values of $$|x|>t$$. The value of $$t$$ is scale dependent! (this is part of the Lab Exercises).

It should be evident that for small scale values this straightforward implementation will not be accurate. For, say, $$s<1$$ the Gaussian function is restricted to only a few pixels. Such a ‘small’ Gaussian function is really not suited to be sampled on the grid with $$\Delta x$$.

• Interpolated Convolution. Instead of bluntly sampling the Gaussian function and calculate the discrete convolution we could first interpolate the discrete image, then calculate the convolution integral and finally sample to obtain the discrete image (this is detailed in the section “From Convolution Integrals to Convolution Sums” in the previous chapter). The interpolated convolution turns out to be equivalent with a discrete convolution with a weight function that is slightly different from the Gaussian (derivative) weight function.

• Convolution using the Fast Fourier Transform. In we first calculate the Fourier Transform of the input image and the convolution kernel the convolution becomes a point wise multiplication. Let the input image be of size $$N\times N$$ the spatial implementation is of order $$O(N^2)$$ whereas the FFT version is $$O(N\log N)$$. This may seem like an important speed up, still the spatial implementation are nowadays more often used.

• Infinite Response Convolution. These are probably the fastest implementations. The gain in speed is obtained because the local neighborhood used is of the same size regardless of the scale of the Gaussian function. Disadvantage of this method is that it is only an approximation and that calculating Gaussian derivatives is troublesome.


text:
Warning

# Bayesian Decision Making

In this lab we will implement an OCR system. For simplicity we assume the texts contain only two letters: A and C, and that the letters are already well segmented into 10×10 pixel image chips. We will extract a simple feature from the image chips and use it in a bayesian decision framework to partition the image set. Furthermore, the relative frequency of occurrence of A and C in text is given. We will consider two cases: (1) the measurements are discrete, and (2) the measurements are continuous.

In the discrete probabilities case, we will find the optimal strategy, compute its Bayesian risk, experiment with the loss function and classify independent data samples by applying the theory from the lecture slides directly.

In the continuous measurements case, an assumption is made that the extracted feature for each letter class (A,C) is generated by a normal distribution. The 'zero-one' loss will be used to estimate risk, which simplifies the decision strategy.

To fulfil this assignment, you need to submit these files (all packed in a single .zip file) into the upload system:

• answers.txt - answers to the Assignment Questions
• assignment_bayes.m - a script for data initialisation, calling of the implemented functions and plotting (not tested in the upload system)
• find_strategy_discrete.m - function which finds the optimal discrete strategy of their results (for your convenience, will not be checked)
• bayes_risk_discrete.m - function which computes the Bayesian risk for a given discrete strategy
• classify_discrete.m - function which classifies a given data sample using a discrete strategy
• classification_error_discrete.m - function which computes classification error on test data using discrete strategy
• find_strategy_2normal.m - function which finds the optimal continuous strategy
• bayes_risk_2normal.m - function which computes the Bayesian risk for a given continuous strategy
• classify_2normal.m - function which classifies a given data sample using a continuous strategy
• classification_error_2normal.m - function which computes classification error on test data using continuous strategy
• classif_W1.png, classif_W2.png and decision_discrete.png - images specified in Discrete measurements
• thresholds.png, decision_2normal.png - images specified in Continuous measurements

Start by downloading the template of the assignment. It contains function templates and the data needed for the tasks. When submitting the assignment to the upload system, please upload all the files included in the template.

## Information for development in Python

This is highly experimental feature. Use at your own risk.

Standard is to use Matlab. You may skip this info box if you follow the standard rules.

To fulfil this assignment, you need to submit these files (all packed in one .zip file) into the upload system:

• answers.txt - answers to the Assignment Questions
• bayes.ipynb - a script for data initialisation, calling of the implemented functions and plotting of their results (for your convenience, will not be checked).
• bayes.py - file with implemented methods:
• find_strategy_discrete - function which finds the optimal discrete strategy (for your convenience, will not be checked)
• bayes_risk_discrete - function which computes the Bayesian risk for a given discrete strategy
• classify_discrete - function which classifies a given data sample using a discrete strategy
• classification_error_discrete - function which computes classification error on test data using discrete strategy
• find_strategy_2normal - function which finds the optimal continuous strategy
• bayes_risk_2normal - function which computes the Bayesian risk for a given continuous strategy
• classify_2normal - function which classifies a given data sample using a continuous strategy
• classification_error_2normal - function which computes classification error on test data using continuous strategy
• classif_W1.png, classif_W2.png and decision_discrete.png - images specified in Discrete measurements
• thresholds.png, decision_2normal.png - images specified in Continuous measurements

Use template of the assignment. When preparing a zip file for the upload system, do not include any directories, the files have to be in the zip file root.

## Discrete measurements

The task is to design a classifier (Bayesian strategy) $q(x)$, which distinguishes between 10×10 images of two letters (classes) A and C using only a single measurement (feature):

$$q: \mathcal{X} \rightarrow D$$ $$\mathcal{X} = \{-10, \ldots, 10\}, \quad D = K = \{A, C\}$$

The measurement $x$ is obtained from an image by computing

mu = -563.9
sigma = 2001.6
x_unnormalized = (sum of pixel values in the left half of image)
-(sum of pixel values in the right half of image)
x = (x_unnormalized - mu) / (2 * sigma) * 10
limit x to the interval <-10, 10>
Note: the normalization squeezes most of the $x$ values in the interval $< -10, 10>$.

Computation of this measurement is implemented in compute_measurement_lr_discrete.m.

The strategy $q(x)$ will be represented in Matlab by a 1×21 vector containing 1 if the classification for that value of $x$ is supposed to be A, and 2 if the classification is supposed to be C. Thus given the vector $q$ and some $x$ we can decide for one of the classes.

As required in the formulation of Bayesian task, we are given all the necessary probabilities (specified in the assignment_bayes.m):

variable description
discreteA.Prob $p_{X|k}(x|A)$ given as a $1\times21$ vector (the size corresponds to the range of the values of $x$)
discreteA.Prior prior probability $p_K(A)$
discreteC.Prob $p_{X|k}(x|C)$ given as a $1\times21$ vector (the size corresponds to the range of the values of $x$)
discreteC.Prior prior probability $p_K(C)$
images_test 10x10x40, test images of size 10×10 pixels, depicting letters A and C
labels_test 1×40, vector with ground-truth classification (1=A, 2=C)

1. Complete the function template bayes_risk_discrete.m so that it returns the Bayesian risk for a given strategy. The input parameters are the distributions, the strategy $q$ and arbitrary loss function $W$ (2×2 matrix).

>> q_discrete = [ones(1, 10), 2  ones(1, 10)];
W = [0 1; 1 0];
R_discrete = bayes_risk_discrete(discreteA, discreteC, W, q_discrete)

R_discrete =

0.5154
2. Complete the function template find_strategy_discrete.m so that it returns the optimal Bayesian strategy. When the bayesian risk is the same for both classes for a particular $x$, prefer the “A” class to pass the automatic checks in the upload system.

Hint: Use the second line of the derivation on slide 11 in the lecture slides.

>> W = [0 1; 1 0];
q_discrete = find_strategy_discrete(discreteA, discreteC, W)

q_discrete =

Columns 1 through 14

1     1     1     1     1     2     2     2     1     1     1     1     1     1

Columns 15 through 21

1     1     1     1     1     1     1

>> distribution1.Prior = 0.3;
>> distribution2.Prior = 0.7;
>> distribution1.Prob = [0.2, 0.3, 0.4, 0.1];
>> distribution2.Prob = [0.5, 0.4, 0.1, 0.0];
>> W = [0 1; 1 0];
>> q = find_strategy_discrete(distribution1, distribution2, W)

q =

2     2     1     1
3. Compute the risk of the optimal strategy.

4. Plot the classification using the visualise_discrete function for two loss functions: W1=[0 1; 1 0] and W2=[0 5; 1 0] and save the figures as classif_W1.png and classif_W2.png.

5. Complete the classify_discrete.m function template so that it returns N labels given 10x10xN matrix of images.

6. Complete the classification_error_discrete.m function so that it returns the error on the whole image set images_test. The error is defined as number of incorrectly classified samples divided by total number of samples. To measure the error compare your classification with the ground truth in labels_test variable.

>> W = [0 1; 1 0];
q_discrete = find_strategy_discrete(discreteA, discreteC, W);
error_discrete = classification_error_discrete(images_test, labels_test, q_discrete)

error_discrete =

0.2250
7. Show the images classified as A and images classified as C in a figure. Save it as decision_discrete.png.

## Assignment Questions, part 1

Fill the correct answers to your answers.txt file.

1. What is the sum of discreteA.prob vector? (you should also be able to argue why :)
2. What is the risk of the optimal strategy for W=[0 1; 2 0]? (do you have an idea where you would make it unbalanced this way?) round to 4 decimal places
3. What is the relation between the final classification error (which is calculated by classification_error_discrete function) and the Bayesian risk (calculated by the bayes_risk_discrete function):
• a) Classification error is always higher than the Bayesian risk
• b) Classification error is always smaller than the Bayesian risk
• c) They are two independent quantities and minimising one does not necessary minimise the other

## Continuous measurements

In the second part of the assignment the probabilities $p_{X|k}(x|k)$ are given as continuous normal distributions (specified in the assignment_bayes.m): $$p_{X|k}(x|A) = \frac{1}{\sigma_k\sqrt{2\pi}}e^{-\frac{(x-\mu_k)^2}{2\sigma_k^2}}$$

variable description
contA.Mean mean value of the normal distribution $p_{X|k}(x|A)$
contA.Sigma standard deviation of the normal distribution $p_{X|k}(x|A)$
contA.Prior prior probability $p_K(A)$
contC.Mean mean value of the normal distribution $p_{X|k}(x|C)$
contC.Sigma standard deviation of the normal distribution $p_{X|k}(x|C)$
contC.Prior prior probability $p_K(C)$
images_test 10x10x40, test images of size 10×10 pixels, depicting letters A and C
labels_test 1×40, vector with ground-truth classification (1=A, 2=C)

Further we assume zero-one loss matrix W = [0 1; 1 0].

In this particular case, as explained in lecture notes, slides 21-22, the optimal strategy $q$ can be found by solving the following problem:

$$q(x) = \arg\max_k p_{K|X}(k|x) = \arg\max_k p_{XK}(x,k)/p_X(x) = \arg\max_k p_{XK}(x,k) = \arg\max_k p_K(k)p_{X|K}(x|k),$$

where $p_{K|X}(k|x)$ is called posterior probability of class $k$ given the measurement $x$ (i.e. it is the probability of the data being from class $k$ if we measure feature value $x$). Symbol $\arg\max_k$ denotes finding $k$ maximising the argument.

We will also work with an unnormalised measurement here instead of the discrete one used above

x = ((sum of pixel values in the left half of image)
-(sum of pixel values in the right half of image))
Computation of this measurement is implemented in compute_measurement_lr_cont.m.

### Quadratic discriminative function

At the beginning of the labs we will together show that in the case when $p_{X|k}(x|k)$ are normal distributions and when we consider zero-one loss function, the optimal Bayesian strategy $q(x)$ corresponds to a quadratic inequality (i.e. $ax^2+bx+c \ge 0$).

Hint: $$\arg\max_{k\in\{A,C\}} p_K(k)p_{X|k}(x|k) \quad \mbox{translates into} \quad p_K(A)p_{X|k}(x|A) \ge p_K(C)p_{X|k}(x|C)$$

Optimal strategy representation: Solving the above quadratic inequality gives up to two thresholds $t_1$ and $t_2$ (zero crossing points) and a classification decision (A or C) in each of the intervals $\mathcal{X}_1 = (-\infty, t_1>$, $\mathcal{X}_2 = (t_1, t_2>$, $\mathcal{X}_3 = (t_2, \infty)$. So similarly to the discrete case we can represent the strategy in Matlab as a structure with the following fields:

field description
q.t1 $t_1$ threshold (possibly $-\infty$)
q.t2 $t_2$ threshold (possibly $\infty$)
q.decision 1×3 decision vector containing the optimal decisions for each of the three intervals similarly to the discrete case

1. Fill in the formulas for quadratic inequality coefficients $a$, $b$ and $c$ into the find_strategy_2normal.m.

2. Complete the find_strategy_2normal.m template by filling in code for the determining the decision vectors.

>> q_cont = find_strategy_2normal(contA, contC)

q_cont =

t1: -3.5360e+03
t2: -1.2488e+03
decision: [1 2 1]
3. Using the visualize_2norm function in the template display the probabilities $p_{Xk}(x,k)$ and the classification thresholds $t_1$ and $t_2$ and save the figure as thresholds.png.

4. Complete the template function bayes_risk_2normal.m. We can reformulate the equations from lecture slides, slide 21 as $$R(q) = \int_X \sum_{k\in K}p_{XK}(x,k)W(k,q(x)) dx = \\ = \int_X p_X(x) \sum_{k\ne q(x)}p_{K|x}(k|x) dx = \\ = \int_X p_X(x)(1 - p_{K|x}(q(x)|x)) dx = \\ = 1 - \int_X p_X(x)p_{K|x}(q(x)|x) dx = \\ = 1 - \int_X p_K(q(x))p_{X|k}(x|q(x)) dx\,,$$ which in our special case simplifies further to $$R(q) = 1-\int_X p_K(q(x))p_{X|k}(x|q(x)) = \\ = 1 - \left( \int_{\mathcal{X}_1} p_K(\mbox{q.decision}(1))p_{X|k}(x|\mbox{q.decision}(1)) + \int_{\mathcal{X}_2} p_K(\mbox{q.decision}(2))p_{X|k}(x|\mbox{q.decision}(2)) + \\ \int_{\mathcal{X}_3} p_K(\mbox{q.decision}(3))p_{X|k}(x|\mbox{q.decision}(3))\right).$$ Thus we only need to compute integrals of the normal distribution corresponding to the strategy decision class over three intervals, multiply them by apriori probabilities and subtract their sum from one.

Hint: To integrate exponential functions you can use the normcdf function from the statistics toolbox.

>> R_cont = bayes_risk_2normal(contA, contC, q_cont)

R_cont =

0.1352
5. Complete the classify_2normal.m function template so that it returns a label given a 10×10 image.

6. Complete the classification_error_2normal.m function so that it returns the error on the whole image set images. To measure the error compare your classification with the ground truth in labels variable.

>> error_cont = classification_error_2normal(images_test, labels_test, q_cont)

error_cont =

0.1000
7. Show the images classified as A and images classified as C. Save them as decision_2normal.png (see assignment_bayes.m)

## Assignment Questions, part 2

Fill the correct answers to your answers.txt file.

4. Which of the conditions allowed us to express the optimal Bayesian strategy as a quadratic discriminative function (check all that apply):

• a) The conditional probabilities $p(x \mid k)$ follow a Gaussian distribution
• b) The prior probabilities $p(k)$ of all classes are equal
• c) The prior probabilities $p(k)$ of all classes are known
• d) There were two classes only
• e) The loss is zero for all misclassifications
• f) The loss for correct classification is zero and the loss for a misclassification is equal for all classes

5. If we extend the number of classes from 2 to 3 and keep the zero-one loss function, how does the optimal Bayesian strategy differ (check all that apply):

• a) The measurement is now 2-dimensional instead of 1-dimensional, therefore we model $p_{X|x}(x|k)$ with a 2-dimensional normal distribution
• b) The discriminative function is now cubic in $x$ instead of quadratic
• c) We always select the class $k$ such that the Bayesian risk is minimal
• d) An optimal Bayesian strategy cannot be found for more than 2 classes

This task is not compulsory. Work on bonus tasks deepens on your knowledge about the subject. Successful solution of a bonus task(s) will be rewarded by 3 points.

The data for this task can be downloaded from data_33rpz_cv02_bonus.mat. Use distributions D1, D2 and D3. The task is analogous to the previous one, only there are now two measurements (features) and three classes. The second measurement is

y = (sum of pixel values in the upper half of image)
-(sum of pixel values in the lower half of image)
The alphabet (i.e. the classes) now consists of three letters, 'A', 'C', and 'T'.

The task is to classify the input images into one of the three classes. Use both measurements $x$ and $y$ here. The density function $p_{X}(\mathbf{x}) = p_K(A)p_{X|k}(\mathbf{x}|A)+p_K(C)p_{X|k}(\mathbf{x}|C)+p_K(T)p_{X|k}(\mathbf{x}|T)$, where $\mathbf{x} = [x, y]$ is visualised below (drawn using pgmm function from the toolbox)

Output:

• Classification error of the optimal Bayesian strategy on the provided image set,
• Classification of input images, i.e. which image was assigned to which class – draw the images per class.

Hints:

• Multivariate Gaussian distribution density is given by $$f_{\mathbf x}(x_1,\ldots,x_k) = \frac{1}{\sqrt{(2\pi)^k|\boldsymbol\Sigma|}} \exp\left(-\frac{1}{2}({\mathbf x}-{\boldsymbol\mu})^T{\boldsymbol\Sigma}^{-1}({\mathbf x}-{\boldsymbol\mu}) \right),$$ where $k$ is number of dimensions, $\boldsymbol\Sigma$ is $k \times k$ covariance matrix and $\boldsymbol\mu$ is $k$-dimensional mean vector.
• Use mnvpdf or pdfgauss function.
• Calculate numerically the Bayesian risk for all decisions for every input image and select the optimal decision.

## References

• [1] Duda R., Hart P., Stock D.: Pattern Classification, 2001
• [2] Michail I. Schlesinger, Vaclav Hlavac. Ten Lectures on Statistical and Structural Pattern Recognition. Kluwer Academic Publishers, 2002.
• [3] Slides from lecture by Vaclav Hlavac and Jiri Matas.
courses/be5b33rpz/labs/02_bayes/start.txt · Last modified: 2018/10/22 09:35 by serycjon


text:
# The Unapologetic Mathematician

## Outer Measures

We’re going to want a modification of the notion of a measure. But before we introduce it, we have (of course) a few definitions.

First of all, a collection $\mathcal{E}\subseteq P(X)$ of sets is called “hereditary” if it includes all the subsets of each of its sets. That is, if $E\in\mathcal{E}$ and $F\subseteq E$, then $F\in\mathcal{E}$ as well. It’s not very useful to combine this with the definition of an algebra, because an algebra must contain $X$ itself; the only hereditary algebra is $P(X)$ itself. Instead, we define a “ring” of sets (or a $\sigma$-ring) to be closed under union (countable unions for $\sigma$-rings) and difference operations, but without the requirement that it contain $X$; complements and intersections are also not guaranteed, since we built these from differences using $X$ itself. Pretty much everything we’ve done so far with algebras can be done with rings, and hereditary $\sigma$-rings will be interesting objects of study.

Just like we found for algebras and monotone classes, the intersection of two hereditary collection is again hereditary. We can thus construct the “smallest” hereditary $\sigma$-ring containing a given collection $\mathcal{E}$, and we’ll call it $\mathcal{H}(\mathcal{E})$. In fact, it’s not hard to see that this is the collection of all sets which can be covered by a countable union of sets in $\mathcal{E}$; any $\sigma$-ring containing $\mathcal{E}$ must contain all such countable unions, and a hereditary collection must then contain all the subsets.

Now, an extended real-valued set function $\mu^*$ on a collection $\mathcal{E}$ is called “subadditive” whenever $E$, $F$, and their union $E\cup F$ are in $\mathcal{E}$, we have the inequality

$\displaystyle\mu^*(E\cup F)\leq\mu^*(E)+\mu^*(F)$

It’s called “finitely subadditive” if for every finite collection $\{E_1,\dots,E_n\}\subseteq\mathcal{E}$ whose union is also contained in $\mathcal{E}$ we have the inequality

$\displaystyle\mu^*\left(\bigcup\limits_{i=1}^nE_i\right)\leq\sum\limits_{i=1}^n\mu^*(E_i)$

and “countably subadditive” if for every sequence $\{E_i\}_{i=1}^\infty$ of sets in $\mathcal{E}$ whose union is also in $\mathcal{E}$, we have

$\displaystyle\mu^*\left(\bigcup\limits_{i=1}^\infty E_i\right)\leq\sum\limits_{i=1}^\infty\mu^*(E_i)$

Note that these differ from additivity conditions in two ways: we only ask for an inequality to hold, and we don’t require the unions to be disjoint.

Finally, we can define an “outer measure” to be an extended real-valued, non-negative, monotone, and countably subadditive set function $\mu^*$, defined on a hereditary $\sigma$-ring $\mathcal{H}$, and such that $\mu^*(\emptyset)=0$. Just as for a measure, we say that $\mu^*$ is “finite” or “$\sigma$-finite” if every set has finite or $\sigma$-finite outer measure.

March 25, 2010 Posted by | Analysis, Measure Theory | 12 Comments


text:
[–] 0 points1 point  (0 children)

sorry, this has been archived and can no longer be voted on

What does it mean for lim a(n) = L as n -> inf?

[–] 0 points1 point  (3 children)

sorry, this has been archived and can no longer be voted on

Compare the definitions, they're almost identical. You'll have "exists delta in R, x>delta" for one and "exists n in N, k>n" for the other, so all you need is n>=delta, then k>n>=delta gives the same implication.

Technically, you're using Archimedes principle that for any real number there's an integer larger then it. But you can probably get by with just saying "take n>=delta" or "take n=ceil(delta)".

[–][S] 0 points1 point  (2 children)

sorry, this has been archived and can no longer be voted on

How would you get from k>n>=delta to abs(a-L)<epsilon? That's the last thing I need to prove the limit exists, right?

[–] 0 points1 point  (1 child)

sorry, this has been archived and can no longer be voted on

k>delta implies |f(k)-L|<e, f(k)=a_k by definition, so |a_k-L|<e.

[–][S] 0 points1 point  (0 children)

sorry, this has been archived and can no longer be voted on

Aaah... Okay. Makes sense. Thank you kindly!

[–][S] 0 points1 point  (1 child)

sorry, this has been archived and can no longer be voted on

Also, how would I prove the converse of this theorem is false? That is, prove that: if the limit as n approaches inf of a = L then limit as n approaches inf of f(x) = L is false.

[–] 0 points1 point  (0 children)

sorry, this has been archived and can no longer be voted on

Try to find a function f which satisfies f(n)=0 for every integer n (then the limit of an is obviously 0), but f(x) does not tend to 0. A slight modification of a very simple function will do.