Math notation for applying formula over each value in a subset

139 Views Asked by At

I am not very related to mathematical notation, and I have looked for examples to solve my doubt but I haven't found anything convincing so far.

For a data mining project, I'm trying to write, in mathematical notation, the formula I used to calculate a factor which helps me on handling outliers in a data vector/column/set. What I'm trying to represent is the following:

"Having a set named P1

F is a new set consisting of:

each element p of P1, starting at the second element, applying this formula"

For clarifying the sentence above I made this example on Python:

I have this starting dataset, consisting only of a vector/column/set named P1:

Input dataframe

Then I applied the formula:

import math
# This is the formula I want to translate to math notation
# Notice that I'm iterating over a subset of P1 which is P1 statring in its second element

F = [math.log(p/min(P1)) for p in P1[1:]]

Appending F to the original dataframe we got this new dataframe:

Desired output

This is what I have written so far for representing the construction of set F:

enter image description here

I have a feeling that there is something wrong in my math notation sentence(specifically because the sentence does not specify that the p elements belong to P1).

• If I don't have anything wrong: I would appreciate you to tell me.

• If I do have something wrong: can some mathematician hero help me correct my syntax?

Greetings