My Math Forum  

Go Back   My Math Forum > High School Math Forum > Probability and Statistics

Probability and Statistics Basic Probability and Statistics Math Forum


Reply
 
LinkBack Thread Tools Display Modes
December 8th, 2016, 11:23 AM   #1
Newbie
 
Joined: Dec 2016
From: España

Posts: 2
Thanks: 0

Transforming (Normalizing) probability data.

I need some help finding a function to transform my data.

I have raster files with the probability to find a certain plant species as unsigned 8 bit integers, that means:
Value 0 is 0% chance to find the species, Value 255 means 100% to find the species.
So far everything is right (If I want to have percentages I just have to divide). The problem comes when the cutoff (the optimun value, that represent 50% chance) is 170 (not 127).
I am looking for a function to normalize the data since for each species the cutoff value is different (ranging from 40 to 230).

To make my question clear, I need a function that obeys the following:

0 <- f(0)
50 <- f(cutoff)
100 <- f(255)

Every other value should be transformed accordingly to the cuttoff.

Thank you for trying to help!
Celedonio is offline  
 
December 8th, 2016, 01:17 PM   #2
Newbie
 
Joined: Dec 2016
From: España

Posts: 2
Thanks: 0

I think I have done it (R code):

normalize <- function (value, cutoff){
if (value == 0) {
return(0)
}else if (value == 255) {
return (1)
}else if (value == cutoff) {
return (0.5)
}else if (value < cutoff) {
return (value*0.5/cutoff)
}else if (value > cutoff) {
return (1-(255-value)*0.5/(255-cutoff))
}
}

If someone have a more elegant answer that be great too, thanks!
Celedonio is offline  
Reply

  My Math Forum > High School Math Forum > Probability and Statistics

Tags
data, normalizing, probability, transforming



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
data sufficiency -Probability apd2006 Advanced Statistics 1 May 29th, 2013 12:06 PM
Normalizing Data Set to values Between -1 and 1 cd_gary Algebra 4 March 16th, 2012 09:49 AM
Probability that fit describes data correctly swahelian Advanced Statistics 0 July 15th, 2010 02:37 PM
Normalizing the radial distribution function GForce Calculus 1 February 16th, 2010 09:42 PM
Normalizing Data Set to values Between -1 and 1 cd_gary Abstract Algebra 0 December 31st, 1969 04:00 PM





Copyright © 2017 My Math Forum. All rights reserved.