# Questions tagged [exponential]

261 questions

0

votes

0

answer

10

Views

### Subset-AVG - Finding a subset of List Which Matches Known Rational Number

I've asked this on math overflow and used comments to clarify/overstate my question. I hope it has the intended effect and doesn't come off as jarring.
I'm attempting to find what subset of numbers reach a known average.
I have a list of known values, negative and possible decimals. They look somet...

1

votes

0

answer

145

Views

### Exponential fit - sum of exponentials

I want to fit the following data:
x(time) y(data)
0.75; 19.33
1; 19.04
1.25; 17.21
1.5; 12.98
1.75; 11.59
2; 9.26
2.25; 7.66
2.5; 6.59
2.75; 5.68
3; 5.1
3.25; 4.36
3.5; 4.43
3.75; 3.58
4; 3.01
4.25; 3.24
4.5;...

1

votes

1

answer

212

Views

### Getting more refined results from Python SciPy curve_fit

I've got the following bit of Python (v2.7.14) code, which uses curve_fit from SciPy (v1.0.1) to find parameters for an exponential decay function. Most of the time, I get reasonable results. Occasionally though, I'll get some results which are completely out of my expected range, even though the fo...

1

votes

1

answer

230

Views

### Exponential backoff in kubernetes?

I am new to kubernetes and I am having trouble tracking down an exponential backoff signal I am observing on my Jmeter load tests for response times. I have a kubernetes service that is running between 4-32 pods with horizontal pod autoscaling. Each pod is running a Gunicorn WSGI serving a django ba...

1

votes

1

answer

202

Views

### Simulation using a Queue

I am trying to simulate the following simple scenario using a queue:
'Students come to a professor's office to receive help on a homework assignment every 10 minutes exponentially distributed. The time to help a student is exponentially distributed with a mean of 7 minutes. What are the expected num...

1

votes

0

answer

9

Views

### Can a Polly Circuit-Breaker have an exponential durationOfBreak?

We are trying to implement a retry policy for our database logic when we receive timeout exceptions due to exhausting the connection pool. This happens when we have a spike of unusually large activity for a small period of time. We have increased our max pool size to try to avoid this situation, b...

1

votes

0

answer

33

Views

### MP test for different distributions

I've solved problems of doing mp test for different theta value in one distribution before.
However, I have no idea for doing an MP test when
H0: X follows Uniform(0,1) vs H1: X follows exp(1)
How to achieve this?

1

votes

0

answer

21

Views

### Computational tractability of matrix exponential

I need to solve a differential equation of the form: dy/dt = H*y where H is an n x n matrix and y is an n column vector.
I can recast the equation as y = y_0 * Exp(H*t).
The options are to to run an ODE solver on the first equation or on the second form... and naively I would say that the matrix exp...

1

votes

0

answer

60

Views

### Convert multiple ID's weekly data to time series format

