Math / Science

The Math / Science topic primarily includes discussions of mathematics, physics, statistics and economic analysis, but also biology, chemistry and other sciences.

Share tech news, updates, or what's on your mind.

Sign up to Post

I'm trying to understand statistics here:
I read that the difference between the Population Standard Deviation and Sample is
The StDevP function evaluates a population, and the StDev function evaluates a population sample.

If your sample size is N.

StDev will divide by N
and StDevP will divide by N-1

1.  This does not make sense.  How does subtracting one item turn a data set from a whole population into a sample?
2.  Which do I use when I'm evaluating my company's sales numbers.  the "P" or "S"?
I guess population because I'm including the entire group of sales people in my firm?
Hi Experts

Can someone show me how I can make a Matlab splash screen so that when Matlab is started it would say "Welcome to Matlab".
 It would be great if the splash screen would start in the command Window so I can use Ascii Art.
I know that the intersection of a context free language and a regular language is context free however i cannot understand the below proof.

The below words are quoted from : link (look at the end of the page)

i didn't understand the part  L' = L n a*b*c*  .  How can i say such an equivalence ? Is it correct?

Sample proof using closure properties

Let L={w in {a,b,c}* with equal numbers of a's, b's, and c's}. L is not context-free.

To show this, suppose L were context free. Consider L' = L n a*b*c*. Because context-free languages are closed under intersection with regular languages, L' must be regular. But L' is just anbncn, which we know not to be regular. So we must have been wrong in our assumption that L was regular.
My 5 year old is supposed to be taking a placement test in a couple of month's in order to start kindergarten and although I have him writing his alphabet and numbers, I wanted to know what else I might be able to do.  Is there sometype of lumosity for a 5 year old or a website that can direct me to what I'm seeking?

Any ideas?
I just got a new insurance carrier and my "old" primary doctor is not within the network of where I'd like to be.  I wanted to know if there's a way to find out where a particular doctor in certain deciplines rates within their realm of specialty.
I have two fractions I want to find the "MOD" between them. Is the answer another fraction?

I chose: Since integer mod is sort of the opposite of integer division. I found the mod of the first fractions numerator and denominator and arbitrarily assigned it as the numerator of the new fraction The same for the second fraction and assigned to the denominator of the new fraction.

Both fractions have already been through euclid's algorithm and are in GCD form.

I have seen many trying to explain it in the terms of ax + by = d or something like that. What are the variables as they relate to the fractions. Is this even the correct direction?
What metals would be found if this freezer was dismantled?

Maybe brass fittings, some copper tubing, the compressor should be iron.

Any others?
i had spread diatomaceous earth on the carpet for general cleanup.. now i need to remove diatomaceous earth back.. do you recommend just the vacuum cleaner or a dugdoctor better choice? (

Hi Experts,

I have just entered some data into a website MLR calculator. What are the results telling me?

With standard linear regression I would know how to graph the relationship between X1 and Y or X2 and Y but how do I graph the relationship of X1, X2 and Y?
I follow a few websites, and magazines about technology, but I was wondering what other tech oriented sites or magazines I should be looking at?

Anything science, tech or security that you have found useful, or interesting.
Hello, I want to compare two thermal images, being the first image the reference, and determine if the second image is significantly different from the first.

Therefore I want to apply a Kolmogorov–Smirnov test to compare these images;

"The two-sample KS test is one of the most useful and general nonparametric methods for comparing two samples, as it is sensitive to differences in both location and shape of the empirical cumulative distribution functions of the two samples."
(this site offers a KS test function)

I want to be able to use this method to compare drawn regions of the thermal images aswell (see unit attached)

I need someone to validate (and potentially correct) "math notation" for a formula.

Please see attached XLS which illustrates the process.  

Thank you in advance,
In the next few weeks, I'll release a survey to a relatively large population.

Once the data extraction will be completed, I plan on using SPSS for the analysis (btw, I'm just starting to familiarize myself with the software).

Anyhow, one of the first few activities is to transform answers (where a 7 becomes a 1 and vice versa).   As you know, this is required in order to keep cost and benefit questions on the same scale.

Also, one of the first tasks is to review the Cronbach's alpha.   My question:  Is it recommended to obtain Cronbach's Alpha before or after the conversion?   Does it make a difference?


Not sure if this forum has many SPSS supporters... yet, I'll give it a try.

For a survey (to be released in the near future), I plan on conducting the analysis via SPSS.

Questions will use 7-point Likert scales (Strongly Disagree / Strongly Agree) via drop-down menus.  

Now, some questions are formed around a "benefit" factor while others address "cost scenarios".

As you know, a "Strongly Agree" for both a benefit-related question and cost-related question will receive a score of 7.   That's fine... however, I need to somehow reverse the scoring for the cost-related question(s) so that a "7" will be converted into a "1/7" (and a "1" should be multiplied by 7).   This is required in order to measure "good things" on an equal scale.

Now, maybe I could copy/paste an SPSS column in Excel and do the conversion there.   Then copy/paste the updated values back into SPSS.

In the end, however, there's room for error in this approach and I'm wondering if SPSS has a build-in function/setting that can account for the reverse scoring.

If yes, please let me know where/how to set it up?

I need to fill in staff performances as a percentage while other people would be looking on. In order to prevent them from knowing what I have entered I would like to mask these numbers by keeping them as percentages but with a random value. The real value and random value should have a one-to-one relationship. That means that

33% may change to something like 62% using a formula and reversing the formula should give back 33% corresponding to 62%.

Can we have a formula (not a lookup table)?
I know that there are several resource on the web about this topic.However, i cannot understand any of them or i cannot find any simple and clean explanation.

I cannot grasp how to construct a Pda(push down automata) from a given CFG(context free grammar) , namely CFG to PDA conversion. Can you give any simple CFG and convert it to a PDA step by step, please ? Show the formal definitons of PDA and CFG too,please.
Thanks in advance.
Dear Experts,
I have an application that requires me to work out the R-Squared statistic of a regression from scratch.  I got the formula from the following Web page:

This works fine for a normal regression model with a constant.  If you select the noconstant option in either Excel or Stata then the Sum of Squared differences is totally different from the result of the formula shown on the Wikipedia page above.

Can anyone show me a link to the correct formula where there is no intercept?
Best Wishes,
How can I figure out what percentage that one number is between two other numbers?

For example, the price of Commodity X is currently $12.34 per pound.
This week's low price was $11.11 per pound and this week's high price was $22.22 per pound.

I tried solving this with JavaScript but I have the math wrong:

var low = 11.11;
var high = 22.22;
var current = 12.34;
alert( current * low / high ); // This is not correct

Open in new window

I need some help with writing a formula into correct "notation format".

Please see attached XLS with formula and proposed notation format.   I don't think what I proposed is correct, so I'd welcome any help on this.

I was studying this pdf :
But i think there is some mistake or lacking on somewhere.
I uploaded the related part's photo.
In,  i < j + k  part , we did S4->S5c
However in our cfg , "bb" is also possible possible and it must exist in the i<j+k part , however with the given solution , we cannot reach "bb" . Thus , there is some lacking in the solution , i think.
Am i right?
I am running GUIMiner, entered my credentials and started the application.  I keep getting a message "Connection".  It goes no place.

Any ideas?

I'm trying to calculate an angle in a right triangle giving the length of the 3 sides:
private float calculateRotationAngle() {

	double a = maxX - minX;
	double b = CAMERA_HEIGHT;
	double cSquared = a*a + b*b;
	double c = Math.sqrt(cSquared);
	double cosA = (c*c + b*b - a*a) / 2 * b * c; // radians
	double angleA = Math.acos(cosA); // -1 <= cosA <= 1
        double degrees = (angleA * 180) / Math.PI;
	Log.d("calculateRotationAngle", "a: " + a);
	Log.d("calculateRotationAngle", "b: " + b);
	Log.d("calculateRotationAngle", "c: " + c);
	Log.d("calculateRotationAngle", "cosA: " + cosA);
	Log.d("calculateRotationAngle", "angleA: " + angleA);
	Log.d("calculateRotationAngle", "degrees: " + degrees);
	return (float) degrees;

Open in new window

Here is some sample output:
a: 100.0
b: 480.0
c: 490.3060268852505
cosA: 5.4223924125293625E10
angleA: NaN
degrees: NaN

Here is a picture indicating the angle I am looking for:
It is not the case that  -1 <= cosA <= 1.
 What am I doing wrong?
Hi Everyone,

           I am wondering if all liquids contain a certain amount of water.  The reason I ask this is because we check for water in gas tanks at the store 3 times a week; the readings for the presence of water in the tanks must be 0 which is also confirmed by a computer printout.  While I am inclined to say that not all liquids, like gasoline in its liquid state, does not have any content of water.  Besides, in order for water to be present in all liquids, must it give up a hydrogen molecule since it exist as a compound?  And, do all compounds, including water, have a specific boiling, melting, and freezing point which makes it unique from all other compounds?

             Any shared thoughts to this question will be greatly appreciated.

            Thank you


I have a stringGrid Filled with temperatures (°C), this table fills according to a thermal image; and a region of the image that the user draws;

I want to display a chart with the destribution of these temperatures; Something like the image attached to the question; Displaying its variance aswell ("A measure of the dispersion of a set of data points around their mean value. Variance is a mathematical expectation of the average squared deviations from the mean")
We prove that L3 = {1^n^2 | n >= 0} is not regular.
The solution exists on the web and it is any question i find from web to show that what i want to say later.
For instance one of them is in the link:
However, I want to follow a different way if this way is right and i implement it correctly, i can solve much questions with this way. (I will assign zero length for z , then assign any natural number which contradicts the condition to the x , then assign necessary length to the y. Then i assume that i is zero . So only x is left and thus contradiction!Below is an example of what i'm saying.)

Please correct me if i'm wrong.

Consider any pumping length p;
Say x = 1^2  y = 1^(p^2 - 2)  z = 1^0
|xy|<= p  and |y|>0 .
If we say that i = 0 , then it becomes that xy^0z= 1^2 . 2 is not square of any natural number. Thus the language is not regular.