Capability (C013):— representing_probability Date: 2008/01/24 17:05:47
Revision: 1.5

Business overview

This section provides a business level overview of this capability.

Information model overview

This section provides an overview of the information model that supports this capability.

How Probability is Used

The probability capability shows how to define and use a simple probability value. It does not deal with more complicated concepts, such as conditional (or Bayesian) probabilities, nor does it deal with statistics. (Probability is the prediction of how likely events are to occur, while statistics analyses events that have happened.)

The following five sections describe how each aspect of probability is used, and build up into an overall probability capability.

The build-up is illustrated by examples showing each of the STEP entities generated, and the way the attributes are used.

How to Define a Probability Value

Figure 1 illustrates the relevant section of the data model for a numerical probability, although rather than using the conventional EXPRESS-G notation, it shows the subtype hierarchy by nesting the subtype within its supertype. This is done because only the innermost subtype will actually appear in the instance diagram, and so it is easier to compare instance diagrams with this form of the data model. The starting point for an attribute line shows the level at which the attribute is defined. For example, Probability_numeric defines the attribute has_value whereas it inherits the attribute name from its supertype Representation.



Figure 1 —  Probability Model

Figure 1 —  Probability Model

Probability is implemented through the Representation design pattern. In STEP, it is important to distinguish between a property and the way that property is represented. The classic example of this is that a mechanical component has a shape (the property) and this can be represented by a sold model (the representation). A consequence of this separation between property and representation is that the same property can be represented in several ways (for example, shape can be represented as a surface model), and the same representation can be used for several properties (for example, the property "space used as a mechanism operates" can also be represented by a solid model.

If we want to record, say, that a coin has an equal chance of coming down heads or tails, then we could represent the property "probability of a head" either as the normalized numerical value "0.5", the percentage value "50" or the textual value "evens". In this section, only the normalized numerical representation is considered.

There are three key entities in this model, Probability_numeric, Probability_numeric_value and Representation_context.

Probability_numeric is a subtype of Representation, and its function is to distinguish which of the possible sorts of representation is being used.

The main function of the entity Representation_item is to distinguish between different elements of the Representation when there is more than element. Since Probability_numeric_value is a single value, this function is redundant here. However, the intermediate entity type, Numerical_item_with_global_unit allows the probability value to identified as a ratio, rather then, say, a measure of length or mass.

The main function of Representation_context is to ensure that the Representation is correctly processed when importing data. Here it also provides, via Numerical_representation_context, the global unit "ratio" required by Numerical_item_with_global_unit. Note that the point of the ratio unit is to provide a dimensionless number. From the point of view of classical probability theory, it can be justified by considering probability as the ratio between the number of observations giving the required outcome to the total number of observations.

The instance diagram to represent a probability of a half is shown in figure 2.



Figure 2 —  Representing a Numerical Probability

Figure 2 —  Representing a Numerical Probability

EXAMPLE   

#1=PROBABILITY_NUMERIC('normalized numeric probability', #2, $, $, $, #4);
#2=NUMERICAL_REPRESENTATION_CONTEXT('Probability numeric', 'Probability numeric', (#3), $);
#3=RATIO_UNIT('', .F.);
#4=PROBABILITY_NUMERIC_VALUE('probability numeric value', LENGTH_MEASURE(0.5));

In it the following can be observed:

Note that the apparent redundancy between the names of the entity and the values held in the name field disappears once these ARM level entities are mapped to the AIM level.

Figure 3 illustrates the way that two different probabilities are represented. Each has a separate Representation entity, but both use the same representation context.



Figure 3 —  Representing Multiple Probabilities

Figure 3 —  Representing Multiple Probabilities

EXAMPLE   

#4=PROBABILITY_NUMERIC_VALUE('probability numeric value', LENGTH_MEASURE(0.5));
#5=PROBABILITY_NUMERIC('normalized numeric probability', #6, $, $, $, #8);
#6=NUMERICAL_REPRESENTATION_CONTEXT('probability numeric', 'probability numeric', (#10), $);
#7=PROBABILITY_NUMERIC('normalized numeric probability', #6, $, $, $, #9);
#8=PROBABILITY_NUMERIC_VALUE('probability numeric value', $);
#9=PROBABILITY_NUMERIC_VALUE('probability numeric value', LENGTH_MEASURE(0.5));
#10=RATIO_UNIT($, .F.);
	

How to Define a Textual Value

A textual probability is one where a text value such as "high" or "low" is used, rather than a precise numerical value. For example, such values are used indicatively in some risk assessment methods, where the objective is to identify problems before they occur rather than collect statistics for an accurate estimate. An instance diagram for textual probability is shown in figure 4.

AS figure 4 shows, the structure of the model is very similar to that for a numerical probability, with two essential differences. Firstly, the Representation_context is not subtyped to Numerical_representation_context, and consequently the units attribute disappears. Secondly, Probability_named_value is subtyped from String_representation_item rather than Numerical_ representation_item_with_global_unit.



Figure 4 —  Representing a Probability by Name

Figure 4 —  Representing a Probability by Name

EXAMPLE   

#11=PROBABILITY_BY_NAME($, #12, $, $, $, #13);
#12=REPRESENTATION_CONTEXT($, 'probability named value');
#13=PROBABILITY_NAMED_VALUE('low');
	

The main task when using textual probabilities is to define the reference data. For example, a set of probabilities "Simple set of three" gives the alternative of {high | medium | low}. The meanings of these may be left informal, or specialized to "Simple set of three/defined" were low means less than 25% chance of occurance, medium 25% to 75% and high better than 75%.

How to use a Probability Value

In STEP terms, a probability is a representation, and so cannot be applied to "something". Rather, it is a representation of a property, and it is the property that is applied. Hence the event "coin coming up tails" has a property of "probability of tail" for which the probability value is held in a representation, that is in a Probability_numeric.

Capability templates

The following sections define a set of templates for the capability, where a template is a specification of a set of entities that need to be instantiated to represent a given set of information.

Template: representing_probability_numeric (Short name: rep_prob_num)

This section specifies the template representing_probability_numeric.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a numerical probability.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_probability_numeric". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_probability_numeric

Figure 1 —  An EXPRESS-G representation of the Information model for representing_probability_numeric

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  The graphical representation of the representing_probability_numeric template

Figure 2 —  The graphical representation of the representing_probability_numeric template

Input parameters
The following input parameters are defined for this template:
value (Type= 'TYPE (any_number_value)' )
The value of the property. The datatype is always 'any_number_value' and should not be registered together with the value, i.e. enter the value as a number, without datatype.
class_name (Type='CLASS')
The class name of the probability in which the probability value is expressed.
The following classes and their sub-classes can be used:
classifications: "Probability_numeric" (urn:plcs:rdl:std:Probability_numeric)
class_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @class_name.
context (Type='CLASS')
The name of the class being used to classify the representation context (Representation_context) of the property.
The following classes and their sub-classes can be used:
classifications: "Representation_context" (urn:plcs:rdl:std:Representation_context)
context_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @context.
Reference parameters
The following reference parameters are defined for this template:
prob_num(Type='ENTITY (Probability_numeric)')
Allow the Probability_numeric entity instantiated in this path to be referenced when this template is used.
Note: The Probability_numeric entity can be referenced in a template path by:
%^target = $representing_probability_numeric.prob_num%
where target is the parameter to which the Probability_numeric is bound.
prob_num_value(Type='ENTITY (Probability_numeric_value)')
Allow the Probability_numeric_value entity instantiated in this path to be referenced when this template is used.
Note: The Probability_numeric_value entity can be referenced in a template path by:
%^target = $representing_probability_numeric.prob_num_value%
where target is the parameter to which the Probability_numeric_value is bound.
repr_context(Type='ENTITY (Representation_context)')
Allow the Representation_context entity instantiated in this path to be referenced when this template is used.
Note: The Representation_context entity can be referenced in a template path by:
%^target = $representing_probability_numeric.repr_context%
where target is the parameter to which the Representation_context is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique Representation_context
Each instance of the entity (Representation_context) within the data set shall be uniquely identified by a combination of the following parameters on this template (representing_probability_numeric) namely: context, context_ecl_id.
The instance is referenced by the following template parameter: repr_context.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- Instantiate and bind Probability_numeric
Probability_numeric
%^prob_num = Probability_numeric%
^prob_num.id = '/IGNORE'
^prob_num.name = '/IGNORE'
^prob_num.description = '/IGNORE'

-- Invocate template assigning_reference_data and assign the
-- reference data to Probability_numeric
/assigning_reference_data(
    class_name= @class_name,
    ecl_id= @class_ecl_id,
    items= ^prob_num)/

-- Instantiate and bind Representation_context
Representation_context
%^repr_context = Representation_context%
^repr_context.id = '/IGNORE'
^repr_context.kind = '/IGNORE'

-- Invocate template assigning_reference_data and assign the
-- reference data to Representation_context
/assigning_reference_data(
    class_name= @context,
    ecl_id= @context_ecl_id,
    items= ^repr_context)/

-- Instantiate and bind Probability_numeric_value
Probability_numeric_value
%^prob_num_value = Probability_numeric_value%
^prob_num_value.name = '/IGNORE'
^prob_num_value.value_component -> @value

-- Connect Probability_numeric with its context and its value
^prob_num.context_of_items -> ^repr_context
^prob_num.items -> ^prob_num_value
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Probability_numeric.id '/IGNORE' Representation.id
Probability_numeric.name '/IGNORE' Representation.name
Probability_numeric.description '/IGNORE' Representation.description
Representation_context.id '/IGNORE'
Representation_context.kind '/IGNORE'
Probability_numeric_value.name '/IGNORE' Representation_item.name
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_probability_numeric(value='0.15', class_name='Normalized_numeric_probability', class_ecl_id='urn:plcs:rdl:sample', context='Probability_numeric', context_ecl_id='urn:plcs:rdl:sample')/
(an illustration of the consolidated representing_probability_numeric template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_probability_numeric template

Figure 3 —  Entities instantiated by representing_probability_numeric template

The instance model in STEP ASCII exchange file format (ISO 10303 Part 21 syntax) is:
#1 = PROBABILITY_NUMERIC_VALUE('/IGNORE',ANY_NUMBER_VALUE(0.15)); #2 = REPRESENTATION_CONTEXT('/IGNORE','/IGNORE'); #3 = PROBABILITY_NUMERIC('/IGNORE','/IGNORE','/IGNORE',#2,(#1)); #5 = CLASSIFICATION_ASSIGNMENT(#6,(#3),'/IGNORE'); #6 = EXTERNAL_CLASS('/NULL','Normalized_numeric_probability','/IGNORE',#7); #7 = EXTERNAL_CLASS_LIBRARY('urn:plcs:rdl:sample','/IGNORE'); #9 = CLASSIFICATION_ASSIGNMENT(#10,(#2),'/IGNORE'); #10 = EXTERNAL_CLASS('/NULL','Probability_numeric','/IGNORE',#7);
The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_probability_numeric(value='0.15', class_name='Normalized_numeric_probability', class_ecl_id='urn:plcs:rdl:sample', context='Probability_numeric', context_ecl_id='urn:plcs:rdl:sample')/


Figure 4 —  Instantiation of representing_probability_numeric template

Figure 4 —  Instantiation of representing_probability_numeric template

Characterizations
No common characterizations of the template representing_probability_numeric have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.
Template: resource_property_probability_numeric (Short name: res_prp_prob_num)

This section specifies the template resource_property_probability_numeric.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a numerical probability for a resource property.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "resource_property_probability_numeric". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for resource_property_probability_numeric

Figure 1 —  An EXPRESS-G representation of the Information model for resource_property_probability_numeric

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  The graphical representation of the resource_property_probability_numeric template

Figure 2 —  The graphical representation of the resource_property_probability_numeric template

Input parameters
The following input parameters are defined for this template:
value (Type= 'TYPE (any_number_value)' )
The value of the property. The datatype is always 'any_number_value' and should not be registered together with the value, i.e. enter the value as a number, without datatype.
class_name (Type='CLASS')
The class name of the probability in which the probability value is expressed.
The following classes and their sub-classes can be used:
classifications: "Probability_numeric" (urn:plcs:rdl:std:Probability_numeric)
class_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @class_name.
context (Type='CLASS')
The name of the class being used to classify the representation context (Representation_context) of the property.
The following classes and their sub-classes can be used:
classifications: "Representation_context" (urn:plcs:rdl:std:Representation_context)
context_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @context.
property (Type= 'ENTITY (Resource_property)' )
The target of the template, i.e. the Resource_property (or template assigning_resource_property) to which the Resource_property_representation is related.
Reference parameters
The following reference parameters are defined for this template:
prob_num(Type='ENTITY (Probability_numeric)')
Allow the Probability_numeric entity instantiated in this path to be referenced when this template is used.
Note: The Probability_numeric entity can be referenced in a template path by:
%^target = $resource_property_probability_numeric.prob_num%
where target is the parameter to which the Probability_numeric is bound.
prop_repr(Type='ENTITY (Resource_property_representation)')
Allow the Resource_property_representation entity instantiated in this path to be referenced when this template is used.
Note: The Resource_property_representation entity can be referenced in a template path by:
%^target = $resource_property_probability_numeric.prop_repr%
where target is the parameter to which the Resource_property_representation is bound.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
Resource_property_representation

-- Mark the Resource_property_representation entity as
-- referable when this template is used by binding it to the reference
-- parameter ^prop_rep
%^prop_rep = Resource_property_representation%
Resource_property_representation.role = '/IGNORE'
Resource_property_representation.description = '/IGNORE'

-- Invocate the template representing_probability_numeric
/representing_probability_numeric(
    value= @value,
    class_name= @class_name,
    class_ecl_id= @class_ecl_id,
    context= @context,
    context_ecl_id= @context_ecl_id)/

-- Bind the Probability_numeric to the ^prob_num reference
%^prob_num = $representing_probability_numeric.prob_num%

-- Connect the Resource_property_representation to the input property and
-- to the numeric probability
^prop_rep.property -> @property
^prop_rep.rep -> ^prob_num
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Resource_property_representation.role '/IGNORE'
Resource_property_representation.description '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/resource_property_probability_numeric(value='0.15', property='#1', class_name='Normalized_numeric_probability', class_ecl_id='urn:plcs:rdl:sample', context='Probability_numeric', context_ecl_id='urn:plcs:rdl:sample')/
(an illustration of the consolidated resource_property_probability_numeric template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by resource_property_probability_numeric template

Figure 3 —  Entities instantiated by resource_property_probability_numeric template

The instance model in STEP ASCII exchange file format (ISO 10303 Part 21 syntax) is:
#1 = RESOURCE_PROPERTY('/IGNORE','/IGNORE',$); #2 = RESOURCE_PROPERTY_REPRESENTATION('/IGNORE',#1,#4,'/IGNORE'); #4 = PROBABILITY_NUMERIC('/IGNORE','/IGNORE','/IGNORE',#9,(#14)); #6 = CLASSIFICATION_ASSIGNMENT(#7,(#4),'/IGNORE'); #7 = EXTERNAL_CLASS('/NULL','Normalized_numeric_probability','/IGNORE',#8); #8 = EXTERNAL_CLASS_LIBRARY('urn:plcs:rdl:sample','/IGNORE'); #9 = REPRESENTATION_CONTEXT('/IGNORE','/IGNORE'); #11 = CLASSIFICATION_ASSIGNMENT(#12,(#9),'/IGNORE'); #12 = EXTERNAL_CLASS('/NULL','Probability_numeric','/IGNORE',#8); #14 = PROBABILITY_NUMERIC_VALUE('/IGNORE',ANY_NUMBER_VALUE(0.15));
The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/resource_property_probability_numeric(value='0.15', property='#1', class_name='Normalized_numeric_probability', class_ecl_id='urn:plcs:rdl:sample', context='Probability_numeric', context_ecl_id='urn:plcs:rdl:sample')/


Figure 4 —  Instantiation of resource_property_probability_numeric template

Figure 4 —  Instantiation of resource_property_probability_numeric template

Characterizations
No common characterizations of the template resource_property_probability_numeric have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.

© OASIS 2010 — All rights reserved