How can I use time as a factor in calculating consistency/reliability.
Given a simplified scenario :
If a person ate at 1 apple on a day, a score will be given 1 to that person.
Out of 10 days, john has 5 days where he ate at 1 apple.
Out of 30days, ben has 15 days where he ate at 1 apple.
Currently the way I calculated their consistency is by giving them a score using X/Y where X is the number of days a person ate 1 apple and Y is the total number of days.
For john, his score will be 5/10 == 0.5.
For ben, his score will be 15/30 == 0.5.
But clearly, ben is more much consistent as due to the number of days(30). Is there a way to use the time to enhance the score so that I can clearly state that ben is more consistent with numbers.
thank you.
Related
Peter studies and lives in Barcelona. He will start an internship in Sabadell in the next year and unfortunately, he has to pay to travel for the train. The supervisor of his internship gave Peter a choice: Peter can decide for himself how many days he wants to follow the internship. Because Peter does not want to have any loan in the end of his studies, he wants to calculate how many days he can follow the internship without ending up with any debts.
Write function internship_days that calculates the amount of days Peter can travel back and forth given his income and the travel costs, rent and other expenses he has to pay every month (hint: remember that Peter needs to come back every day).
Please complete the definition of the function. Here is what you can assume about this function:
The input parameters 'income', 'travel_costs', 'rent' and 'other_expenses' are non-negative float values.
The function 'internship_days' must return a non-negative integer as its return value, reflecting the number of days Peter can afford traveling back and forth.
The returned value cannot be greater than 30 (maximum days in a month that Pieter can do the internship, for this assignment: each month contains 30 days).
from assignment import internship_days
internship_days(1000,12,300,100)
from assignment import internship_days
internship_days(1000,12,300,100)
def internship_days(income, traven_costs, rent, other_exp):
travel_allocation = income-( rent+other_exp)
days = travel_allocation/( travel_costs*2)
return days
How can I obtain the probability that one person will die at or before a certain age if I only have the average of the life expectancy?
For instance, a person is 45 years old. The life expectancy is 60 years. Can I find the probability the person will die at age 45 (not before 44, but not after 45)?
Keeping in mind the comments above and after some searching, I found these datasets
(WHO Life tables by country)
which helped me with the prediction that I want. In fact, apparently is imposible to determine the probability of survival with just the life expectancy, these datasets provide the survival probability for age based on the gender and the country.
im a bit of a rookie to Excel and I cant find an exact answer to my question.
Basically I want to get picture 1(https://i.stack.imgur.com/8E5zv.png) to do what picture 2 (https://i.stack.imgur.com/LXJhq.png
) is showing. Its probably a really easy question.
So any value total over 10,000 will be charged at the 25p rate and any value below 10,000 will be charged a the 40p rate.
so cumulatively, one person may have claimed 9999 miles since starting and they put in a new expense claim for 10 miles, I would like the 1 mile to go to the 40p rate and the other 9 to the 25p rate.
What sort of formula would I need?
Thanks for any help in advance!
If the previous cumulative mileage is denoted by Old, the additional mileages by Miles and the threshold at which the lower rate is payable by Thold then consider the following. There are 3 cases:
Old+Miles<=Thold: All Miles paid at the higher rate
Old<Thold<=Old+Miles: Miles split so that Thold-Old paid at higher rate and Miles-(Thold-Old) at lower rate
Thold<=Old: All Miles paid at lower rate.
Miles are paid at the higher rate whenever Old is less than Thold and the number of miles paid at the higher rate is the lesser of Miles (Case 1.) and Thold-Old (Case 2.). This could be expressed in Excel-like way as
`=IF(Thold-Old>0,IF(Miles<Thold-Old,Miles, Thold-Old),0)`
but a much more succinct expression is
`=MIN(Miles,MAX(Thold-Old,0))`
Both formulae, deliver a correct result in all 3 cases (including a value of zero for case 3.) and so each represents a generally applicable formula for the number of miles to be paid at the higher rate.
Similarly, miles are paid at the lower rate whenever Old+Miles exceeds Thold and the number paid at this rate is the lesser of Miles (Case 3.) and Miles-(Thold-Old) (Case 2.). In this case the IF expression is:
`=IF(Old+Miles>Thold,IF(Miles<Miles-(Thold-Old),Miles,Miles-(Thold-Old)),0)
but this can be equivalently written as
`=IF(Old+Miles-Thold>0,IF(Miles<Miles+Old-Thold,Miles, Miles+Old-Thold),0)`
and I will leave it for you as an exercise to work out the succinct version. The formula(e) deliver a result of 0 for case 1. and so are generally applicable for calculating the miles to be paid at the lower rate.
I am trying to find a formula that will represent the best prize from my prizes list.
I have two different variables for each prize:
1. How many people want that prize
2. The amount of money that each of the people who wanted the prize was want to invest in the prize.
For example:
1. 6 people invests 4 coins each for the prize.
2. 4 people invests 6 coins each for the prize.
In my opinion the amount of peoples have more wight than the money invested.
Is there any formula for this calculation.
Thank
how about
=A2^2*B2
it will emphasize "crowded" options
so 10 persons, 4 coins will be equal to 2 persons, 100 coins or 4 persons 25 coins or 5 persons 16 coins etc.
You need 100 lbs of bird feed. John's bag can carry 15 lbs and Mark's bag can carry 25 lbs. Both guys have to contribute exactly the same total amount each. What's the lowest number of trips each will have to take?
I have calculated this using systems of equations.
15x + 25y = 100
15x - 25y = 0
This equals out to:
John would have 3.33 trips and Mark would have 2 trips. Only one problem: you can't have 1/3 of a trip.
The correct answers is:
John would take 5 trips (75 lbs) and Mark would take 3 trips (75 lbs).
How do you calculate this? Is there an excel formula which can do both layers of this?
Assuming you put the total bird feed required in A1 and John's and Mark's bag limits in B1 and B2 respectively, then this formula in C1:
=MATCH(TRUE,INDEX(2*ROW(INDIRECT("1:100"))*LCM($B$1:$B$2)>=$A$1,,),0)*LCM($B$1:$B$2)/B1
will give the lowest number of trips required of John. Copying this formula down to C2 will give the equivalent result for Mark.
Note that the 100 in the part:
ROW(INDIRECT("1:100"))
was arbitrarily chosen and will give correct results providing neither John nor Mark is required to make more than twice that number of trips, i.e. 200. Obviously you can amend this value if you feel it necessary (up to a theoretical limit of 2^20).
Regards
Since John and Mark need to carry the same total amount of bird feed, what they will carry has to be a multiple of the least common multiple.
Since they both carry that amount the total amount will always be an even multiple of the LCM.
So find the least even multiple of the LCM that is larger than 100. And calculate the number of trips John and Mark will have to take from that.
For John:
CEILING(100/(2*LCM(15; 25));1)*LCM(15;25)/15
For Mark:
CEILING(100/(2*LCM(15; 25));1)*LCM(15;25)/25