Here is the structure of my data
structure(list(customer_id = c('A', 'A', 'A', 'A', 'A', 'A',
'A', 'A', 'B', 'B', 'B', 'B', 'B'), state = c('NC', 'NC', 'NC',
'NC', 'NC', 'NC', 'NC', 'NC', 'KA', 'KA', 'KA', 'KA', 'KA'),
value = c(20.4, 29, 26, 40, 35, 36, 28, 41, 70, 75, 78, 99,
40), Date = st...

1

votes

1

answer

62

Views

### exponential time series for multiple time series data

My data has different start and end points.
structure(list(item = c('Card', 'Card', 'Card', 'Card', 'Card',
'Card', 'Card', 'Card', 'battery', 'battery', 'battery', 'battery',
'battery', 'laptop', 'laptop', 'laptop', 'laptop', 'laptop',
'laptop', 'laptop'), sales = c(20.4, 29, 26, 40, 35, 36, 28,...

1

votes

1

answer

32

Views

### Why does this Power function return zero for negative exponential cases?

The function returns zero for all negative exponential cases:
For example: print power(2, -3) returns 0
def power(int1, int2):
if int2 == 0:
return 1
result = int1
for num in range(1, int2):
result*=int1
if int2 > 0:
return result
else:
return (1/result)

1

votes

0

answer

10

Views

### MATLAB -Exponential (exp2) curve fitting function not giving the same output as the plot graph when using the fit values in the original equation

my brain is pickled with this one. Below are the two graphs I have plotted with exp2 function. The points do not match the curve, and this is ultimately changing my entire answer, as it is giving the wrong values out, and I cannot understand why?
enter image description here
enter image description...

1

votes

1

answer

40

Views

### Am I correctly writing code for curve fitting models? The line is way off for every model except for linear regression

I'm very new to coding in python and could use some support in answering this question. I wrote the code for the problem, but my models do not look correct.
Below is the question:
Optimization - Curve Fit Given 16 pairs of prices (as dependent variable) and
corresponding demands (as independent vari...

1

votes

1

answer

1.1k

Views

### Exponential numbers to be converted to string

I have an issue. I'm importing data from an excel file, data like codes and stuff.
for importing I'm using LinqToExcel linqToExcel
The problem is that one of the excel's columns contains codes like 'A2C235425345345' or '12441523543454454'. This data of this column is not formated as string or number...

0

votes

0

answer

3

Views

### Exponential fitting with bunched time series data

Trying to fit an exponential trend to time series data. The data is 'bunched', by which I mean that there are some dates with many readings and others with none.
The datetimes are in the pandas index. I converted these to a python range under label 'x' and pass this to curve_fit() along with the y-d...

1

votes

1

answer

797

Views

### scilab - find the integral of an exponential with matrix

How do I do this:
H = integral( exp(At) * B dt), from 0.0 to 0.1?
The objective is to develop a discrete state observer from a continuous one.
However, a never get a answer from scilab.

1

votes

1

answer

920

Views

### Why is my exponential decay not working?

I'm simulating exponential decay. Why is it not working? Here's the code
from math import *
from random import random
from time import sleep
class atom():
def __init__(self, pos):
self.pos = pos
self.isalive = True
class substance():
def __init__(self, halflife):
self.halflife = float(halflife)
self...

1

votes

1

answer

1.1k

Views

### Writing a function to generate a matrix filled with random exponentially distributed data

I'm trying to write a function that will fill a matrix of dimensions (n x n) with numbers that are drawn from a random exponential sample.
Some other caveats-
1) I need the numbers in the matrix to be integers.
2) I need the diagonals to be 0s.
This is what I've tried among other things:
myfun

1

votes

1

answer

31

Views

### Averaging tab separated values

I have several files from Acquire1_00001.txt ... Acquire1_00050.txt
The values in there are all tab separated like this:
3.500E2 -2.3386E0
3.510E2 39.192E-2
3.520E2 -46.143E-2
3.530E2 -42.809E-4
3.540E2 2.9356E0
3.550E2 1.0014E0
3.560E2 -1.3001E0
3.570E2 4.5244E0
Now I am trying to average all the f...

1

votes

1

answer

685

Views

### Exponential Computation by Approximation in Linux Kernel's source code

I have to modify a little bit of TCP algorithm in Linux Kernel's source code.
In it, I have to compute Congestion Window as following:
cwnd = cwnd (1-x^alpha) where alpha and x are float type and satisfy 0

1

votes

1

answer

149

Views

### Is there a dart package for random distributions?

I was wondering if there already exists a dart package that offers drawing random numbers from known distributions like normal, erlang, exponential, triangular etc.?

1

votes

2

answer

1.9k

Views

### C# Regression Curve Fitting to Forecast Future Growth [closed]

I was given a problem by a local small business owner that I need some help with. He wants me to take his past sales/revenue data and create a model to help forecast future data.
I know that I need to do some sort of Regression Curve fitting. I know that I don't want it to be a simple linear equat...

1

votes

1

answer

323

Views

### Ruby Exponent Issue

When I run this script:
pi=3.14
NozzleAreaM=.005**2*pi.to_f
It returns 7.85e-05 instead of 0.000078 like it does on a normal calculator. I've looked everywhere and I can't find a fix to this problem.

1

votes

2

answer

544

Views

### Doing exponential operation using only addition in Java

I'm having trouble making this program. Is it possible to write a program by getting the exponential value without using *, ^, Math.pow? Example I have base of 2 and the exponent is 3.
Q1. what operation should I used to help the addition to come up with the correct result?
Q2. addition is enough?

1

votes

1

answer

57

Views

### O notation proof for exponents and power

I am trying to prove that 4^n is not in the order of O(2^n).
Is this a valid method ?
4^n >= c*2^n
=> 4^n/2^n >= c
=> 2^n >= c
I got lost here...

1

votes

1

answer

2.9k

Views

### Python program summation of a series

I tried to create a program in python which basically sums up a series up to the term which is less than 0 that goes like:
1+((2X)/1!)+((3X^2)/2!)+((4X^3)/3!)....
I designed a basic term every term in the series that is ((A+1)((X)^A))/A! where A is incremented in a loop through the terms. The progr...

1

votes

1

answer

310

Views

### In PHP how can i manage strings with exponential numbers

i have a problem with some alphanumeric strings containing the exponential char 'E', these are stored into the db in a 'character varying' column, so are strings, but when i try to visualize them in the web page i get an 'INF' string instead of the original.
For example the following '55E77583' (tha...

1

votes

1

answer

81

Views

### Undefined function or variable 'exp2fit'

I'm new to MATLAB and I am trying to use the exp2fit function, but the command window throws the following error:
Undefined function or variable 'exp2fit'.
Error in myscript (line 34)
s=exp2fit(t,f,1);
What am I doing wrong?

1

votes

1

answer

974

Views

### C# Double to String without exponential

I get a double value after certain calculation as 1084218256710914.2
When I convert it to string, it gives me value in some format which contains E i.e exponential part.
I tried string.Format('{0:F8}', value);
which gave me '1,084,218,256,710,910.00000000' as I want max 8 digits after decimal points...

1

votes

1

answer

629

Views

### Calculate the sum of values in an exponential growth series

(SEE SOLUTION BELOW)
(lurker emerges)
I'm using the BigDecimal/BigInteger classes to work with really huge numbers.
I've got a formula for calculating a compound-growth series.
For each n, the value = initial * (coef ^ n).
I'm trying to discover a fast way to calculate the sum of a subset of values...

1

votes

1

answer

1k

Views

### get double value from bigdecimal without exponential java

is there a way to get double from BigDecimal without exponential?
Eg: I have an new BigDecimal('123456797676.897')
if i print new BigDecimal('123456797676.897').toString() it prints properly as 123456797676.897.
Now suppose if I try to print new BigDecimal('123456797676.897').doubleValue(), it print...

1

votes

1

answer

95

Views

### Script for working out exponential limit within a set range

In the image above column B is multiples of A1 and column C is C = C + B (working down the rows)
I worked out that in order for C for be 50 in 20 rows A1 has to be 0.2631579 but I'd like to be able to simplify that to a function that will return a list: list = exp(50, 20).
I'm not sure about the ter...

1

votes

1

answer

178

Views

### Exponential tick on linear yAxis - JFreeChart

I have a chart with a logarithmic yAxis like this one:
As we can see, the yAxis have exponential ticks (I setted it that way with yAxis.setExpTickLabelsFlag(true);). Here is the same chart with a linear axis (the one by default when creating a xylineChart):
Unfortunately, my values on the yAxis can'...

1

votes

1

answer

294

Views

### Exponential fitting for matlab

I have my data in arrays which are exponential like e^(ax+c)+d. I'm trying to draw a fit to them.
a = data1 (:,1);
b = data1 (:,2);
log(b);
p = polyfit (a,log(b),1);
But I don't know what to do now. I found an equation by polyfit and I was hoping to take the exponential of the equation I got from po...

1

votes

1

answer

347

Views

### How can I show transformation from uniform distribution to exponential distribution in R?

When variable X has uniform distribution (0,1), I can make a formula Y = -(lambda)lnX and the distribution of Y would show Exp(lambda).
And I'm trying to prove this case when lambda is 3, showing that two distribution curves match.
I've made it this far, but can't figure out really how.
w

1

votes

1

answer

752

Views

### find exponential function given two points

I know I can solve equations in maxima using the commands below but how do I solve for two different equations.
kill(all);
r:.5; a:1; b:-5.7; theta:theta; solve(a*e^(b*theta)=r,theta);
tex(''%);
I'm trying to get the equation of a exponetial function given two points. How do I go about doing this....

1

votes

1

answer

479

Views

### Python Pandas: Calculating exponentially weighted lagged squared returns (variance)

I'm trying to implement the AQR ivestment strategy 'Time Series Momentum': https://www.aqr.com/library/journal-articles/time-series-momentum.
I'm running into some confusion/trouble in part of the process. At first glance Pandas appears to have the functionality to calculate a key metric, 'exponent...

1

votes

1

answer

160

Views

### How do I inject the reliability of machines into my ANN

I would like to predict the Reliability of my physical machines by ANN.
Q1) What is the right metric that measure the reliability for repairable machine.
Q2) In order to calculate the reliability of each machine in each time period or row should I calculate TBF or MTBF, and feed my ANN.
Q3) Is AN...

1

votes

1

answer

585

Views

### In Python, is it possible to use 'exponential backoff' per request for batched HTTP requests?

So, here I have written a script that adds students to the courses (Google Classroom API).
students = getStudents('Year10', '10A') # VAR
for student in students:
newStudent = {
# Student Identifier
'userId': student
}
batch1_1.add(service.courses().students().create(courseId=arCourseId, body=newStu...

1

votes

1

answer

56

Views

### How to find curve which runs through complex points?

I have lists of complex points: orbit of complex point z under quadratic function
f(z) = z*z
I know that lists are:
z, z^2, z^4, z^8, ...
(r,t), (r^2, 2*t), ..., (r^(2^n), t*2^n)
where :
r = abs(z)
t = arg(z)
So I think that these curve will be exponential spirals.
But my code:
GiveParametric(ra...