Jump to content

Wikipedia:Reference desk/Mathematics

From Wikipedia, the free encyclopedia
Welcome to the mathematics section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:

October 29

[edit]

If the white amazon (QN) in Maharajah and the Sepoys is replaced by the fairy chess pieces, does black still have a winning strategy? Or white have a winning strategy? Or draw?

[edit]

If the white amazon (QN) in Maharajah and the Sepoys is replaced by the fairy chess pieces, does black still have a winning strategy? Or white have a winning strategy? Or draw?

  1. QNN (amazon rider in pocket mutation chess, elephant in wolf chess)
  2. QNC (combine of queen and wildebeest in wildebeest chess)
  3. QNNCC (combine of queen and “wildebeest rider”)
  4. QNAD (combine of queen and squirrel)
  5. QNNAD (combine of amazon rider and squirrel)
  6. QNNAADD (combine of queen and “squirrel rider”)

218.187.64.154 (talk) 17:38, 29 October 2024 (UTC)[reply]

Another question: If use wildebeest chess to play Maharajah and the Sepoys, i.e. on a 11×10 board, black has a full, wildebeest chess pieces in the position of the wildebeest chess, white only has one piece, which can move as either a queen or as a wildebeest on White's turn, andthis piece can be placed in any square in rank 1 to rank 6 (cannot be placed in the squares in rank 7 or rank 8, since the squares in rank 7 or rank 8 may capture Black's pieces (exclude pawns) or be captured by Black's pieces (or pawns), especially e7, g7, e8, g8, which may capture Black's king). Black's goal is to checkmate the only one of White, while White's is to checkmate Black's king. There is no promotion. (Unlike wildebeest chess, stalemate is considered as a draw) Who has a winning strategy? Or this game will be draw by perfect play? 218.187.64.154 (talk) 17:31, 1 November 2024 (UTC)[reply]


November 4

[edit]

Name of distance function

[edit]

I have a distance function in my code. I know it has a name and a Wikipedia article (because I worked on the article), but I am old and the name of the function has skipped my mind. I'm trying to reverse search by using the formula to find the name of the function, but I can't figure out how to do it. So, what is the name of this distance function: dab = -lnΣaibi. 68.187.174.155 (talk) 12:53, 4 November 2024 (UTC)[reply]

If and the value of this measure is about This does not make sense for an indication of distance.  --Lambiam 15:02, 4 November 2024 (UTC)[reply]
My brain finally turned back on and I remembered it is an implementation of Bhattacharyya distance. 68.187.174.155 (talk) 15:52, 4 November 2024 (UTC)[reply]
Normally when you call something a distance function it has to obey the axioms of a metric space. Since Bhattacharyya distance applies only to probability distributions, the previous example would not be relevant. Still, the term "distance function" is used rather loosely since (according to the article) the Bhattacharyya distance does not obey the triangle inequality. The w:Category:Statistical distance has 38 entries, and I doubt many people are familiar with most of them. --RDBury (talk) 18:08, 4 November 2024 (UTC)[reply]
When I was in college in the 70s, terminology was more precise. Now, many words have lost meaning. Using the old, some would say "prehistoric" terminology, a function is something that maps or relates a single value to each unique input. If the input is the set X, the function gives you the set Y such that each value of X has a value in Y and if the same value exists more than once in X, you get the same Y for it each time. Distance functions produce unbounded values. Similarity and difference functions are bounded, usually 0 to 1 or -1 to 1. Distance is usually bounded on one end, such as 0, and unbounded on the other. You can always get more distant. The distance function mentioned here is bounded on one end, but not the other. It does not obey triangle inequality, as you noted, so it is not a metric. Distance functions have to obey that to be metrics. Then, we were constantly drilled with the difference between indexes and coefficients. This function should be an index from my cursory read-through because it is logarithmic. If you double the result, you don't have double the distance. I've seen all those definitions that used to be important fade away over the decades, so I expect that it doesn't truly matter what the function is called now. 12.116.29.106 (talk) 16:12, 5 November 2024 (UTC)[reply]



November 8

[edit]

finding an equation to match data

[edit]

An experiment with accurate instruments resulted in the following data points:-

x,     y
0.080, 0.323;
0.075, 0.332;
0.070, 0.347;
0.065, 0.368;
0.060, 0.395;
0.055, 0.430;
0.050, 0.472;
0.045, 0.523;
0.040, 0.587;
0.035, 0.665;
0.030, 0.758;
0.025, 0.885;
0.020, 1.047;
0.015, 1.277;
0.010, 1.760.

How can I obtain a formula that reasonably matches this data, say within 1 or 2 percent?
At first glance, it looks like a k1 + k2*x^-k3 relationship, or a k18x^k2 + k3*x^-k4 relationship, but they fail at x above 0.070. Trying a series such as e(k1 + k2x +k3x^2) is also no good. -- Dionne Court (talk) 03:14, 8 November 2024 (UTC)[reply]

Thank you CiaPan for fixing the formatting. Dionne Court (talk) 15:12, 8 November 2024 (UTC)[reply]
Plotting 1/y against x it looks like a straight line, except there is a rather dramatic hook to the side starting around x=.075. This leads me to suspect that the last two entries are off for some reason; either those measurements are off or there's some systematic change in the process going on for large x. Part of the problem is that you're not giving us any information about where this information is coming from. I've heard it said, "Never trust data without error bars." In other words, how accurate is accurate, and might the accuracy change depending on the input? Is there a reason that the values at x≥.075 might be larger than expected. If the answer to the second is "Yes" then perhaps a term of the form (a-x)^k should be added. If the answer is "No" then perhaps that kind of term should not be added since that adds more parameters to the formula. You can reproduce any set of data given enough parameters in your model, but too many parameters leads to Overfitting, which leads to inaccurate results when the input is not one of the values in the data. So as a mathematician I could produce a formula that reproduces the data, but as a data analyst I'd say you need to get more data points, especially in the x≥.075 region, to see if there's something real going on there or if it's just a random fluke affecting a couple data points. --RDBury (talk) 15:58, 8 November 2024 (UTC)[reply]
PS. I tried fitting 1/y to a polynomial of degree four, so a model with 5 parameters. Given there are only 15 data points, I think 5 parameters is stretching it in terms of overfitting, but when I compared the data with a linear approximation there was a definite W shaped wobble, which to me says degree 4. (U -- Degree 2, S -- Degree 3, W -- Degree 4.) As a rough first pass I got
1/y ≃ 0.1052890625+54.941265625x-965.046875x2+20247.5x3-136500x4
with an absolute error of less than .01. The methods I'm using aren't too efficient, and there should be canned curve fitting programs out there which will give a better result, but I think this is enough to justify saying that I could produce a formula that reproduces the data. I didn't want to go too much farther without knowing what you want to optimize, relative vs. absolute error, least squares vs. min-max for example. There are different methods depending the goal, and there is a whole science (or perhaps it's an art) of Curve fitting which would impractical to go into here. --RDBury (talk) 18:26, 8 November 2024 (UTC)[reply]
Thak you for your lengthy reply.
I consider it unlikely that the data inflexion for x>0.07 is an experimental error. Additional data points are :-
x, y: 0.0775, 0.326; 0.0725, 0.339.
The measurement was done with digital multimeters and transducer error should not exceed 1% of value. Unfortunately the equipment available cannot go above x=0.080. I only wish it could. Choosing a mathematic model that stays within 1 or 2 percent of each value is appropriate.
As you say, one can always fit a curve with an A + Bx + Cx^2 + Dx^3 .... to any given data. But to me this is a cop-out, and tells me nothing about what the internal process might be, and so extrapolation is exceedingly risky. Usually, a more specific solution when discovered requires fewer terms. ```` Dionne Court (talk) 01:49, 9 November 2024 (UTC)[reply]
When I included the additional data points, the value at .0725 was a bit of an outlier, exceeding the .01 absolute error compared to the estimate, but not by much. --RDBury (talk) 18:55, 9 November 2024 (UTC)[reply]
Some questions about the nature of the data. Some physical quantities are necessarily nonnegative, such as the mass of an object. Others can also be negative, for example a voltage difference. Is something known about the theoretically possible value ranges of these two variables? Assuming that x is a controlled value and y is an experimentally observed result, can something be said about the theoretically expected effect on y as x approaches the limits of its theoretical range?  --Lambiam 15:59, 9 November 2024 (UTC)[reply]

November 9

[edit]